From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Jianhui Zhao <zhaojh329@gmail.com>
Cc: andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V4] net: phy: Add sysfs attribute for PHY c45 identifiers.
Date: Fri, 16 Jun 2023 14:33:43 +0100 [thread overview]
Message-ID: <ZIxkt3VmmNY2zs1m@shell.armlinux.org.uk> (raw)
In-Reply-To: <20230616131246.41989-1-zhaojh329@gmail.com>
On Fri, Jun 16, 2023 at 09:12:46PM +0800, Jianhui Zhao wrote:
> +static umode_t phy_dev_c45_visible(struct kobject *kobj, struct attribute *attr, int foo)
> +{
> + struct phy_c45_devid_attribute *devattr =
> + (struct phy_c45_devid_attribute *)container_of(attr, struct device_attribute, attr);
1. (struct phy_c45_devid_attribute *) cast is not required.
2. we now have two places that we convert the attribute to a
phy_c45_devid_attribute, it's time for a macro to do that.
> + struct phy_device *phydev = to_phy_device(kobj_to_dev(kobj));
> +
> + if (!phydev->is_c45 || phydev->c45_ids.device_ids[devattr->index] == 0xffffffff)
if (!phydev->is_c45 ||
phydev->c45_ids.device_ids[devattr->index] == 0xffffffff)
And lastly... please don't be so quick to post a new version.
https://www.kernel.org/doc/html/v6.1/process/maintainer-netdev.html#i-have-received-review-feedback-when-should-i-post-a-revised-version-of-the-patches
Particularly the bit about "Do not post a new version of the code if the
discussion about the previous version is still ongoing, unless directly
instructed by a reviewer." is relevent.
You have not given enough time for Andrew to respond to my suggestion
which I invited him to (by "Andrew, any opinions?"), instead rushing
out v4 that implements my suggestion without first waiting to see if
Andrew agrees with it.
This seems to be becoming common place, so I think it's about time I
created a vim macro to insert a boilerplate explaining this process in
every review. :(
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2023-06-16 13:33 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) [this message]
2023-06-16 13:54 ` Jianhui Zhao
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=ZIxkt3VmmNY2zs1m@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--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=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=zhaojh329@gmail.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).