[patch 2.6.17-rc4-git] remove compile warnings when CONFIG_SWAP=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



By making some macros reference their parameters.
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 <[email protected]>


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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux