Skip to contentSkip to conversation

net: dsa: mv88e6xxx: cosmetic fix

PATCH In review Marek Behún 4 participants 7 messages Mar 19, 2021 – Mar 20, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: mv88e6xxx: cosmetic fix

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.

Fixes de776d0d316f7 ("net: dsa: mv88e6xxx: add support for ...")
---
 drivers/net/dsa/mv88e6xxx/serdes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/dsa/mv88e6xxx/serdes.c +1 -2
index 470856bcd2f3..f96c6ece4d75 100644
@@ -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;
Signature · 1 line
2.26.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · 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.

Fixes de776d0d316f7 ("net: dsa: mv88e6xxx: add support for ...")

Andrew

maintainer
#2 lore raw
In reply to Marek Behún
Quoted 10 lines · 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.

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.

#3 lore raw
Quoted 6 lines · On Fri, 19 Mar 2021 20:58:20 +0200 Vladimir Oltean <[email protected]> wrote:
Quoted 5 lines · 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.

Quoted 8 lines
Quoted 5 lines

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

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.

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

or even better, drop it.

Why better to drop it?

#4 lore raw
Quoted 18 lines · Marek Behún
Quoted 6 lines · On Fri, 19 Mar 2021 20:58:20 +0200 Vladimir Oltean <[email protected]> wrote:
Quoted 5 lines · 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.

Quoted 8 lines
Quoted 5 lines

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

Fixes de776d0d316f7 ("net: dsa: mv88e6xxx: add support for ...")

---

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

Quoted 7 lines

THX, did not know about this.

Quoted 3 lines
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.

Signature · 1 line
Florian
#5 lore raw
Quoted 21 lines · On Fri, 19 Mar 2021 15:14:52 -0700 Florian Fainelli <[email protected]>…
Quoted 20 lines · Marek Behún
Quoted 6 lines · On Fri, 19 Mar 2021 20:58:20 +0200 Vladimir Oltean <[email protected]> wrote:
Quoted 5 lines · 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.

Quoted 8 lines
Quoted 5 lines

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

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.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
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

#6 lore raw
Quoted 28 lines · Marek Behún
Quoted 25 lines · On Fri, 19 Mar 2021 15:14:52 -0700 Florian Fainelli <[email protected]>…
Quoted 24 lines · Marek Behún
Quoted 6 lines · On Fri, 19 Mar 2021 20:58:20 +0200 Vladimir Oltean <[email protected]> wrote:
Quoted 5 lines · 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.

Quoted 8 lines
Quoted 5 lines

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

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.

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

or even better, drop it.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 7 lines

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.

Signature · 1 line
Florian