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
| ||
|
Message-ID: <387b3105-2d70-4906-9573-cfac20a55d3a@lunn.ch> Date: Fri, 31 Mar 2023 14:45:01 +0200 From: Andrew Lunn <andrew@...n.ch> To: Arınç ÜNAL <arinc.unal@...nc9.com> Cc: Daniel Golle <daniel@...rotopia.org>, netdev@...r.kernel.org, linux-mediatek@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org, linux@...linux.org.uk, linux-kernel@...r.kernel.org, Florian Fainelli <f.fainelli@...il.com>, Vladimir Oltean <olteanv@...il.com>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Matthias Brugger <matthias.bgg@...il.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, Sean Wang <sean.wang@...iatek.com>, Landen Chao <Landen.Chao@...iatek.com>, DENG Qingfang <dqfext@...il.com>, Philipp Zabel <p.zabel@...gutronix.de>, Sam Shih <Sam.Shih@...iatek.com>, Lorenzo Bianconi <lorenzo@...nel.org>, John Crispin <john@...ozen.org>, Felix Fietkau <nbd@....name>, Luiz Angelo Daros de Luca <luizluca@...il.com> Subject: Re: [PATCH net-next 14/15] net: dsa: mt7530: introduce driver for MT7988 built-in switch > Firstly, all of the functions on the mt7530-mmio driver should be changed > from mt7988_* to mt7530_mmio_*. Same goes for the mt7530-mdio driver too as > some of the functions don't start with mt7530_mdio_*. The MDIO and MMIO > drivers are supposed to be used for the switches the MT7530 DSA driver > supports. The mt7530_ prefix is derived from that. The mmio_ or mdio_ prefix > is derived from, well, the driver itself. There are examples of similar naming schemes in other DSA drivers. For the marvell mv88e6xxx driver, all generic functions use the mv88e6xxx_ prefix. For functions which are specific to a family of marvell switches, we use a prefix for when the feature was introduced. So for example we have mv88e6352_g1_reset(), where that method of resetting the devices was introduced in the mv88e6352. This also gives us some namespace space, so we can also have mv88e6185_g1_reset() which is used for a different family. So i personally don't have a problem using different prefixes within one driver, if it helps with understanding and name space issues. > What I'm going to say next depends on how generic the MMIO and MDIO drivers > are so that they can be used on all MediaTek architecture switches. Let's > say, a new MediaTek switch is introduced. It seems likely that either the > MMIO or MDIO driver will be used to control the switch. Maybe the driver for > this new switch won't be under mt7530.c, like on Realtek, but that doesn't > change the outcome. My experience with silicon vendors is that they like to change the hardware in none backwards compatible ways. So i would actually avoid generic names, it makes it harder to deal with different variants. Andrew
Powered by blists - more mailing lists