From: Jianhui Zhao <zhaojh329@gmail.com>
To: zhaojh329@gmail.com
Cc: andrew@lunn.ch, davem@davemloft.net, edumazet@google.com,
hkallweit1@gmail.com, kuba@kernel.org,
linux-kernel@vger.kernel.org, linux@armlinux.org.uk,
netdev@vger.kernel.org, pabeni@redhat.com
Subject: [PATCH V4] net: phy: Add sysfs attribute for PHY c45 identifiers.
Date: Fri, 16 Jun 2023 21:54:55 +0800 [thread overview]
Message-ID: <20230616135455.1985-1-zhaojh329@gmail.com> (raw)
In-Reply-To: <20230616131246.41989-1-zhaojh329@gmail.com>
>+ 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".
next prev parent reply other threads:[~2023-06-16 13:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-16 13:12 [PATCH V4] net: phy: Add sysfs attribute for PHY c45 identifiers Jianhui Zhao
2023-06-16 13:33 ` Russell King (Oracle)
2023-06-16 13:54 ` Jianhui Zhao [this message]
2023-06-16 14:11 ` Russell King (Oracle)
2023-06-16 14:16 ` Jianhui Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230616135455.1985-1-zhaojh329@gmail.com \
--to=zhaojh329@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).