mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@linux-foundation.org
Cc: ebmunson@us.ibm.com, rientjes@google.com, dhowells@redhat.com,
	linux-kernel@vger.kernel.org
Subject: [PATCH] HugeTLB: Fix unused variable warning
Date: Thu, 24 Sep 2009 11:02:32 +0100	[thread overview]
Message-ID: <20090924100232.19291.70594.stgit@warthog.procyon.org.uk> (raw)

Fix an unused variable warning:

	mm/mmap.c: In function 'do_mmap_pgoff':
	mm/mmap.c:953: warning: unused variable 'user'

by converting the CONFIG_HUGETLBFS=n version of hugetlb_file_setup() into an
inline function instead of a macro.

Introduced by:

	commit 4e52780d41a741fb4861ae1df2413dd816ec11b1
	Author: Eric B Munson <ebmunson@us.ibm.com>
	Date:   Mon Sep 21 17:03:47 2009 -0700
	hugetlb: add MAP_HUGETLB for mmaping pseudo-anonymous huge page regions

Signed-off-by: David Howells <dhowells@redhat.com>
---

 include/linux/hugetlb.h |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)


diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 176e7ee..c5d3111 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -3,6 +3,8 @@
 
 #include <linux/fs.h>
 
+struct user_struct;
+
 #ifdef CONFIG_HUGETLB_PAGE
 
 #include <linux/mempolicy.h>
@@ -10,7 +12,6 @@
 #include <asm/tlbflush.h>
 
 struct ctl_table;
-struct user_struct;
 
 int PageHuge(struct page *page);
 
@@ -187,7 +188,13 @@ static inline void set_file_hugepages(struct file *file)
 
 #define is_file_hugepages(file)			0
 #define set_file_hugepages(file)		BUG()
-#define hugetlb_file_setup(name,size,acct,user,creat)	ERR_PTR(-ENOSYS)
+
+static inline
+struct file *hugetlb_file_setup(const char *name, size_t size, int acctflag,
+				struct user_struct **user, int creat_flags)
+{
+ 	return ERR_PTR(-ENOSYS);
+}
 
 #endif /* !CONFIG_HUGETLBFS */
 


             reply	other threads:[~2009-09-24 10:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 10:02 David Howells [this message]
2009-09-24 11:51 ` Eric B Munson
2009-09-24 18:45 ` David Rientjes

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=20090924100232.19291.70594.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebmunson@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=torvalds@osdl.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®