linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Xiangyang Yu <yuxiangyang4@huawei.com>
To: <akpm@linux-foundation.org>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] mm/filemap: Fix warning: no previous prototype
Date: Thu, 17 Dec 2020 10:03:11 +0800	[thread overview]
Message-ID: <20201217020311.491799-1-yuxiangyang4@huawei.com> (raw)

Fixed the warning when building with warnings enabled (W=1),
This function is only used in filemap.c, so mark this function
with 'static'.

mm/filemap.c:830:14: warning: no previous prototype for ‘__add_to_page_cache_locked’ [-Wmissing-prototypes]

Signed-off-by: Xiangyang Yu <yuxiangyang4@huawei.com>
---
 mm/filemap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/filemap.c b/mm/filemap.c
index c178022d7893..edaba5251bec 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -827,7 +827,7 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask)
 }
 EXPORT_SYMBOL_GPL(replace_page_cache_page);
 
-noinline int __add_to_page_cache_locked(struct page *page,
+static noinline int __add_to_page_cache_locked(struct page *page,
 					struct address_space *mapping,
 					pgoff_t offset, gfp_t gfp,
 					void **shadowp)
-- 
2.23.0



             reply	other threads:[~2020-12-17  2:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  2:03 Xiangyang Yu [this message]
2020-12-17  2:23 ` Matthew Wilcox
2020-12-18  4:09   ` Souptick Joarder
2020-12-18 17:57     ` Andrew Morton
2020-12-21 19:36       ` Souptick Joarder

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=20201217020311.491799-1-yuxiangyang4@huawei.com \
    --to=yuxiangyang4@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --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