Skip to contentSkip to conversation

Squash highmem related warnings

TRIVIAL David Gibson 1 participant 1 message Oct 1, 2002 MM core

lore
Share & tools
lore
#0 lore raw

Linus, please apply. This adds to the non-highmem version of kunmap_atomic() a dummy reference to its arguments. This can prevent unused variable warnings in its callers, such as in put_aio_ring_event() in fs/aio.c.

include/linux/highmem.h renamed from home/dgibson/kernel/linuxppc-2.5/include/linux/highmem.h +2 -1
diff -urN /home/dgibson/kernel/linuxppc-2.5/include/linux/highmem.h linux-bluefish/include/linux/highmem.h
@@ -25,7 +25,8 @@
 #define kunmap(page) do { (void) (page); } while (0)
 
 #define kmap_atomic(page, idx)		page_address(page)
-#define kunmap_atomic(addr, idx)	do { } while (0)
+#define kunmap_atomic(addr, idx)	do { /* avoid unused variable warnings in caller: */ \
+					     (void)(addr); } while (0)
 #define kmap_atomic_to_page(ptr)	virt_to_page(ptr)
 
 #endif /* CONFIG_HIGHMEM */
Signature · 4 lines
David Gibson			| For every complex problem there is a
[email protected]	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson