Commit 5af050bf authored by Randy Dunlap's avatar Randy Dunlap Committed by Pekka Enberg

slqbinfo: eliminate warnings

Documentation/vm/slqbinfo.c:386: warning: unused variable 'total'
Documentation/vm/slqbinfo.c:512: warning: format '%5d' expects type 'int', but argument 9 has type 'long unsigned int'
Documentation/vm/slqbinfo.c:520: warning: format '%4ld' expects type 'long int', but argument 9 has type 'int'
Documentation/vm/slqbinfo.c:646: warning: unused variable 'total_partial'
Documentation/vm/slqbinfo.c:646: warning: unused variable 'avg_partial'
Documentation/vm/slqbinfo.c:645: warning: unused variable 'max_partial'
Documentation/vm/slqbinfo.c:645: warning: unused variable 'min_partial'
Documentation/vm/slqbinfo.c:860: warning: unused variable 'count'
Documentation/vm/slqbinfo.c:858: warning: unused variable 'p'
Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
parent a1c4b8e7
...@@ -383,7 +383,6 @@ void slab_stats(struct slabinfo *s) ...@@ -383,7 +383,6 @@ void slab_stats(struct slabinfo *s)
{ {
unsigned long total_alloc; unsigned long total_alloc;
unsigned long total_free; unsigned long total_free;
unsigned long total;
total_alloc = s->alloc; total_alloc = s->alloc;
total_free = s->free; total_free = s->free;
...@@ -501,7 +500,7 @@ void slabcache(struct slabinfo *s) ...@@ -501,7 +500,7 @@ void slabcache(struct slabinfo *s)
total_alloc = s->alloc; total_alloc = s->alloc;
total_free = s->free; total_free = s->free;
printf("%-21s %8ld %10ld %10ld %5ld %5ld %7ld %5d %7ld %8d\n", printf("%-21s %8ld %10ld %10ld %5ld %5ld %7ld %5ld %7ld %8d\n",
s->name, s->objects, s->name, s->objects,
total_alloc, total_free, total_alloc, total_free,
total_alloc ? (s->alloc_slab_fill * 100 / total_alloc) : 0, total_alloc ? (s->alloc_slab_fill * 100 / total_alloc) : 0,
...@@ -512,7 +511,7 @@ void slabcache(struct slabinfo *s) ...@@ -512,7 +511,7 @@ void slabcache(struct slabinfo *s)
s->order); s->order);
} }
else else
printf("%-21s %8ld %7d %8s %4d %1d %3ld %4ld %s\n", printf("%-21s %8ld %7d %8s %4d %1d %3ld %4d %s\n",
s->name, s->objects, s->object_size, size_str, s->name, s->objects, s->object_size, size_str,
s->objs_per_slab, s->order, s->objs_per_slab, s->order,
s->slabs ? (s->objects * s->object_size * 100) / s->slabs ? (s->objects * s->object_size * 100) /
...@@ -641,10 +640,6 @@ void totals(void) ...@@ -641,10 +640,6 @@ void totals(void)
/* Object size */ /* Object size */
unsigned long long min_objsize = max, max_objsize = 0, avg_objsize; unsigned long long min_objsize = max, max_objsize = 0, avg_objsize;
/* Number of partial slabs in a slabcache */
unsigned long long min_partial = max, max_partial = 0,
avg_partial, total_partial = 0;
/* Number of slabs in a slab cache */ /* Number of slabs in a slab cache */
unsigned long long min_slabs = max, max_slabs = 0, unsigned long long min_slabs = max, max_slabs = 0,
avg_slabs, total_slabs = 0; avg_slabs, total_slabs = 0;
...@@ -855,9 +850,7 @@ void read_slab_dir(void) ...@@ -855,9 +850,7 @@ void read_slab_dir(void)
DIR *dir; DIR *dir;
struct dirent *de; struct dirent *de;
struct slabinfo *slab = slabinfo; struct slabinfo *slab = slabinfo;
char *p;
char *t; char *t;
int count;
if (chdir("/sys/kernel/slab") && chdir("/sys/slab")) if (chdir("/sys/kernel/slab") && chdir("/sys/slab"))
fatal("SYSFS support for SLUB not active\n"); fatal("SYSFS support for SLUB not active\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment