Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp122221ybf; Wed, 26 Feb 2020 09:57:19 -0800 (PST) X-Google-Smtp-Source: APXvYqybQyj2/NHy1WxZsZzwLCuMfSjzp0vYKt5hmJW3gYDNzxhcSriCNgJQ/DMIH0rjUEvQDRqZ X-Received: by 2002:a05:6830:1219:: with SMTP id r25mr4257630otp.180.1582739838897; Wed, 26 Feb 2020 09:57:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582739838; cv=none; d=google.com; s=arc-20160816; b=Jjxy1Tc5Odw2+/9hdSd6UU20MG5FZExFV4FOdG5w+PUXGVtymANJ5zNPfLBYFhLPrE EZ6W7sMYKKI1F2/JYALiyd6t4u8fccA3jmVCJvOf4IHSn2Z/y4Um+EwI5kARPXOYhmXh 5vhUxyuD05q232c/DwXvp/JUsarAVycfb+uLzVdqVI+JzuqCvZs9icw/MQIkSv9YUsy+ bDqxPuC8IJiKtjGQdzOLnCKwHyKa6MzvGcAggx17WPLVu4XMfQo90dgWC3YrYP9zzadD iCL2AOnIk13q/73yj7orpn6Vw/mJqYCjfAinDps5TaH0s44XlFOxS2GcjxkyqA8P8izV ikVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=SgXH+49rQqhT40FtNaCPLsg13wMe4xXBBJOnBsreh94=; b=PqUxaMb5sKRM0OSziIA8ZisOITm+pU36WymukMpXy/BUYXhb604Z2tzQe7uKabMFlg dTkzg5uMSAWwvHtW2vmRhowa6oWEb4KjqSm2p5cA/2nd0EyeV97l+2//NPdQL8a4lKee DgjzbXzOGXwLDpLqqa+VjvT0fLrUSZn+Q8VxXyQQ98HTAQUpB3wwh/lWmfeJtU/WCexN 80F8MK9IvVP67ZZkmgmEaOX4xAeCNFdBvMtMb77TnE+QKeyM8mc16gc/Q95hgTloSpXt WWvlGgucmbJPM8GkLLEQAI36N6NaMjtyQxm3XiRJCzRzXiDjDgiXpkKvsDZPIIz4W0Vi FpuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26si124477oti.152.2020.02.26.09.57.04; Wed, 26 Feb 2020 09:57:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727044AbgBZR4n convert rfc822-to-8bit (ORCPT + 99 others); Wed, 26 Feb 2020 12:56:43 -0500 Received: from 11.mo1.mail-out.ovh.net ([188.165.48.29]:53561 "EHLO 11.mo1.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726688AbgBZR4n (ORCPT ); Wed, 26 Feb 2020 12:56:43 -0500 X-Greylist: delayed 4197 seconds by postgrey-1.27 at vger.kernel.org; Wed, 26 Feb 2020 12:56:41 EST Received: from player157.ha.ovh.net (unknown [10.108.42.142]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id E6D5E1A4165 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' Cc: Alastair D'Silva , 'Alastair D'Silva' , "'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 Morton' , 'Mauro Carvalho Chehab' , "'David S. Miller'" , 'Rob Herring' , 'Anton Blanchard' , 'Krzysztof Kozlowski' , 'Mahesh Salgaonkar' , 'Madhavan Srinivasan' , =?UTF-8?B?J0PDqWRyaWM=?= Le Goater' , 'Anju T Sudhakar' , 'Hari Bathini' , 'Thomas Gleixner' , '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 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: 8BIT X-Ovh-Tracer-Id: 9146529370105485748 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrleeggdeihecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvuffkjghfofggtgfgsehtqheftdertdejnecuhfhrohhmpefirhgvghcumfhurhiiuceoghhrohhugheskhgrohgurdhorhhgqeenucfkpheptddrtddrtddrtddpkedvrddvheefrddvtdekrddvgeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhlrgihvghrudehjedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehgrhhouhhgsehkrghougdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: > > > > > > -----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 Morton > > > > ; Mauro Carvalho Chehab > > > > ; David S. Miller ; > > > > Rob Herring ; Anton Blanchard ; > > > > Krzysztof Kozlowski ; Mahesh Salgaonkar > > > > ; Madhavan Srinivasan > > > > ; Cédric Le Goater ; Anju 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 > > > > > > > > On 02/21/20 at 02:26pm, Alastair D'Silva wrote: > > > > > From: Alastair D'Silva > > > > > > > > > > Function declarations don't need externs, remove the existing ones 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); > > > > > > > > It works w or w/o extern when declare functions. Searching 'extern' > > > > under include can find so many functions with 'extern' adding. Do we have > > > a > > > > explicit standard if we should add or remove 'exter' in function > > > declaration? > > > > > > > > I have no objection to this patch, just want to make clear so that I can > > > handle > > > > it w/o confusion. > > > > > > > > Thanks > > > > Baoquan > > > > > > > > > > For the OpenCAPI driver, we have settled on not having 'extern' on > > > functions. > > > > > > I don't think I've seen a standard that supports or refutes this, but it > > > does not value add. > > > > > > > FWIW this is a warning condition for checkpatch: > > > > $ ./scripts/checkpatch.pl --strict -f include/misc/ocxl.h > > Good to know, thanks. > > 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. > > > > > [...] > > > > 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); > > > > [...] > > >