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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230616135455.1985-1-zhaojh329@gmail.com>
Date:   Fri, 16 Jun 2023 21:54:55 +0800
From:   Jianhui Zhao <zhaojh329@...il.com>
To:     zhaojh329@...il.com
Cc:     andrew@...n.ch, davem@...emloft.net, edumazet@...gle.com,
        hkallweit1@...il.com, kuba@...nel.org,
        linux-kernel@...r.kernel.org, linux@...linux.org.uk,
        netdev@...r.kernel.org, pabeni@...hat.com
Subject: [PATCH V4] net: phy: Add sysfs attribute for PHY c45 identifiers.

>+	struct phy_c45_devid_attribute *devattr =
>+		container_of(attr, struct phy_c45_devid_attribute, attr);

>+	struct phy_c45_devid_attribute *devattr =
>+		(struct phy_c45_devid_attribute *)container_of(attr, struct device_attribute, attr);

The two conversions is not same.
One is convert "struct device_attribute" to "struct phy_c45_devid_attribute",
and another one is convert "struct attribute" to "struct phy_c45_devid_attribute".
The second one must cast "struct device_attribute" returned from container_of
to "struct phy_c45_devid_attribute".

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ