[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200226100102.0aab7dda@bahia.home>
Date: Wed, 26 Feb 2020 10:01:02 +0100
From: Greg Kurz <groug@...d.org>
To: "Alastair D'Silva" <alastair@...ilva.org>
Cc: "'Baoquan He'" <bhe@...hat.com>,
"'Alastair D'Silva'" <alastair@....ibm.com>,
"'Aneesh Kumar K . V'" <aneesh.kumar@...ux.ibm.com>,
"'Oliver O'Halloran'" <oohall@...il.com>,
"'Benjamin Herrenschmidt'" <benh@...nel.crashing.org>,
"'Paul Mackerras'" <paulus@...ba.org>,
"'Michael Ellerman'" <mpe@...erman.id.au>,
"'Frederic Barrat'" <fbarrat@...ux.ibm.com>,
"'Andrew Donnellan'" <ajd@...ux.ibm.com>,
"'Arnd Bergmann'" <arnd@...db.de>,
"'Greg Kroah-Hartman'" <gregkh@...uxfoundation.org>,
"'Dan Williams'" <dan.j.williams@...el.com>,
"'Vishal Verma'" <vishal.l.verma@...el.com>,
"'Dave Jiang'" <dave.jiang@...el.com>,
"'Ira Weiny'" <ira.weiny@...el.com>,
"'Andrew Morton'" <akpm@...ux-foundation.org>,
"'Mauro Carvalho Chehab'" <mchehab+samsung@...nel.org>,
"'David S. Miller'" <davem@...emloft.net>,
"'Rob Herring'" <robh@...nel.org>,
"'Anton Blanchard'" <anton@...abs.org>,
"'Krzysztof Kozlowski'" <krzk@...nel.org>,
"'Mahesh Salgaonkar'" <mahesh@...ux.vnet.ibm.com>,
"'Madhavan Srinivasan'" <maddy@...ux.vnet.ibm.com>,
"'Cédric Le Goater'" <clg@...d.org>,
"'Anju T Sudhakar'" <anju@...ux.vnet.ibm.com>,
"'Hari Bathini'" <hbathini@...ux.ibm.com>,
"'Thomas Gleixner'" <tglx@...utronix.de>,
"'Nicholas Piggin'" <npiggin@...il.com>,
"'Masahiro Yamada'" <yamada.masahiro@...ionext.com>,
"'Alexey Kardashevskiy'" <aik@...abs.ru>,
<linux-kernel@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>,
<linux-nvdimm@...ts.01.org>, <linux-mm@...ck.org>
Subject: Re: [PATCH v3 04/27] ocxl: Remove unnecessary externs
On Wed, 26 Feb 2020 19:26:34 +1100
"Alastair D'Silva" <alastair@...ilva.org> wrote:
> > -----Original Message-----
> > From: Baoquan He <bhe@...hat.com>
> > Sent: Wednesday, 26 February 2020 7:15 PM
> > To: Alastair D'Silva <alastair@....ibm.com>
> > Cc: alastair@...ilva.org; Aneesh Kumar K . V
> > <aneesh.kumar@...ux.ibm.com>; Oliver O'Halloran <oohall@...il.com>;
> > Benjamin Herrenschmidt <benh@...nel.crashing.org>; Paul Mackerras
> > <paulus@...ba.org>; Michael Ellerman <mpe@...erman.id.au>; Frederic
> > Barrat <fbarrat@...ux.ibm.com>; Andrew Donnellan <ajd@...ux.ibm.com>;
> > Arnd Bergmann <arnd@...db.de>; Greg Kroah-Hartman
> > <gregkh@...uxfoundation.org>; Dan Williams <dan.j.williams@...el.com>;
> > Vishal Verma <vishal.l.verma@...el.com>; Dave Jiang
> > <dave.jiang@...el.com>; Ira Weiny <ira.weiny@...el.com>; Andrew Morton
> > <akpm@...ux-foundation.org>; Mauro Carvalho Chehab
> > <mchehab+samsung@...nel.org>; David S. Miller <davem@...emloft.net>;
> > Rob Herring <robh@...nel.org>; Anton Blanchard <anton@...abs.org>;
> > Krzysztof Kozlowski <krzk@...nel.org>; Mahesh Salgaonkar
> > <mahesh@...ux.vnet.ibm.com>; Madhavan Srinivasan
> > <maddy@...ux.vnet.ibm.com>; Cédric Le Goater <clg@...d.org>; Anju T
> > Sudhakar <anju@...ux.vnet.ibm.com>; Hari Bathini
> > <hbathini@...ux.ibm.com>; Thomas Gleixner <tglx@...utronix.de>; Greg
> > Kurz <groug@...d.org>; Nicholas Piggin <npiggin@...il.com>; Masahiro
> > Yamada <yamada.masahiro@...ionext.com>; Alexey Kardashevskiy
> > <aik@...abs.ru>; linux-kernel@...r.kernel.org; linuxppc-
> > dev@...ts.ozlabs.org; linux-nvdimm@...ts.01.org; linux-mm@...ck.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 <alastair@...ilva.org>
> > >
> > > Function declarations don't need externs, remove the existing ones so
> > > they are consistent with newer code
> > >
> > > Signed-off-by: Alastair D'Silva <alastair@...ilva.org>
> > > ---
> > > 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
[...]
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);
[...]
Powered by blists - more mailing lists