On Thu, 6 Nov 2014, Andrey Ryabinin wrote: > Adding __printf(3, 4) to slab_err exposed following: > > mm/slub.c: In function ‘check_slab’: > mm/slub.c:852:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘const char *’ [-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 ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘const char *’ [-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 ‘on_freelist’: > mm/slub.c:905:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-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 <a.ryabinin@xxxxxxxxxxx> > Cc: Christoph Lameter <cl@xxxxxxxxx> > Cc: Pekka Enberg <penberg@xxxxxxxxxx> > Cc: David Rientjes <rientjes@xxxxxxxxxx> > Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Acked-by: David Rientjes <rientjes@xxxxxxxxxx>