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: <20160505234033.GJ7972@lunn.ch> Date: Fri, 6 May 2016 01:40:33 +0200 From: Andrew Lunn <andrew@...n.ch> To: Vivien Didelot <vivien.didelot@...oirfairelinux.com> Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, kernel@...oirfairelinux.com, "David S. Miller" <davem@...emloft.net>, Florian Fainelli <f.fainelli@...il.com> Subject: Re: [RFC PATCH net-next 04/20] net: dsa: mv88e6xxx: factorize temperature access > int mv88e6xxx_get_temp(struct dsa_switch *ds, int *temp) > { > struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); > + int err; > + > + if (!mv88e6xxx_has(ps, MV88E6XXX_FLAG_TEMP)) > + return -EOPNOTSUPP; > + > + mutex_lock(&ps->smi_mutex); > > if (mv88e6xxx_6320_family(ps) || mv88e6xxx_6352_family(ps)) > - return mv88e63xx_get_temp(ds, temp); > + err = _mv88e63xx_get_temp(ps, temp); > + else > + err = _mv88e61xx_get_temp(ps, temp); It seems like this should be done with a flag, rather than the family. However, don't spend too much time on this. I plan to rip it all out and put it in the correct place, in the Marvell PHY driver. The temperature sensor is in the PHY, and other Marvell PHYs also have this temperature sensor. Andrew
Powered by blists - more mailing lists