All of lore.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL] Squash highmem related warnings
@ 2002-10-01  2:40 David Gibson
  0 siblings, 0 replies; only message in thread
From: David Gibson @ 2002-10-01  2:40 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

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.

diff -urN /home/dgibson/kernel/linuxppc-2.5/include/linux/highmem.h linux-bluefish/include/linux/highmem.h
--- /home/dgibson/kernel/linuxppc-2.5/include/linux/highmem.h	2002-09-20 14:36:09.000000000 +1000
+++ linux-bluefish/include/linux/highmem.h	2002-10-01 12:17:11.000000000 +1000
@@ -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 */


-- 
David Gibson			| For every complex problem there is a
david@gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-01  2:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-01  2:40 [TRIVIAL] Squash highmem related warnings David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.