Skip to contentSkip to conversation

net: stmmac: Drop redundant dwxgmac_tc_ops variable

PATCH Applied Furong Xu 5 participants 5 messages Dec 12, 2024 – Dec 14, 2024

Subsystems (4)
lore
Share & tools
lore

Furong Xu

author
#0 lore raw

PATCH 1/1 net: stmmac: Drop redundant dwxgmac_tc_ops variable

dwmac510_tc_ops and dwxgmac_tc_ops are completely identical, keep dwmac510_tc_ops to provide better backward compatibility.

---
 drivers/net/ethernet/stmicro/stmmac/hwif.c      |  4 ++--
 drivers/net/ethernet/stmicro/stmmac/hwif.h      |  1 -
 drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 11 -----------
 3 files changed, 2 insertions(+), 14 deletions(-)
drivers/net/ethernet/stmicro/stmmac/hwif.c +2 -2
index 4bd79de2e222..31bdbab9a46c 100644
@@ -267,7 +267,7 @@ static const struct stmmac_hwif_entry {
 		.hwtimestamp = &stmmac_ptp,
 		.ptp = &stmmac_ptp_clock_ops,
 		.mode = NULL,
-		.tc = &dwxgmac_tc_ops,
+		.tc = &dwmac510_tc_ops,
 		.mmc = &dwxgmac_mmc_ops,
 		.est = &dwmac510_est_ops,
 		.setup = dwxgmac2_setup,
@@ -290,7 +290,7 @@ static const struct stmmac_hwif_entry {
 		.hwtimestamp = &stmmac_ptp,
 		.ptp = &stmmac_ptp_clock_ops,
 		.mode = NULL,
-		.tc = &dwxgmac_tc_ops,
+		.tc = &dwmac510_tc_ops,
 		.mmc = &dwxgmac_mmc_ops,
 		.est = &dwmac510_est_ops,
 		.setup = dwxlgmac2_setup,
drivers/net/ethernet/stmicro/stmmac/hwif.h +0 -1
index e428c82b7d31..2f7295b6c1c5 100644
@@ -685,7 +685,6 @@ extern const struct stmmac_dma_ops dwmac410_dma_ops;
 extern const struct stmmac_ops dwmac510_ops;
 extern const struct stmmac_tc_ops dwmac4_tc_ops;
 extern const struct stmmac_tc_ops dwmac510_tc_ops;
-extern const struct stmmac_tc_ops dwxgmac_tc_ops;
 
 #define GMAC_VERSION		0x00000020	/* GMAC CORE Version */
 #define GMAC4_VERSION		0x00000110	/* GMAC4+ CORE Version */
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +0 -11
index 6a79e6a111ed..694d6ee14381 100644
@@ -1284,14 +1284,3 @@ const struct stmmac_tc_ops dwmac510_tc_ops = {
 	.query_caps = tc_query_caps,
 	.setup_mqprio = tc_setup_dwmac510_mqprio,
 };
-
-const struct stmmac_tc_ops dwxgmac_tc_ops = {
-	.init = tc_init,
-	.setup_cls_u32 = tc_setup_cls_u32,
-	.setup_cbs = tc_setup_cbs,
-	.setup_cls = tc_setup_cls,
-	.setup_taprio = tc_setup_taprio,
-	.setup_etf = tc_setup_etf,
-	.query_caps = tc_query_caps,
-	.setup_mqprio = tc_setup_dwmac510_mqprio,
-};
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 53 lines · Furong Xu

dwmac510_tc_ops and dwxgmac_tc_ops are completely identical, keep dwmac510_tc_ops to provide better backward compatibility.

---
 drivers/net/ethernet/stmicro/stmmac/hwif.c      |  4 ++--
 drivers/net/ethernet/stmicro/stmmac/hwif.h      |  1 -
 drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 11 -----------
 3 files changed, 2 insertions(+), 14 deletions(-)
drivers/net/ethernet/stmicro/stmmac/hwif.c +2 -2
index 4bd79de2e222..31bdbab9a46c 100644
@@ -267,7 +267,7 @@ static const struct stmmac_hwif_entry {
 		.hwtimestamp = &stmmac_ptp,
 		.ptp = &stmmac_ptp_clock_ops,
 		.mode = NULL,
-		.tc = &dwxgmac_tc_ops,
+		.tc = &dwmac510_tc_ops,
 		.mmc = &dwxgmac_mmc_ops,
 		.est = &dwmac510_est_ops,
 		.setup = dwxgmac2_setup,
@@ -290,7 +290,7 @@ static const struct stmmac_hwif_entry {
 		.hwtimestamp = &stmmac_ptp,
 		.ptp = &stmmac_ptp_clock_ops,
 		.mode = NULL,
-		.tc = &dwxgmac_tc_ops,
+		.tc = &dwmac510_tc_ops,
 		.mmc = &dwxgmac_mmc_ops,
 		.est = &dwmac510_est_ops,
 		.setup = dwxlgmac2_setup,
drivers/net/ethernet/stmicro/stmmac/hwif.h +0 -1
index e428c82b7d31..2f7295b6c1c5 100644
@@ -685,7 +685,6 @@ extern const struct stmmac_dma_ops dwmac410_dma_ops;
 extern const struct stmmac_ops dwmac510_ops;
 extern const struct stmmac_tc_ops dwmac4_tc_ops;
 extern const struct stmmac_tc_ops dwmac510_tc_ops;
-extern const struct stmmac_tc_ops dwxgmac_tc_ops;
 
 #define GMAC_VERSION		0x00000020	/* GMAC CORE Version */
 #define GMAC4_VERSION		0x00000110	/* GMAC4+ CORE Version */
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +0 -1
index 6a79e6a111ed..694d6ee14381 100644
@@ -1284,14 +1284,3 @@ const struct stmmac_tc_ops dwmac510_tc_ops = {
 	.query_caps = tc_query_caps,
 	.setup_mqprio = tc_setup_dwmac510_mqprio,
 };
-

drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c const struct stmmac_tc_ops dwmac510_tc_ops = { · line 1297

Quoted 10 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +0 -10
-const struct stmmac_tc_ops dwxgmac_tc_ops = {
-	.init = tc_init,
-	.setup_cls_u32 = tc_setup_cls_u32,
-	.setup_cbs = tc_setup_cbs,
-	.setup_cls = tc_setup_cls,
-	.setup_taprio = tc_setup_taprio,
-	.setup_etf = tc_setup_etf,
-	.query_caps = tc_query_caps,
-	.setup_mqprio = tc_setup_dwmac510_mqprio,
-};

LGTM

Thanks

Quoted 2 lines
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#3 lore raw
In reply to Furong Xu
Quoted 53 lines · Furong Xu

dwmac510_tc_ops and dwxgmac_tc_ops are completely identical, keep dwmac510_tc_ops to provide better backward compatibility.

---
  drivers/net/ethernet/stmicro/stmmac/hwif.c      |  4 ++--
  drivers/net/ethernet/stmicro/stmmac/hwif.h      |  1 -
  drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 11 -----------
  3 files changed, 2 insertions(+), 14 deletions(-)
drivers/net/ethernet/stmicro/stmmac/hwif.c +2 -2
index 4bd79de2e222..31bdbab9a46c 100644
@@ -267,7 +267,7 @@ static const struct stmmac_hwif_entry {
  		.hwtimestamp = &stmmac_ptp,
  		.ptp = &stmmac_ptp_clock_ops,
  		.mode = NULL,
-		.tc = &dwxgmac_tc_ops,
+		.tc = &dwmac510_tc_ops,
  		.mmc = &dwxgmac_mmc_ops,
  		.est = &dwmac510_est_ops,
  		.setup = dwxgmac2_setup,
@@ -290,7 +290,7 @@ static const struct stmmac_hwif_entry {
  		.hwtimestamp = &stmmac_ptp,
  		.ptp = &stmmac_ptp_clock_ops,
  		.mode = NULL,
-		.tc = &dwxgmac_tc_ops,
+		.tc = &dwmac510_tc_ops,
  		.mmc = &dwxgmac_mmc_ops,
  		.est = &dwmac510_est_ops,
  		.setup = dwxlgmac2_setup,
drivers/net/ethernet/stmicro/stmmac/hwif.h +0 -1
index e428c82b7d31..2f7295b6c1c5 100644
@@ -685,7 +685,6 @@ extern const struct stmmac_dma_ops dwmac410_dma_ops;
  extern const struct stmmac_ops dwmac510_ops;
  extern const struct stmmac_tc_ops dwmac4_tc_ops;
  extern const struct stmmac_tc_ops dwmac510_tc_ops;
-extern const struct stmmac_tc_ops dwxgmac_tc_ops;
 
  #define GMAC_VERSION		0x00000020	/* GMAC CORE Version */
  #define GMAC4_VERSION		0x00000110	/* GMAC4+ CORE Version */
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +0 -1
index 6a79e6a111ed..694d6ee14381 100644
@@ -1284,14 +1284,3 @@ const struct stmmac_tc_ops dwmac510_tc_ops = {
  	.query_caps = tc_query_caps,
  	.setup_mqprio = tc_setup_dwmac510_mqprio,
  };
-

drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c const struct stmmac_tc_ops dwmac510_tc_ops = { · line 1297

Quoted 10 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +0 -10
-const struct stmmac_tc_ops dwxgmac_tc_ops = {
-	.init = tc_init,
-	.setup_cls_u32 = tc_setup_cls_u32,
-	.setup_cbs = tc_setup_cbs,
-	.setup_cls = tc_setup_cls,
-	.setup_taprio = tc_setup_taprio,
-	.setup_etf = tc_setup_etf,
-	.query_caps = tc_query_caps,
-	.setup_mqprio = tc_setup_dwmac510_mqprio,
-};
#4 lore raw
In reply to Furong Xu
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Thu, 12 Dec 2024 11:33:25 +0800 you wrote:

dwmac510_tc_ops and dwxgmac_tc_ops are completely identical, keep dwmac510_tc_ops to provide better backward compatibility.

---
 drivers/net/ethernet/stmicro/stmmac/hwif.c      |  4 ++--
 drivers/net/ethernet/stmicro/stmmac/hwif.h      |  1 -
 drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 11 -----------
 3 files changed, 2 insertions(+), 14 deletions(-)

Here is the summary with links:
- [net-next,v1] net: stmmac: Drop redundant dwxgmac_tc_ops variable

    https://git.kernel.org/netdev/net-next/c/9bc5c9515b48

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html