Re: [PATCH net-next v4 2/3] net: dsa: add Arrow SpeedChips XRS700x driver
From: Vladimir Oltean <olteanv@gmail.com>
Date: 2021-01-14 19:00:47
Also in:
linux-devicetree
On Thu, Jan 14, 2021 at 12:47:46PM -0600, George McCollister wrote:
On Thu, Jan 14, 2021 at 12:32 PM Vladimir Oltean [off-list ref] wrote:quoted
quoted
quoted
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.