From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F31EC55ABD for ; Tue, 10 Nov 2020 19:50:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C3FAE21D7F for ; Tue, 10 Nov 2020 19:50:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="AQUw2JPS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3FAE21D7F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DC9C96B0036; Tue, 10 Nov 2020 14:50:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D79AD6B005C; Tue, 10 Nov 2020 14:50:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C692F6B005D; Tue, 10 Nov 2020 14:50:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0165.hostedemail.com [216.40.44.165]) by kanga.kvack.org (Postfix) with ESMTP id 9A19D6B0036 for ; Tue, 10 Nov 2020 14:50:40 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 378778249980 for ; Tue, 10 Nov 2020 19:50:40 +0000 (UTC) X-FDA: 77469551040.01.board49_410ddad272f7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 1E45610045C00 for ; Tue, 10 Nov 2020 19:50:40 +0000 (UTC) X-HE-Tag: board49_410ddad272f7 X-Filterd-Recvd-Size: 3498 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Nov 2020 19:50:39 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EE66E206B6; Tue, 10 Nov 2020 19:50:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605037838; bh=mRi18aUbpZTnjTjgUWsVLKGyzEbgOtyXxgU2zSLUAgg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AQUw2JPSs7pvi6d1s9zJvtKDAW393r6WnAA88ULaAfy5/A3n3o9vJyx7F51DMgz6q qWeNZq8TDRIvitIK/UbeFzQUZgu8PgCQ2SVLYJdNa2KmEi4LspoWOB90fjWLVNucdF Xw3tJjLJEl2gtwYzFP2RMBgdoxQ469C4rFUeB6hg= Date: Tue, 10 Nov 2020 11:50:37 -0800 From: Andrew Morton To: Souptick Joarder Cc: Alex Shi , Linux-MM , linux-kernel@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , Josef Bacik Subject: Re: [PATCH] mm/filemap: add static for function __add_to_page_cache_locked Message-Id: <20201110115037.f6a53faec8d65782ab65d8b4@linux-foundation.org> In-Reply-To: References: <1604661895-5495-1-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, 10 Nov 2020 08:39:24 +0530 Souptick Joarder wrote: > On Fri, Nov 6, 2020 at 4:55 PM Alex Shi wr= ote: > > > > Otherwise it cause gcc warning: > > ^~~~~~~~~~~~~~~ > > ../mm/filemap.c:830:14: warning: no previous prototype for > > =E2=80=98__add_to_page_cache_locked=E2=80=99 [-Wmissing-prototypes] > > noinline int __add_to_page_cache_locked(struct page *page, > > ^~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > Is CONFIG_DEBUG_INFO_BTF enabled in your .config ? hm, yes. > > > > Signed-off-by: Alex Shi > > Cc: Andrew Morton > > Cc: linux-mm@kvack.org > > Cc: linux-kernel@vger.kernel.org > > --- > > mm/filemap.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/mm/filemap.c b/mm/filemap.c > > index d90614f501da..249cf489f5df 100644 > > --- a/mm/filemap.c > > +++ b/mm/filemap.c > > @@ -827,7 +827,7 @@ int replace_page_cache_page(struct page *old, str= uct 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) It's unclear to me whether BTF_ID() requires that the target symbol be non-static. It doesn't actually reference the symbol: #define BTF_ID(prefix, name) \ __BTF_ID(__ID(__BTF_ID__##prefix##__##name##__)) Alexei, can you please comment?