On Thu, 6 Nov 2014, Andrey Ryabinin wrote: > Adding __printf(3, 4) to slab_err exposed following: > > mm/slub.c: In function a??check_slaba??: > mm/slub.c:852:4: warning: format a??%ua?? expects argument of type a??unsigned inta??, but argument 4 has type a??const char *a?? [-Wformat=] > s->name, page->objects, maxobj); > ^ > mm/slub.c:852:4: warning: too many arguments for format [-Wformat-extra-args] > mm/slub.c:857:4: warning: format a??%ua?? expects argument of type a??unsigned inta??, but argument 4 has type a??const char *a?? [-Wformat=] > s->name, page->inuse, page->objects); > ^ > mm/slub.c:857:4: warning: too many arguments for format [-Wformat-extra-args] > > mm/slub.c: In function a??on_freelista??: > mm/slub.c:905:4: warning: format a??%da?? expects argument of type a??inta??, but argument 5 has type a??long unsigned inta?? [-Wformat=] > "should be %d", page->objects, max_objects); > > Fix first two warnings by removing redundant s->name. > Fix the last by changing type of max_object from unsigned long to int. > > Signed-off-by: Andrey Ryabinin > Cc: Christoph Lameter > Cc: Pekka Enberg > Cc: David Rientjes > Cc: Joonsoo Kim Acked-by: David Rientjes