linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] slub: Fix signedness warnings
@ 2010-09-29 12:02 Namhyung Kim
  2010-09-29 12:02 ` [PATCH 2/3] slub: Add lock release annotation Namhyung Kim
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Namhyung Kim @ 2010-09-29 12:02 UTC (permalink / raw)
  To: Christoph Lameter, Pekka Enberg, Matt Mackall; +Cc: linux-mm, linux-kernel

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

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 mm/slub.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 13fffe1..e137688 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2414,9 +2414,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);
@@ -3635,7 +3634,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;
-- 
1.7.2.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-10-02  8:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 12:02 [PATCH 1/3] slub: Fix signedness warnings Namhyung Kim
2010-09-29 12:02 ` [PATCH 2/3] slub: Add lock release annotation Namhyung Kim
2010-09-29 20:15   ` David Rientjes
2010-09-29 12:02 ` [PATCH 3/3] slub: Move NUMA-related functions under CONFIG_NUMA Namhyung Kim
2010-09-29 20:25   ` David Rientjes
2010-09-29 12:18 ` [PATCH 1/3] slub: Fix signedness warnings Christoph Lameter
2010-09-29 20:30 ` David Rientjes
2010-10-02  8:50 ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).