2003-01-09 19:08:45

by Stephen Hemminger

[permalink] [raw]
Subject: [PATCH] slab.c warnings

This gets rid of the compiler warnings in mm/slab.c:
Example:

mm/slab.c: In function `slab_destroy':
mm/slab.c:806: warning: passing arg 1 of `__slab_error' discards
qualifiers from pointer target type
mm/slab.c:810: warning: passing arg 1 of `__slab_error' discards
qualifiers from pointer target type



diff -Nru a/mm/slab.c b/mm/slab.c
--- a/mm/slab.c Thu Jan 9 11:10:13 2003
+++ b/mm/slab.c Thu Jan 9 11:10:13 2003
@@ -502,7 +502,8 @@

#define slab_error(cachep, msg) __slab_error(__FUNCTION__, cachep, msg)

-static void __slab_error(char *function, kmem_cache_t *cachep, char
*msg)
+static void __slab_error(const char *function, kmem_cache_t *cachep,
+ const char *msg)
{
printk(KERN_ERR "slab error in %s(): cache `%s': %s\n",
function, cachep->name, msg);