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 9CF20C4361B for ; Fri, 18 Dec 2020 17:58:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 61D1A23B76 for ; Fri, 18 Dec 2020 17:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727292AbgLRR6i (ORCPT ); Fri, 18 Dec 2020 12:58:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:46114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725919AbgLRR6i (ORCPT ); Fri, 18 Dec 2020 12:58:38 -0500 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?