From: Heiner Kallweit <hkallweit1@gmail.com>
To: Yinbo Zhu <zhuyinbo@loongson.cn>, Andrew Lunn <andrew@lunn.ch>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Nick Desaulniers <ndesaulniers@google.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org
Subject: Re: [PATCH v2 1/2] modpost: file2alias: fixup mdio alias garbled code in modules.alias
Date: Fri, 26 Nov 2021 11:21:03 +0100 [thread overview]
Message-ID: <c6d37ae0-9ccb-a527-4f55-e96972813a53@gmail.com> (raw)
In-Reply-To: <1637919957-21635-1-git-send-email-zhuyinbo@loongson.cn>
On 26.11.2021 10:45, Yinbo Zhu wrote:
> After module compilation, module alias mechanism will generate a ugly
> mdio modules alias configure if ethernet phy was selected, this patch
> is to fixup mdio alias garbled code.
>
> In addition, that ugly alias configure will cause ethernet phy module
> doens't match udev, phy module auto-load is fail, but add this patch
> that it is well mdio driver alias configure match phy device uevent.
>
I think Andrew asked you for an example already.
For which PHY's the driver isn't auto-loaded?
In addition your commit descriptions are hard to read, especially the
one for patch 2. Could you please try to change them to proper English?
Not being a native speaker myself ..
> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
> ---
> Change in v2:
> Add a MDIO_ANY_ID for considering some special phy device
> which phy id doesn't be read from phy register.
>
>
> include/linux/mod_devicetable.h | 2 ++
> scripts/mod/file2alias.c | 17 +----------------
> 2 files changed, 3 insertions(+), 16 deletions(-)
>
> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> index ae2e75d..7bd23bf 100644
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -595,6 +595,8 @@ struct platform_device_id {
> kernel_ulong_t driver_data;
> };
>
> +#define MDIO_ANY_ID (~0)
> +
> #define MDIO_NAME_SIZE 32
> #define MDIO_MODULE_PREFIX "mdio:"
>
> diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> index 49aba86..63f3149 100644
> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -1027,24 +1027,9 @@ static int do_platform_entry(const char *filename,
> static int do_mdio_entry(const char *filename,
> void *symval, char *alias)
> {
> - int i;
> DEF_FIELD(symval, mdio_device_id, phy_id);
> - DEF_FIELD(symval, mdio_device_id, phy_id_mask);
> -
> alias += sprintf(alias, MDIO_MODULE_PREFIX);
> -
> - for (i = 0; i < 32; i++) {
> - if (!((phy_id_mask >> (31-i)) & 1))
> - *(alias++) = '?';
> - else if ((phy_id >> (31-i)) & 1)
> - *(alias++) = '1';
> - else
> - *(alias++) = '0';
> - }
> -
> - /* Terminate the string */
> - *alias = 0;
> -
> + ADD(alias, "p", phy_id != MDIO_ANY_ID, phy_id);
> return 1;
> }
>
>
next prev parent reply other threads:[~2021-11-26 10:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 9:45 [PATCH v2 1/2] modpost: file2alias: fixup mdio alias garbled code in modules.alias Yinbo Zhu
2021-11-26 9:45 ` [PATCH v2 2/2] net: mdio: fixup ethernet phy module auto-load function Yinbo Zhu
2021-11-26 10:13 ` Russell King (Oracle)
2021-11-26 10:21 ` Heiner Kallweit [this message]
2021-11-30 8:45 ` [PATCH v2 1/2] modpost: file2alias: fixup mdio alias garbled code in modules.alias zhuyinbo
2021-11-30 11:46 ` Russell King (Oracle)
2021-12-01 0:38 ` Andrew Lunn
2021-12-01 9:02 ` Russell King (Oracle)
2021-12-06 2:27 ` zhuyinbo
2021-12-07 9:41 ` zhuyinbo
2021-12-07 11:18 ` Russell King (Oracle)
2022-01-04 13:11 ` zhuyinbo
2022-01-04 13:25 ` Russell King (Oracle)
2022-01-05 3:33 ` zhuyinbo
2022-01-05 9:42 ` Russell King (Oracle)
2022-01-06 3:56 ` zhuyinbo
2022-01-06 12:46 ` Andrew Lunn
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=c6d37ae0-9ccb-a527-4f55-e96972813a53@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=zhuyinbo@loongson.cn \
/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).