lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <be53eff275623c55263a2e9b123cd77d453e8778.camel@redhat.com>
Date: Thu, 11 May 2023 15:47:13 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>, 
 Andy Shevchenko <andy.shevchenko@...il.com>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
 <kuba@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: phylink: constify fwnode arguments

On Thu, 2023-05-11 at 12:32 +0100, Russell King (Oracle) wrote:
> On Thu, May 11, 2023 at 01:29:50PM +0200, Paolo Abeni wrote:
> > On Wed, 2023-05-10 at 12:03 +0100, Russell King (Oracle) wrote:
> > > diff --git a/include/linux/phylink.h b/include/linux/phylink.h
> > > index 71755c66c162..02c777ad18f2 100644
> > > --- a/include/linux/phylink.h
> > > +++ b/include/linux/phylink.h
> > > @@ -568,7 +568,8 @@ void phylink_generic_validate(struct phylink_config *config,
> > >  			      unsigned long *supported,
> > >  			      struct phylink_link_state *state);
> > >  
> > > -struct phylink *phylink_create(struct phylink_config *, struct fwnode_handle *,
> > > +struct phylink *phylink_create(struct phylink_config *,
> > > +			       const struct fwnode_handle *,
> > 
> > While touching the above, could you please also add the missing params
> > name, to keep checkpatch happy and be consistent with the others
> > arguments?
> 
> For interest, when did naming parameters in a prototype become a
> requirement?

I would not call it a general requirement, but in this specific case we
have 2 named params and 2 unnamed ones for the same function, which
looks not good to me. Since you are touching that function definition
and checkpatch is complaining about the above, I think it would be
better to make the function declaration self-consistent.

Looking again at the checkpatch warning, that is possibly a false
positive - git history hints such check should apply only to function
definition, not declaration. 

I still think it would be better removing the mixed unnamed/named
params usage.

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ