mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [patch 2.6.17-rc4-git] remove compile warnings when CONFIG_SWAP=n
Date: Tue, 16 May 2006 17:04:44 -0700	[thread overview]
Message-ID: <200605161704.44915.david-b@pacbell.net> (raw)

[-- 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

                 reply	other threads:[~2006-05-17  0:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200605161704.44915.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®