Skip to content

Commit

Permalink
slub: Fix signedness warnings
Browse files Browse the repository at this point in the history
The bit-ops routines require its arg to be a pointer to unsigned long.
This leads sparse to complain about different signedness as follows:

 mm/slub.c:2425:49: warning: incorrect type in argument 2 (different signedness)
 mm/slub.c:2425:49:    expected unsigned long volatile *addr
 mm/slub.c:2425:49:    got long *map

Acked-by: Christoph Lameter <cl@linux.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
  • Loading branch information
Namhyung Kim authored and Pekka Enberg committed Oct 2, 2010
1 parent 62e346a commit a5dd5c1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2433,9 +2433,8 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page,
#ifdef CONFIG_SLUB_DEBUG
void *addr = page_address(page);
void *p;
long *map = kzalloc(BITS_TO_LONGS(page->objects) * sizeof(long),
GFP_ATOMIC);

unsigned long *map = kzalloc(BITS_TO_LONGS(page->objects) *
sizeof(long), GFP_ATOMIC);
if (!map)
return;
slab_err(s, page, "%s", text);
Expand Down Expand Up @@ -3660,7 +3659,7 @@ static int add_location(struct loc_track *t, struct kmem_cache *s,

static void process_slab(struct loc_track *t, struct kmem_cache *s,
struct page *page, enum track_item alloc,
long *map)
unsigned long *map)
{
void *addr = page_address(page);
void *p;
Expand Down

0 comments on commit a5dd5c1

Please sign in to comment.