All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: mv88e6xxx: cosmetic fix
@ 2021-03-19 14:31 Marek Behún
  2021-03-19 18:35 ` Andrew Lunn
  2021-03-19 18:58 ` Vladimir Oltean
  0 siblings, 2 replies; 7+ messages in thread
From: Marek Behún @ 2021-03-19 14:31 UTC (permalink / raw)
  To: netdev, davem, kuba; +Cc: Marek Behún

We know that the `lane == MV88E6393X_PORT0_LANE`, so we can pass `lane`
to mv88e6390_serdes_read() instead of MV88E6393X_PORT0_LANE.

All other occurances in this function are using the `lane` variable.

It seems I forgot to change it at this one place after refactoring.

Signed-off-by: Marek Behún <kabel@kernel.org>
Fixes: de776d0d316f7 ("net: dsa: mv88e6xxx: add support for ...")
---
 drivers/net/dsa/mv88e6xxx/serdes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/dsa/mv88e6xxx/serdes.c b/drivers/net/dsa/mv88e6xxx/serdes.c
index 470856bcd2f3..f96c6ece4d75 100644
--- a/drivers/net/dsa/mv88e6xxx/serdes.c
+++ b/drivers/net/dsa/mv88e6xxx/serdes.c
@@ -1285,8 +1285,7 @@ static int mv88e6393x_serdes_port_errata(struct mv88e6xxx_chip *chip, int lane)
 	 * powered up (the bit is cleared), so power it down.
 	 */
 	if (lane == MV88E6393X_PORT0_LANE) {
-		err = mv88e6390_serdes_read(chip, MV88E6393X_PORT0_LANE,
-					    MDIO_MMD_PHYXS,
+		err = mv88e6390_serdes_read(chip, lane, MDIO_MMD_PHYXS,
 					    MV88E6393X_SERDES_POC, &reg);
 		if (err)
 			return err;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: dsa: mv88e6xxx: cosmetic fix
  2021-03-19 14:31 [PATCH net-next] net: dsa: mv88e6xxx: cosmetic fix Marek Behún
@ 2021-03-19 18:35 ` Andrew Lunn
  2021-03-19 18:58 ` Vladimir Oltean
  1 sibling, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2021-03-19 18:35 UTC (permalink / raw)
  To: Marek Behún; +Cc: netdev, davem, kuba

On Fri, Mar 19, 2021 at 03:31:49PM +0100, Marek Behún wrote:
> We know that the `lane == MV88E6393X_PORT0_LANE`, so we can pass `lane`
> to mv88e6390_serdes_read() instead of MV88E6393X_PORT0_LANE.
> 
> All other occurances in this function are using the `lane` variable.
> 
> It seems I forgot to change it at this one place after refactoring.
> 
> Signed-off-by: Marek Behún <kabel@kernel.org>
> Fixes: de776d0d316f7 ("net: dsa: mv88e6xxx: add support for ...")

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: dsa: mv88e6xxx: cosmetic fix
  2021-03-19 14:31 [PATCH net-next] net: dsa: mv88e6xxx: cosmetic fix Marek Behún
  2021-03-19 18:35 ` Andrew Lunn
@ 2021-03-19 18:58 ` Vladimir Oltean
  2021-03-19 19:47   ` Marek Behún
  1 sibling, 1 reply; 7+ messages in thread
From: Vladimir Oltean @ 2021-03-19 18:58 UTC (permalink / raw)
  To: Marek Behún; +Cc: netdev, davem, kuba

On Fri, Mar 19, 2021 at 03:31:49PM +0100, Marek Behún wrote:
> We know that the `lane == MV88E6393X_PORT0_LANE`, so we can pass `lane`
> to mv88e6390_serdes_read() instead of MV88E6393X_PORT0_LANE.
> 
> All other occurances in this function are using the `lane` variable.
> 
> It seems I forgot to change it at this one place after refactoring.
> 
> Signed-off-by: Marek Behún <kabel@kernel.org>
> Fixes: de776d0d316f7 ("net: dsa: mv88e6xxx: add support for ...")
> ---

Either do the Fixes tag according to the documented convention:
git show de776d0d316f7 --pretty=fixes

Fixes: de776d0d316f ("net: dsa: mv88e6xxx: add support for mv88e6393x family")

or even better, drop it.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: dsa: mv88e6xxx: cosmetic fix
  2021-03-19 18:58 ` Vladimir Oltean
@ 2021-03-19 19:47   ` Marek Behún
  2021-03-19 22:14     ` Florian Fainelli
  0 siblings, 1 reply; 7+ messages in thread
From: Marek Behún @ 2021-03-19 19:47 UTC (permalink / raw)
  To: Vladimir Oltean; +Cc: netdev, davem, kuba

On Fri, 19 Mar 2021 20:58:20 +0200
Vladimir Oltean <olteanv@gmail.com> wrote:

> On Fri, Mar 19, 2021 at 03:31:49PM +0100, Marek Behún wrote:
> > We know that the `lane == MV88E6393X_PORT0_LANE`, so we can pass `lane`
> > to mv88e6390_serdes_read() instead of MV88E6393X_PORT0_LANE.
> > 
> > All other occurances in this function are using the `lane` variable.
> > 
> > It seems I forgot to change it at this one place after refactoring.
> > 
> > Signed-off-by: Marek Behún <kabel@kernel.org>
> > Fixes: de776d0d316f7 ("net: dsa: mv88e6xxx: add support for ...")
> > ---  
> 
> Either do the Fixes tag according to the documented convention:
> git show de776d0d316f7 --pretty=fixes

THX, did not know about this.

> Fixes: de776d0d316f ("net: dsa: mv88e6xxx: add support for mv88e6393x family")
>
> or even better, drop it.

Why better to drop it?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: dsa: mv88e6xxx: cosmetic fix
  2021-03-19 19:47   ` Marek Behún
@ 2021-03-19 22:14     ` Florian Fainelli
  2021-03-19 22:54       ` Marek Behún
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Fainelli @ 2021-03-19 22:14 UTC (permalink / raw)
  To: Marek Behún, Vladimir Oltean; +Cc: netdev, davem, kuba



On 3/19/2021 12:47 PM, Marek Behún wrote:
> On Fri, 19 Mar 2021 20:58:20 +0200
> Vladimir Oltean <olteanv@gmail.com> wrote:
> 
>> On Fri, Mar 19, 2021 at 03:31:49PM +0100, Marek Behún wrote:
>>> We know that the `lane == MV88E6393X_PORT0_LANE`, so we can pass `lane`
>>> to mv88e6390_serdes_read() instead of MV88E6393X_PORT0_LANE.
>>>
>>> All other occurances in this function are using the `lane` variable.
>>>
>>> It seems I forgot to change it at this one place after refactoring.
>>>
>>> Signed-off-by: Marek Behún <kabel@kernel.org>
>>> Fixes: de776d0d316f7 ("net: dsa: mv88e6xxx: add support for ...")
>>> ---  
>>
>> Either do the Fixes tag according to the documented convention:
>> git show de776d0d316f7 --pretty=fixes
> 
> THX, did not know about this.
> 
>> Fixes: de776d0d316f ("net: dsa: mv88e6xxx: add support for mv88e6393x family")
>>
>> or even better, drop it.
> 
> Why better to drop it?

To differentiate an essential/functional fix from a cosmetic fix. If all
cosmetic fixes got Fixes: tag that would get out of hands quickly.
-- 
Florian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: dsa: mv88e6xxx: cosmetic fix
  2021-03-19 22:14     ` Florian Fainelli
@ 2021-03-19 22:54       ` Marek Behún
  2021-03-20  0:46         ` Florian Fainelli
  0 siblings, 1 reply; 7+ messages in thread
From: Marek Behún @ 2021-03-19 22:54 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: Vladimir Oltean, netdev, davem, kuba

On Fri, 19 Mar 2021 15:14:52 -0700
Florian Fainelli <f.fainelli@gmail.com> wrote:

> On 3/19/2021 12:47 PM, Marek Behún wrote:
> > On Fri, 19 Mar 2021 20:58:20 +0200
> > Vladimir Oltean <olteanv@gmail.com> wrote:
> >   
> >> On Fri, Mar 19, 2021 at 03:31:49PM +0100, Marek Behún wrote:  
> >>> We know that the `lane == MV88E6393X_PORT0_LANE`, so we can pass `lane`
> >>> to mv88e6390_serdes_read() instead of MV88E6393X_PORT0_LANE.
> >>>
> >>> All other occurances in this function are using the `lane` variable.
> >>>
> >>> It seems I forgot to change it at this one place after refactoring.
> >>>
> >>> Signed-off-by: Marek Behún <kabel@kernel.org>
> >>> Fixes: de776d0d316f7 ("net: dsa: mv88e6xxx: add support for ...")
> >>> ---    
> >>
> >> Either do the Fixes tag according to the documented convention:
> >> git show de776d0d316f7 --pretty=fixes  
> > 
> > THX, did not know about this.
> >   
> >> Fixes: de776d0d316f ("net: dsa: mv88e6xxx: add support for mv88e6393x family")
> >>
> >> or even better, drop it.  
> > 
> > Why better to drop it?  
> 
> To differentiate an essential/functional fix from a cosmetic fix. If all
> cosmetic fixes got Fixes: tag that would get out of hands quickly.

IMO in this case the Fixes tag is not necessary beacuse the base commit
is not in any stable kernel yet.

But if the base commit was in a stable kernel already, and this
cosmetic fix was sent into net-next / net, I think the Fixes tag should
be there, in order for it to get applied into stable releases so that
future fixes could be applied cleanly.

Or am I wrong? This is how I understand this whole system...

Marek

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: dsa: mv88e6xxx: cosmetic fix
  2021-03-19 22:54       ` Marek Behún
@ 2021-03-20  0:46         ` Florian Fainelli
  0 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2021-03-20  0:46 UTC (permalink / raw)
  To: Marek Behún; +Cc: Vladimir Oltean, netdev, davem, kuba



On 3/19/2021 3:54 PM, Marek Behún wrote:
> On Fri, 19 Mar 2021 15:14:52 -0700
> Florian Fainelli <f.fainelli@gmail.com> wrote:
> 
>> On 3/19/2021 12:47 PM, Marek Behún wrote:
>>> On Fri, 19 Mar 2021 20:58:20 +0200
>>> Vladimir Oltean <olteanv@gmail.com> wrote:
>>>   
>>>> On Fri, Mar 19, 2021 at 03:31:49PM +0100, Marek Behún wrote:  
>>>>> We know that the `lane == MV88E6393X_PORT0_LANE`, so we can pass `lane`
>>>>> to mv88e6390_serdes_read() instead of MV88E6393X_PORT0_LANE.
>>>>>
>>>>> All other occurances in this function are using the `lane` variable.
>>>>>
>>>>> It seems I forgot to change it at this one place after refactoring.
>>>>>
>>>>> Signed-off-by: Marek Behún <kabel@kernel.org>
>>>>> Fixes: de776d0d316f7 ("net: dsa: mv88e6xxx: add support for ...")
>>>>> ---    
>>>>
>>>> Either do the Fixes tag according to the documented convention:
>>>> git show de776d0d316f7 --pretty=fixes  
>>>
>>> THX, did not know about this.
>>>   
>>>> Fixes: de776d0d316f ("net: dsa: mv88e6xxx: add support for mv88e6393x family")
>>>>
>>>> or even better, drop it.  
>>>
>>> Why better to drop it?  
>>
>> To differentiate an essential/functional fix from a cosmetic fix. If all
>> cosmetic fixes got Fixes: tag that would get out of hands quickly.
> 
> IMO in this case the Fixes tag is not necessary beacuse the base commit
> is not in any stable kernel yet.

This is not necessarily an argument that I would use, even if the commit
you are fixing is only in net-next, when it is a functional, and the
emphasis on the functional aspect of the code, providing a Fixes: tag is
really nice as it allows people that do backports or else to identify
the commits as an ensemble.

> 
> But if the base commit was in a stable kernel already, and this
> cosmetic fix was sent into net-next / net, I think the Fixes tag should
> be there, in order for it to get applied into stable releases so that
> future fixes could be applied cleanly.
> 
> Or am I wrong? This is how I understand this whole system...

Your reasoning is not wrong, for cosmetic changes that do not result in
functional changes, I would say that the Fixes: is optional.
-- 
Florian

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-03-20  0:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 14:31 [PATCH net-next] net: dsa: mv88e6xxx: cosmetic fix Marek Behún
2021-03-19 18:35 ` Andrew Lunn
2021-03-19 18:58 ` Vladimir Oltean
2021-03-19 19:47   ` Marek Behún
2021-03-19 22:14     ` Florian Fainelli
2021-03-19 22:54       ` Marek Behún
2021-03-20  0:46         ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.