lkml.org 
[lkml]   [2020]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs: Add function declaration of simple_dname
On Wed, Aug 19, 2020 at 12:47:55PM +0100, Matthew Wilcox wrote:
> On Wed, Aug 19, 2020 at 02:40:01PM +0300, Leon Romanovsky wrote:
> > On Wed, Aug 19, 2020 at 12:34:24PM +0100, Matthew Wilcox wrote:
> > > On Wed, Aug 19, 2020 at 11:32:59AM +0300, Leon Romanovsky wrote:
> > > > From: Leon Romanovsky <leonro@nvidia.com>
> > > >
> > > > The simple_dname() is declared in internal header file as extern
> > > > and this generates the following GCC warning.
> > >
> > > The fact that it's declared as extern doesn't matter. You don't need
> > > the change to internal.h at all. The use of 'extern' on a function
> > > declaration is purely decorative:
> > >
> > > 5 If the declaration of an identifier for a function has no
> > > storage-class specifier, its linkage is determined exactly as if it
> > > were declared with the storage-class specifier extern.
> >
> > So why do we need to keep extern keyword if we use intenral.h directly?
>
> We don't. It's just personal preference. I don't use extern keywords
> on function declarations anywhere, but Al does and it's rude to change it.

I didn't have any intention to be rude, just like you, I don't use extern keyword.

I'll resend to make a progress.

Thanks

>

\
 
 \ /
  Last update: 2020-08-19 13:59    [W:0.031 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site