From: Heiner Kallweit <hkallweit1@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>, David Miller <davem@davemloft.net>,
Kevin Hilman <khilman@baylibre.com>,
Vivien Didelot <vivien.didelot@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"open list:ARM/Amlogic Meson..."
<linux-amlogic@lists.infradead.org>
Subject: Re: [PATCH net-next v2 1/3] net: phy: remove calls to genphy_config_init
Date: Sat, 17 Aug 2019 12:25:15 +0200
Message-ID: <b2b3c2a0-6bc5-c59e-2dd6-cd6bbaa3b3f7@gmail.com> (raw)
In-Reply-To: <cc12c859-2572-02f9-3303-6a8bffad0a96@gmail.com>
On 16.08.2019 23:58, Florian Fainelli wrote:
> On 8/16/19 1:31 PM, Heiner Kallweit wrote:
>> Supported PHY features are either auto-detected or explicitly set.
>> In both cases calling genphy_config_init isn't needed. All that
>> genphy_config_init does is removing features that are set as
>> supported but can't be auto-detected. Basically it duplicates the
>> code in genphy_read_abilities. Therefore remove such calls from
>> all PHY drivers.
>>
>> v2:
>> - remove call also from new adin PHY driver
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>
> Looks good, just one question below:
>
>> +static int dummy_config_init(struct phy_device *phydev)
>> +{
>> + return 0;
>> +}
>> +
>> static struct mdio_device_id __maybe_unused dp83848_tbl[] = {
>> { TI_DP83848C_PHY_ID, 0xfffffff0 },
>> { NS_DP83848C_PHY_ID, 0xfffffff0 },
>> @@ -113,13 +113,13 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
>>
>> static struct phy_driver dp83848_driver[] = {
>> DP83848_PHY_DRIVER(TI_DP83848C_PHY_ID, "TI DP83848C 10/100 Mbps PHY",
>> - genphy_config_init),
>> + dummy_config_init),
>> DP83848_PHY_DRIVER(NS_DP83848C_PHY_ID, "NS DP83848C 10/100 Mbps PHY",
>> - genphy_config_init),
>> + dummy_config_init),
>> DP83848_PHY_DRIVER(TI_DP83620_PHY_ID, "TI DP83620 10/100 Mbps PHY",
>> dp83848_config_init),
>> DP83848_PHY_DRIVER(TLK10X_PHY_ID, "TI TLK10X 10/100 Mbps PHY",
>> - genphy_config_init),
>> + dummy_config_init),
>
> drv->config_init is an optional callback so you could just either pass
> NULL as an argument to the macro, or simply remove that parameter?
>
Yes, this can be simplified. Let's pass NULL. Thanks!
next prev parent reply index
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 20:30 [PATCH net-next v2 0/3] net: phy: remove genphy_config_init Heiner Kallweit
2019-08-16 20:31 ` [PATCH net-next v2 1/3] net: phy: remove calls to genphy_config_init Heiner Kallweit
2019-08-16 21:58 ` Florian Fainelli
2019-08-17 10:25 ` Heiner Kallweit [this message]
2019-08-16 20:31 ` [PATCH net-next v2 2/3] net: dsa: " Heiner Kallweit
2019-08-16 20:32 ` [PATCH net-next v2 3/3] net: phy: remove genphy_config_init Heiner Kallweit
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=b2b3c2a0-6bc5-c59e-2dd6-cd6bbaa3b3f7@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@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
Netdev Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
netdev@vger.kernel.org
public-inbox-index netdev
Example config snippet for mirrors
Newsgroup available over NNTP:
nntp://nntp.lore.kernel.org/org.kernel.vger.netdev
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git