diff mbox series

[net-next,v10,13/13] net: phy: mediatek: Remove unnecessary outer parens of "supported_triggers" var

Message ID 20240701105417.19941-14-SkyLake.Huang@mediatek.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: phy: mediatek: Introduce mtk-phy-lib and add 2.5Gphy support | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next, async
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 839 this patch: 839
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 14 of 14 maintainers
netdev/build_clang success Errors and warnings before: 846 this patch: 846
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 846 this patch: 846
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 44 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-07-01--21-00 (tests: 665)

Commit Message

SkyLake Huang (黃啟澤) July 1, 2024, 10:54 a.m. UTC
From: "SkyLake.Huang" <skylake.huang@mediatek.com>

This patch removes unnecessary outer parens of "supported_triggers" vars
in mtk-ge.c & mtk-ge-soc.c to improve readability.

Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
---
 drivers/net/phy/mediatek/mtk-ge-soc.c | 16 ++++++++--------
 drivers/net/phy/mediatek/mtk-ge.c     | 16 ++++++++--------
 2 files changed, 16 insertions(+), 16 deletions(-)

Comments

Daniel Golle July 1, 2024, 11:20 a.m. UTC | #1
On Mon, Jul 01, 2024 at 06:54:17PM +0800, Sky Huang wrote:
> From: "SkyLake.Huang" <skylake.huang@mediatek.com>
> 
> This patch removes unnecessary outer parens of "supported_triggers" vars
> in mtk-ge.c & mtk-ge-soc.c to improve readability.
> 
> Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
> ---
> diff --git a/drivers/net/phy/mediatek/mtk-ge.c b/drivers/net/phy/mediatek/mtk-ge.c
> index 90f3990..050a4f7 100644
> --- a/drivers/net/phy/mediatek/mtk-ge.c
> +++ b/drivers/net/phy/mediatek/mtk-ge.c
> @@ -152,14 +152,14 @@ static int mt753x_phy_led_brightness_set(struct phy_device *phydev,
>  }
>  
>  static const unsigned long supported_triggers =
> -	(BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
> -	 BIT(TRIGGER_NETDEV_HALF_DUPLEX) |
> -	 BIT(TRIGGER_NETDEV_LINK)        |
> -	 BIT(TRIGGER_NETDEV_LINK_10)     |
> -	 BIT(TRIGGER_NETDEV_LINK_100)    |
> -	 BIT(TRIGGER_NETDEV_LINK_1000)   |
> -	 BIT(TRIGGER_NETDEV_RX)          |
> -	 BIT(TRIGGER_NETDEV_TX));
> +	BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
> +	BIT(TRIGGER_NETDEV_HALF_DUPLEX) |
> +	BIT(TRIGGER_NETDEV_LINK)        |
> +	BIT(TRIGGER_NETDEV_LINK_10)     |
> +	BIT(TRIGGER_NETDEV_LINK_100)    |
> +	BIT(TRIGGER_NETDEV_LINK_1000)   |
> +	BIT(TRIGGER_NETDEV_RX)          |
> +	BIT(TRIGGER_NETDEV_TX);

Those lines are added within the same series by patch 06/13
("net: phy: mediatek: Hook LED helper functions in mtk-ge.c").
I get and like the idea of doing things one by one, but in this case
instead of editing what you have just added, better move the commit
removing the unnecessary parentheses somewhere before copying them to
the mtk-ge.c driver in patch 6/13.

All the rest looks good to me now.
SkyLake Huang (黃啟澤) July 2, 2024, 4:25 a.m. UTC | #2
On Mon, 2024-07-01 at 12:20 +0100, Daniel Golle wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  On Mon, Jul 01, 2024 at 06:54:17PM +0800, Sky Huang wrote:
> > From: "SkyLake.Huang" <skylake.huang@mediatek.com>
> > 
> > This patch removes unnecessary outer parens of "supported_triggers"
> vars
> > in mtk-ge.c & mtk-ge-soc.c to improve readability.
> > 
> > Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
> > ---
> > diff --git a/drivers/net/phy/mediatek/mtk-ge.c
> b/drivers/net/phy/mediatek/mtk-ge.c
> > index 90f3990..050a4f7 100644
> > --- a/drivers/net/phy/mediatek/mtk-ge.c
> > +++ b/drivers/net/phy/mediatek/mtk-ge.c
> > @@ -152,14 +152,14 @@ static int
> mt753x_phy_led_brightness_set(struct phy_device *phydev,
> >  }
> >  
> >  static const unsigned long supported_triggers =
> > -(BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
> > - BIT(TRIGGER_NETDEV_HALF_DUPLEX) |
> > - BIT(TRIGGER_NETDEV_LINK)        |
> > - BIT(TRIGGER_NETDEV_LINK_10)     |
> > - BIT(TRIGGER_NETDEV_LINK_100)    |
> > - BIT(TRIGGER_NETDEV_LINK_1000)   |
> > - BIT(TRIGGER_NETDEV_RX)          |
> > - BIT(TRIGGER_NETDEV_TX));
> > +BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
> > +BIT(TRIGGER_NETDEV_HALF_DUPLEX) |
> > +BIT(TRIGGER_NETDEV_LINK)        |
> > +BIT(TRIGGER_NETDEV_LINK_10)     |
> > +BIT(TRIGGER_NETDEV_LINK_100)    |
> > +BIT(TRIGGER_NETDEV_LINK_1000)   |
> > +BIT(TRIGGER_NETDEV_RX)          |
> > +BIT(TRIGGER_NETDEV_TX);
> 
> Those lines are added within the same series by patch 06/13
> ("net: phy: mediatek: Hook LED helper functions in mtk-ge.c").
> I get and like the idea of doing things one by one, but in this case
> instead of editing what you have just added, better move the commit
> removing the unnecessary parentheses somewhere before copying them to
> the mtk-ge.c driver in patch 6/13.
> 
> All the rest looks good to me now.

Indeed, I did this on purpose so that patch 13/13 will show that why
mtk-ge-soc.c's & mtk-ge.c's parens around "supported_triggers" var
needs to be removed. However, if this does cause problems for reviewing
and if there's next version for this series, I can move it to patch
6/13.

BRs,
Sky
diff mbox series

Patch

diff --git a/drivers/net/phy/mediatek/mtk-ge-soc.c b/drivers/net/phy/mediatek/mtk-ge-soc.c
index 6d95e7d..6fc989d 100644
--- a/drivers/net/phy/mediatek/mtk-ge-soc.c
+++ b/drivers/net/phy/mediatek/mtk-ge-soc.c
@@ -1224,14 +1224,14 @@  static int mt798x_phy_led_brightness_set(struct phy_device *phydev,
 }
 
 static const unsigned long supported_triggers =
-	(BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
-	 BIT(TRIGGER_NETDEV_HALF_DUPLEX) |
-	 BIT(TRIGGER_NETDEV_LINK)        |
-	 BIT(TRIGGER_NETDEV_LINK_10)     |
-	 BIT(TRIGGER_NETDEV_LINK_100)    |
-	 BIT(TRIGGER_NETDEV_LINK_1000)   |
-	 BIT(TRIGGER_NETDEV_RX)          |
-	 BIT(TRIGGER_NETDEV_TX));
+	BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
+	BIT(TRIGGER_NETDEV_HALF_DUPLEX) |
+	BIT(TRIGGER_NETDEV_LINK)        |
+	BIT(TRIGGER_NETDEV_LINK_10)     |
+	BIT(TRIGGER_NETDEV_LINK_100)    |
+	BIT(TRIGGER_NETDEV_LINK_1000)   |
+	BIT(TRIGGER_NETDEV_RX)          |
+	BIT(TRIGGER_NETDEV_TX);
 
 static int mt798x_phy_led_hw_is_supported(struct phy_device *phydev, u8 index,
 					  unsigned long rules)
diff --git a/drivers/net/phy/mediatek/mtk-ge.c b/drivers/net/phy/mediatek/mtk-ge.c
index 90f3990..050a4f7 100644
--- a/drivers/net/phy/mediatek/mtk-ge.c
+++ b/drivers/net/phy/mediatek/mtk-ge.c
@@ -152,14 +152,14 @@  static int mt753x_phy_led_brightness_set(struct phy_device *phydev,
 }
 
 static const unsigned long supported_triggers =
-	(BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
-	 BIT(TRIGGER_NETDEV_HALF_DUPLEX) |
-	 BIT(TRIGGER_NETDEV_LINK)        |
-	 BIT(TRIGGER_NETDEV_LINK_10)     |
-	 BIT(TRIGGER_NETDEV_LINK_100)    |
-	 BIT(TRIGGER_NETDEV_LINK_1000)   |
-	 BIT(TRIGGER_NETDEV_RX)          |
-	 BIT(TRIGGER_NETDEV_TX));
+	BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
+	BIT(TRIGGER_NETDEV_HALF_DUPLEX) |
+	BIT(TRIGGER_NETDEV_LINK)        |
+	BIT(TRIGGER_NETDEV_LINK_10)     |
+	BIT(TRIGGER_NETDEV_LINK_100)    |
+	BIT(TRIGGER_NETDEV_LINK_1000)   |
+	BIT(TRIGGER_NETDEV_RX)          |
+	BIT(TRIGGER_NETDEV_TX);
 
 static int mt753x_phy_led_hw_is_supported(struct phy_device *phydev, u8 index,
 					  unsigned long rules)