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] [day] [month] [year] [list]
Date:   Thu, 14 Jan 2021 21:00:02 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     George McCollister <george.mccollister@...il.com>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Rob Herring <robh@...nel.org>,
        "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        "open list:OPEN FIRMWARE AND..." <devicetree@...r.kernel.org>
Subject: Re: [PATCH net-next v4 2/3] net: dsa: add Arrow SpeedChips XRS700x
 driver

On Thu, Jan 14, 2021 at 12:47:46PM -0600, George McCollister wrote:
> On Thu, Jan 14, 2021 at 12:32 PM Vladimir Oltean <olteanv@...il.com> wrote:
> > > > May boil down to preference too, but I don't believe "dev" is a happy
> > > > name to give to a driver private data structure.
> > >
> > > There are other drivers in the subsystem that do this. If there was a
> > > consistent pattern followed in the subsystem I would have followed it.
> > > Trust me I was a bit frustrated with home much time I spent going
> > > through multiple drivers trying to determine the best practices for
> > > organization, naming, etc.
> > > If it's a big let me know and I'll change it.
> >
> > Funny that you are complaining about consistency in other drivers,
> > because if I count correctly, out of a total of 22 occurrences of
> > struct xrs700x variables in yours, 13 are named priv and 9 are named
> > dev. So you are not even consistent with yourself. But it's not a major
> > issue either way.
> 
> Touché. This ended up happening because I followed the pattern used by
> different drivers in different places. Specifically ksz was using
> regmap to work on multiple buses but wasn't a very clean example for
> much else.
> I'll just change it to priv everywhere.

Don't worry, I know you copied from the micrel ksz driver, I made sure
to complain there as well:
https://lkml.org/lkml/2020/11/12/1344

It's a pretty bad driver to copy from, by the way.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ