mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Giulio Benetti <giulio.benetti@benettiengineering.com>
To: Simon Horman <simon.horman@corigine.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Broadcom internal kernel review list 
	<bcm-kernel-feedback-list@broadcom.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: phy: broadcom: drop brcm_phy_setbits() and use phy_set_bits() instead
Date: Thu, 22 Jun 2023 20:50:47 +0200	[thread overview]
Message-ID: <ec6fbaae-323e-5986-3930-a62fa365193a@benettiengineering.com> (raw)
In-Reply-To: <ZJRqMLepCTPqvCD9@corigine.com>

Hi Simon,

On 22/06/23 17:35, Simon Horman wrote:
> On Thu, Jun 22, 2023 at 02:48:46PM +0200, Giulio Benetti wrote:
>> Pardon,
>>
>> On 22/06/23 14:37, Giulio Benetti wrote:
>>> Linux provides phy_set_bits() helper so let's drop brcm_phy_setbits() and
>>> use phy_set_bits() in its place.
>>>
>>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>> ---
>>>    drivers/net/phy/broadcom.c | 15 ++-------------
>>>    1 file changed, 2 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
>>> index ad71c88c87e7..d684c5be529a 100644
>>> --- a/drivers/net/phy/broadcom.c
>>> +++ b/drivers/net/phy/broadcom.c
>>> @@ -608,17 +608,6 @@ static int bcm54616s_read_status(struct phy_device *phydev)
>>>    	return err;
>>>    }
>>> -static int brcm_phy_setbits(struct phy_device *phydev, int reg, int set)
>>> -{
>>> -	int val;
>>> -
>>> -	val = phy_read(phydev, reg);
>>> -	if (val < 0)
>>> -		return val;
>>> -
>>> -	return phy_write(phydev, reg, val | set);
>>> -}
>>> -
>>>    static int brcm_fet_config_init(struct phy_device *phydev)
>>>    {
>>>    	int reg, err, err2, brcmtest;
>>> @@ -689,14 +678,14 @@ static int brcm_fet_config_init(struct phy_device *phydev)
>>>    		goto done;
>>>    	/* Enable auto MDIX */
>>> -	err = brcm_phy_setbits(phydev, MII_BRCM_FET_SHDW_MISCCTRL,
>>> +	err = phy_set_bits(phydev, MII_BRCM_FET_SHDW_MISCCTRL,
>>>    				       MII_BRCM_FET_SHDW_MC_FAME);
>>
>> I've missed to checkpatch.pl and there is a style error ^^^
>>
>>>    	if (err < 0)
>>>    		goto done;
>>>    	if (phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE) {
>>>    		/* Enable auto power down */
>>> -		err = brcm_phy_setbits(phydev, MII_BRCM_FET_SHDW_AUXSTAT2,
>>> +		err = phy_set_bits(phydev, MII_BRCM_FET_SHDW_AUXSTAT2,
>>>    					       MII_BRCM_FET_SHDW_AS2_APDE);
>>
>>                                        and here ^^^
>>
>> I wait some time for any feedback and then I send a V2.
> 
> Hi Giulio,
> 
> Please include the target tree, net-next, when you send v2:
> 
> 	Subject: [PATCH net-next v2] ...

Thank you,

I've just sent the v2 in reply to this.

Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas

      parent reply	other threads:[~2023-06-22 18:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 12:37 Giulio Benetti
2023-06-22 12:48 ` Giulio Benetti
2023-06-22 15:35   ` Simon Horman
2023-06-22 18:47     ` [PATCH net-next v2] " Giulio Benetti
2023-06-23  7:31       ` Simon Horman
2023-06-23  9:25       ` Florian Fainelli
2023-06-24 22:10       ` patchwork-bot+netdevbpf
2023-06-22 18:50     ` Giulio Benetti [this message]

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=ec6fbaae-323e-5986-3930-a62fa365193a@benettiengineering.com \
    --to=giulio.benetti@benettiengineering.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.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 \
    --cc=simon.horman@corigine.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

all inboxes | Powered by JetHome®