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=-6.6 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLACK,USER_AGENT_SANE_2 autolearn=unavailable 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 CF69BC4BA24 for ; Wed, 26 Feb 2020 19:10:11 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 79F7E222C4 for ; Wed, 26 Feb 2020 19:10:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 79F7E222C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kaod.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48SQNd1sP2zDqNX for ; Thu, 27 Feb 2020 06:10:09 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kaod.org (client-ip=188.165.39.161; helo=15.mo6.mail-out.ovh.net; envelope-from=groug@kaod.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=kaod.org X-Greylist: delayed 4197 seconds by postgrey-1.36 at bilbo; Thu, 27 Feb 2020 06:08:11 AEDT Received: from 15.mo6.mail-out.ovh.net (15.mo6.mail-out.ovh.net [188.165.39.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48SQLM51QXzDqNQ for ; Thu, 27 Feb 2020 06:08:08 +1100 (AEDT) Received: from player157.ha.ovh.net (unknown [10.108.35.110]) by mo6.mail-out.ovh.net (Postfix) with ESMTP id 00E55202013 for ; Wed, 26 Feb 2020 15:21:35 +0100 (CET) Received: from kaod.org (lns-bzn-46-82-253-208-248.adsl.proxad.net [82.253.208.248]) (Authenticated sender: groug@kaod.org) by player157.ha.ovh.net (Postfix) with ESMTPSA id 898E0FCD5725; Wed, 26 Feb 2020 14:20:52 +0000 (UTC) Date: Wed, 26 Feb 2020 15:20:50 +0100 From: Greg Kurz To: 'Baoquan He' Subject: Re: [PATCH v3 04/27] ocxl: Remove unnecessary externs Message-ID: <20200226152050.45547219@bahia.home> In-Reply-To: <20200226141523.GI4937@MiWiFi-R3L-srv> References: <20200221032720.33893-1-alastair@au1.ibm.com> <20200221032720.33893-5-alastair@au1.ibm.com> <20200226081447.GH4937@MiWiFi-R3L-srv> <4d49801d5ec7e$7a3e8610$6ebb9230$@d-silva.org> <20200226100102.0aab7dda@bahia.home> <20200226141523.GI4937@MiWiFi-R3L-srv> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 9146529370105485748 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrleeggdeihecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvuffkjghfofggtgfgsehtqheftdertdejnecuhfhrohhmpefirhgvghcumfhurhiiuceoghhrohhugheskhgrohgurdhorhhgqeenucfkpheptddrtddrtddrtddpkedvrddvheefrddvtdekrddvgeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhlrgihvghrudehjedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehgrhhouhhgsehkrghougdrohhrghdprhgtphhtthhopehlihhnuhigphhptgdquggvvheslhhishhtshdrohiilhgrsghsrdhorhhg X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 'Madhavan Srinivasan' , 'Alexey Kardashevskiy' , 'Mahesh Salgaonkar' , 'Masahiro Yamada' , 'Oliver O'Halloran' , 'Mauro Carvalho Chehab' , 'Ira Weiny' , 'Thomas Gleixner' , 'Rob Herring' , 'Dave Jiang' , linux-nvdimm@lists.01.org, "'Aneesh Kumar K . V'" , 'Krzysztof Kozlowski' , 'Anju T Sudhakar' , Alastair D'Silva , 'Andrew Donnellan' , 'Arnd Bergmann' , 'Nicholas Piggin' , =?UTF-8?B?J0PDqWRyaWM=?= Le Goater' , 'Dan Williams' , 'Hari Bathini' , 'Alastair D'Silva' , linux-mm@kvack.org, 'Greg Kroah-Hartman' , linux-kernel@vger.kernel.org, 'Vishal Verma' , 'Frederic Barrat' , 'Paul Mackerras' , 'Andrew Morton' , linuxppc-dev@lists.ozlabs.org, "'David S. Miller'" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, 26 Feb 2020 22:15:23 +0800 'Baoquan He' wrote: > On 02/26/20 at 10:01am, Greg Kurz wrote: > > On Wed, 26 Feb 2020 19:26:34 +1100 > > "Alastair D'Silva" wrote: > >=20 > > > > -----Original Message----- > > > > From: Baoquan He > > > > Sent: Wednesday, 26 February 2020 7:15 PM > > > > To: Alastair D'Silva > > > > Cc: alastair@d-silva.org; Aneesh Kumar K . V > > > > ; Oliver O'Halloran ; > > > > Benjamin Herrenschmidt ; Paul Mackerras > > > > ; Michael Ellerman ; Frederic > > > > Barrat ; Andrew Donnellan ; > > > > Arnd Bergmann ; Greg Kroah-Hartman > > > > ; Dan Williams ; > > > > Vishal Verma ; Dave Jiang > > > > ; Ira Weiny ; Andrew Mor= ton > > > > ; Mauro Carvalho Chehab > > > > ; David S. Miller ; > > > > Rob Herring ; Anton Blanchard ; > > > > Krzysztof Kozlowski ; Mahesh Salgaonkar > > > > ; Madhavan Srinivasan > > > > ; C=C3=A9dric Le Goater ; A= nju T > > > > Sudhakar ; Hari Bathini > > > > ; Thomas Gleixner ; Greg > > > > Kurz ; Nicholas Piggin ; Masahiro > > > > Yamada ; Alexey Kardashevskiy > > > > ; linux-kernel@vger.kernel.org; linuxppc- > > > > dev@lists.ozlabs.org; linux-nvdimm@lists.01.org; linux-mm@kvack.org > > > > Subject: Re: [PATCH v3 04/27] ocxl: Remove unnecessary externs > > > >=20 > > > > On 02/21/20 at 02:26pm, Alastair D'Silva wrote: > > > > > From: Alastair D'Silva > > > > > > > > > > Function declarations don't need externs, remove the existing one= s so > > > > > they are consistent with newer code > > > > > > > > > > Signed-off-by: Alastair D'Silva > > > > > --- > > > > > arch/powerpc/include/asm/pnv-ocxl.h | 32 ++++++++++++++---------= ------ > > > > > include/misc/ocxl.h | 6 +++--- > > > > > 2 files changed, 18 insertions(+), 20 deletions(-) > > > > > > > > > > diff --git a/arch/powerpc/include/asm/pnv-ocxl.h > > > > > b/arch/powerpc/include/asm/pnv-ocxl.h > > > > > index 0b2a6707e555..b23c99bc0c84 100644 > > > > > --- a/arch/powerpc/include/asm/pnv-ocxl.h > > > > > +++ b/arch/powerpc/include/asm/pnv-ocxl.h > > > > > @@ -9,29 +9,27 @@ > > > > > #define PNV_OCXL_TL_BITS_PER_RATE 4 > > > > > #define PNV_OCXL_TL_RATE_BUF_SIZE > > > > ((PNV_OCXL_TL_MAX_TEMPLATE+1) * PNV_OCXL_TL_BITS_PER_RATE / 8) > > > > > > > > > > -extern int pnv_ocxl_get_actag(struct pci_dev *dev, u16 *base, u16 > > > > *enabled, > > > > > - u16 *supported); > > > >=20 > > > > It works w or w/o extern when declare functions. Searching 'extern' > > > > under include can find so many functions with 'extern' adding. Do w= e have > > > a > > > > explicit standard if we should add or remove 'exter' in function > > > declaration? > > > >=20 > > > > I have no objection to this patch, just want to make clear so that = I can > > > handle > > > > it w/o confusion. > > > >=20 > > > > Thanks > > > > Baoquan > > > >=20 > > >=20 > > > For the OpenCAPI driver, we have settled on not having 'extern' on > > > functions. > > >=20 > > > I don't think I've seen a standard that supports or refutes this, but= it > > > does not value add. > > >=20 > >=20 > > FWIW this is a warning condition for checkpatch: > >=20 > > $ ./scripts/checkpatch.pl --strict -f include/misc/ocxl.h >=20 > Good to know, thanks. >=20 > I didn't know checkpatch.pl can run on header file directly. Tried to > check patch with '--strict -f', the below info doesn't appear. But it Hmm... -f is to check a source file, not a patch... What did you try exactly ? > does give out below information when run on header file. >=20 > >=20 > > [...] > >=20 > > CHECK: extern prototypes should be avoided in .h files > > #176: FILE: include/misc/ocxl.h:176: > > +extern int ocxl_afu_irq_alloc(struct ocxl_context *ctx, int *irq_id); > >=20 > > [...] > >=20 >=20