mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 2.6.17-rc4-git] remove compile warnings when CONFIG_SWAP=n
@ 2006-05-17  0:04 David Brownell
  0 siblings, 0 replies; only message in thread
From: David Brownell @ 2006-05-17  0:04 UTC (permalink / raw)
  To: Linux Kernel list

[-- Attachment #1: Type: text/plain, Size: 50 bytes --]

By making some macros reference their parameters.

[-- Attachment #2: swapnoise.patch --]
[-- Type: text/x-diff, Size: 1048 bytes --]

Get rid of compile-time warnings:

	mm/vmscan.c: In function `remove_mapping':
	mm/vmscan.c:382: warning: unused variable `swap'

It's used, but not without CONFIG_SWAP.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>


Index: at91-pre2/include/linux/swap.h
===================================================================
--- at91-pre2.orig/include/linux/swap.h	2006-05-15 10:07:26.000000000 -0700
+++ at91-pre2/include/linux/swap.h	2006-05-15 11:21:50.000000000 -0700
@@ -290,9 +290,9 @@ static inline void disable_swap_token(vo
 	release_pages((pages), (nr), 0);
 
 #define show_swap_cache_info()			/*NOTHING*/
-#define free_swap_and_cache(swp)		/*NOTHING*/
-#define swap_duplicate(swp)			/*NOTHING*/
-#define swap_free(swp)				/*NOTHING*/
+#define free_swap_and_cache(swp)		((void)(swp)/*NOP*/)
+#define swap_duplicate(swp)			((void)(swp)/*NOP*/)
+#define swap_free(swp)				((void)(swp)/*NOP*/)
 #define read_swap_cache_async(swp,vma,addr)	NULL
 #define lookup_swap_cache(swp)			NULL
 #define valid_swaphandles(swp, off)		0

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

only message in thread, other threads:[~2006-05-17  0:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-17  0:04 [patch 2.6.17-rc4-git] remove compile warnings when CONFIG_SWAP=n David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®