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: <8fe294eb-4617-48e9-9625-4e3db717d4ef@lunn.ch> Date: Mon, 24 Apr 2023 16:51:12 +0200 From: Andrew Lunn <andrew@...n.ch> To: Alexander Stein <alexander.stein@...tq-group.com> Cc: Heiner Kallweit <hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>, "David S . Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Florian Fainelli <f.fainelli@...il.com>, Christian Marangi <ansuelsmth@...il.com>, netdev@...r.kernel.org Subject: Re: [PATCH 1/1] net: phy: Fix reading LED reg property > $ hexdump -C /sys/firmware/devicetree/base/soc@...us@...00000/ > ethernet@...f0000/mdio/ethernet-phy@...eds/led@...eg > 00000000 00 00 00 02 |....| > 00000004 > > Using of_property_read_u8 will only read the first byte, thus all values of > reg result in 0. Ah! Thanks for the explanation. And the board i tested only had one led, at reg = <0>; so it worked. > > I deliberately used of_property_read_u8() because it will perform a > > range check, and if the value is bigger or smaller than 0-256 it will > > return an error. Your change does not include such range checks, which > > i don't like. > > Sure, I can added this check. Great, thanks. Andrew
Powered by blists - more mailing lists