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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 37582C4361B for ; Fri, 18 Dec 2020 17:58:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B885E23B77 for ; Fri, 18 Dec 2020 17:58:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B885E23B77 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 CC3C96B005C; Fri, 18 Dec 2020 12:57:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C74206B005D; Fri, 18 Dec 2020 12:57:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B8A136B0068; Fri, 18 Dec 2020 12:57:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0226.hostedemail.com [216.40.44.226]) by kanga.kvack.org (Postfix) with ESMTP id 9E41E6B005C for ; Fri, 18 Dec 2020 12:57:59 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5254A8249980 for ; Fri, 18 Dec 2020 17:57:59 +0000 (UTC) X-FDA: 77607161478.09.farm39_16151d82743f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 34D43180E8975 for ; Fri, 18 Dec 2020 17:57:59 +0000 (UTC) X-HE-Tag: farm39_16151d82743f X-Filterd-Recvd-Size: 2299 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Dec 2020 17:57:58 +0000 (UTC) Date: Fri, 18 Dec 2020 09:57:56 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1608314277; bh=qGSe6KrXUX2uhy+nL6ByzoHaAd0rggvdWYbrTQfUArA=; h=From:To:Cc:Subject:In-Reply-To:References:From; b=oUcK3gDEXJ2jHolfortkMqAoKBZqdnuXKAazDAP/sYhdzYKP1No3xpl4p+oyM03EM +c2lua0idhKfeuxxuz0okD6evAk4oS9r/HVyIrA2Xu0j19Ufj5ZN+L1eJtPyl6Rzw6 FoMXpb/ZQ9uzrmAD2DCpkZ3Y6wU6WxhuY4wSTmK0= From: Andrew Morton To: Souptick Joarder Cc: Matthew Wilcox , Xiangyang Yu , Linux-MM , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/filemap: Fix warning: no previous prototype Message-Id: <20201218095756.18d259ea243e434a8a90403a@linux-foundation.org> In-Reply-To: References: <20201217020311.491799-1-yuxiangyang4@huawei.com> <20201217022306.GB15600@casper.infradead.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Fri, 18 Dec 2020 09:39:30 +0530 Souptick Joarder wrote: > On Thu, Dec 17, 2020 at 7:53 AM Matthew Wilcox wrote: > > > > On Thu, Dec 17, 2020 at 10:03:11AM +0800, Xiangyang Yu wrote: > > > Fixed the warning when building with warnings enabled (W=1), > > > This function is only used in filemap.c, so mark this function > > > with 'static'. > > > > Good grief, no. Look at the git history before proposing a patch. > > revert "mm/filemap: add static for function __add_to_page_cache_locked" > Revert commit 3351b16af494 ("mm/filemap: add static for function > __add_to_page_cache_locked") due to incompatibility with > ALLOW_ERROR_INJECTION which result in build errors. > How about we add a prototype for __add_to_page_cache_locked() to squash the warning, along with a comment explaining what's going on?