linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@mindspring.com>
To: linux-mm@kvack.org
Cc: Andrew Morton <akpm@osdl.org>, Adrian Bunk <bunk@stusta.de>
Subject: [PATCH] MM: Make needlessly global hugetlb_no_page() static.
Date: Wed, 4 Jul 2007 03:52:25 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0707040352040.2922@localhost.localdomain> (raw)

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

---

  i'm assuming that, given the following:

$ grep -rw hugetlb_no_page *
mm/hugetlb.c:int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
mm/hugetlb.c:           ret = hugetlb_no_page(mm, vma, address, ptep, write_access);

if a routine is both declared and defined in a single translation
unit, and isn't EXPORT_SYMBOLed in some way, that's pretty much the
definition of needlessly global, right?


diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index a45d1f0..6d7abaf 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -474,7 +474,7 @@ static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma,
 	return VM_FAULT_MINOR;
 }

-int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
+static int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
 			unsigned long address, pte_t *ptep, int write_access)
 {
 	int ret = VM_FAULT_SIGBUS;
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

                 reply	other threads:[~2007-07-04  7:52 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=Pine.LNX.4.64.0707040352040.2922@localhost.localdomain \
    --to=rpjday@mindspring.com \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=linux-mm@kvack.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