On 02/26/20 at 10:01am, Greg Kurz wrote: > On Wed, 26 Feb 2020 19:26:34 +1100 > "Alastair D'Silva" <alast...@d-silva.org> wrote: > > > > -----Original Message----- > > > From: Baoquan He <b...@redhat.com> > > > Sent: Wednesday, 26 February 2020 7:15 PM > > > To: Alastair D'Silva <alast...@au1.ibm.com> > > > Cc: alast...@d-silva.org; Aneesh Kumar K . V > > > <aneesh.ku...@linux.ibm.com>; Oliver O'Halloran <ooh...@gmail.com>; > > > Benjamin Herrenschmidt <b...@kernel.crashing.org>; Paul Mackerras > > > <pau...@samba.org>; Michael Ellerman <m...@ellerman.id.au>; Frederic > > > Barrat <fbar...@linux.ibm.com>; Andrew Donnellan <a...@linux.ibm.com>; > > > Arnd Bergmann <a...@arndb.de>; Greg Kroah-Hartman > > > <gre...@linuxfoundation.org>; Dan Williams <dan.j.willi...@intel.com>; > > > Vishal Verma <vishal.l.ve...@intel.com>; Dave Jiang > > > <dave.ji...@intel.com>; Ira Weiny <ira.we...@intel.com>; Andrew Morton > > > <a...@linux-foundation.org>; Mauro Carvalho Chehab > > > <mchehab+sams...@kernel.org>; David S. Miller <da...@davemloft.net>; > > > Rob Herring <r...@kernel.org>; Anton Blanchard <an...@ozlabs.org>; > > > Krzysztof Kozlowski <k...@kernel.org>; Mahesh Salgaonkar > > > <mah...@linux.vnet.ibm.com>; Madhavan Srinivasan > > > <ma...@linux.vnet.ibm.com>; Cédric Le Goater <c...@kaod.org>; Anju T > > > Sudhakar <a...@linux.vnet.ibm.com>; Hari Bathini > > > <hbath...@linux.ibm.com>; Thomas Gleixner <t...@linutronix.de>; Greg > > > Kurz <gr...@kaod.org>; Nicholas Piggin <npig...@gmail.com>; Masahiro > > > Yamada <yamada.masah...@socionext.com>; Alexey Kardashevskiy > > > <a...@ozlabs.ru>; linux-ker...@vger.kernel.org; linuxppc- > > > d...@lists.ozlabs.org; linux-nvdimm@lists.01.org; linux...@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 <alast...@d-silva.org> > > > > > > > > Function declarations don't need externs, remove the existing ones so > > > > they are consistent with newer code > > > > > > > > Signed-off-by: Alastair D'Silva <alast...@d-silva.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
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 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); > > [...] > _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org