Skip to contentSkip to conversation

net/axgbe: fix the build warninig for GCC-16

PATCH Superseded Venkat Kumar Ande 3 participants 5 messages Nov 13, 2025 – Nov 18, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/axgbe: fix the build warninig for GCC-16

From: Venkat Kumar Ande <[email protected]>

Build warning reported for local variable set and not used on GCC-16. Fix the issue by using the variable for missed register write operation.

../drivers/net/axgbe/axgbe_ethdev.c: In function ‘axgbe_timesync_disable’:
../drivers/net/axgbe/axgbe_ethdev.c:1744:22: warning:
variable ‘mac_tscr’ set but not used [-Wunused-but-set-variable=]

 1744 |         unsigned int mac_tscr = 0;
      |                      ^~~~~~~~

Bugzilla ID: 1819

Fixes e04449488fdb ("net/axgbe: support IEEE 1588 PTP")
---
 drivers/net/axgbe/axgbe_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/net/axgbe/axgbe_ethdev.c +6 -0
index 31d35ff182..cf3b0d9ef5 100644
@@ -1742,6 +1742,7 @@ axgbe_timesync_disable(struct rte_eth_dev *dev)
 {
 	struct axgbe_port *pdata = dev->data->dev_private;
 	unsigned int mac_tscr = 0;
+	unsigned int value = 0;
 
 	/*disable timestamp for all pkts*/
 	AXGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSENALL, 0);
@@ -1751,6 +1752,11 @@ axgbe_timesync_disable(struct rte_eth_dev *dev)
 	AXGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSCFUPDT, 0);
 	/*disable time stamp*/
 	AXGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSENA, 0);
+
+	value = AXGMAC_IOREAD(pdata, MAC_TSCR);
+	value |= mac_tscr;
+	AXGMAC_IOWRITE(pdata, MAC_TSCR, value);
+
 	return 0;
 }
 
Signature · 1 line
2.40.1.windows.1
#1 lore raw

PATCH v2 1/1 net/axgbe: fix the build warning for GCC-16

Build warning reported for local variable set and not used on GCC-16. Fix the issue by using the variable for missed register write operation.

../drivers/net/axgbe/axgbe_ethdev.c: In function ‘axgbe_timesync_disable’:
../drivers/net/axgbe/axgbe_ethdev.c:1744:22: warning:
variable ‘mac_tscr’ set but not used [-Wunused-but-set-variable=]

 1744 |         unsigned int mac_tscr = 0;
      |                      ^~~~~~~~

Bugzilla ID: 1819

Fixes e04449488fdb ("net/axgbe: support IEEE 1588 PTP")
---
 drivers/net/axgbe/axgbe_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/net/axgbe/axgbe_ethdev.c +6 -0
index 31d35ff182..cf3b0d9ef5 100644
@@ -1742,6 +1742,7 @@ axgbe_timesync_disable(struct rte_eth_dev *dev)
 {
 	struct axgbe_port *pdata = dev->data->dev_private;
 	unsigned int mac_tscr = 0;
+	unsigned int value = 0;
 
 	/*disable timestamp for all pkts*/
 	AXGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSENALL, 0);
@@ -1751,6 +1752,11 @@ axgbe_timesync_disable(struct rte_eth_dev *dev)
 	AXGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSCFUPDT, 0);
 	/*disable time stamp*/
 	AXGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSENA, 0);
+
+	value = AXGMAC_IOREAD(pdata, MAC_TSCR);
+	value |= mac_tscr;
+	AXGMAC_IOWRITE(pdata, MAC_TSCR, value);
+
 	return 0;
 }
 
Signature · 1 line
2.40.1.windows.1
#2 lore raw

Re: [PATCH v2] net/axgbe: fix the build warning for GCC-16

Quoted 9 lines · On Thu, 13 Nov 2025 22:11:09 +0530 Venkat Kumar Ande…

Build warning reported for local variable set and not used on GCC-16. Fix the issue by using the variable for missed register write operation.

../drivers/net/axgbe/axgbe_ethdev.c: In function ‘axgbe_timesync_disable’:
../drivers/net/axgbe/axgbe_ethdev.c:1744:22: warning:
variable ‘mac_tscr’ set but not used [-Wunused-but-set-variable=]

 1744 |         unsigned int mac_tscr = 0;
      |                      ^~~~~~~~
Quoted 6 lines

Bugzilla ID: 1819

Fixes e04449488fdb ("net/axgbe: support IEEE 1588 PTP")

---

Queued to next-net

#3 lore raw

Re: [PATCH v2] net/axgbe: fix the build warning for GCC-16

In reply to Venkat Kumar Ande
Quoted 6 lines · On Thu, 13 Nov 2025 22:11:09 +0530 Venkat Kumar Ande…

Build warning reported for local variable set and not used on GCC-16. Fix the issue by using the variable for missed register write operation.

../drivers/net/axgbe/axgbe_ethdev.c: In function ‘axgbe_timesync_disable’:
../drivers/net/axgbe/axgbe_ethdev.c:1744:22: warning:
variable ‘mac_tscr’ set but not used [-Wunused-but-set-variable=]

Quoted 8 lines
 1744 |         unsigned int mac_tscr = 0;
      |                      ^~~~~~~~

Bugzilla ID: 1819

Fixes e04449488fdb ("net/axgbe: support IEEE 1588 PTP")

FYI - mailmap treats mail addresses as case sensitive. Therefore the entry in mailmap ([email protected]) does not match the From or Signed-off-by causing warnings.

Do you want me to fix mailmap or the submission to match?

Acked-by on v2 1/1
#4 lore raw

RE: [PATCH v2] net/axgbe: fix the build warning for GCC-16

In reply to Venkat Kumar Ande

[AMD Official Use Only - AMD Internal Distribution Only]

-----Original Message-----
From: Ande, Venkat Kumar <[email protected]>
Sent: Thursday, November 13, 2025 10:11 PM
To: [email protected]
Cc: Sebastian, Selwin <[email protected]>; Ande, Venkat Kumar <[email protected]>; [email protected]
Subject: [PATCH v2] net/axgbe: fix the build warning for GCC-16

Build warning reported for local variable set and not used on GCC-16. Fix the issue by using the variable for missed register write operation.

../drivers/net/axgbe/axgbe_ethdev.c: In function ‘axgbe_timesync_disable’:
../drivers/net/axgbe/axgbe_ethdev.c:1744:22: warning:
variable ‘mac_tscr’ set but not used [-Wunused-but-set-variable=]

 1744 |         unsigned int mac_tscr = 0;
      |                      ^~~~~~~~

Bugzilla ID: 1819

Fixes e04449488fdb ("net/axgbe: support IEEE 1588 PTP")
---
 drivers/net/axgbe/axgbe_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/net/axgbe/axgbe_ethdev.c +1 -0
index 31d35ff182..cf3b0d9ef5 100644
@@ -1742,6 +1742,7 @@ axgbe_timesync_disable(struct rte_eth_dev *dev)  {
        struct axgbe_port *pdata = dev->data->dev_private;
        unsigned int mac_tscr = 0;
+       unsigned int value = 0;
 
        /*disable timestamp for all pkts*/
        AXGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSENALL, 0); @@ -1751,6 +1752,11 @@ axgbe_timesync_disable(struct rte_eth_dev *dev)
        AXGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSCFUPDT, 0);
        /*disable time stamp*/
        AXGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSENA, 0);
+
+       value = AXGMAC_IOREAD(pdata, MAC_TSCR);
+       value |= mac_tscr;
+       AXGMAC_IOWRITE(pdata, MAC_TSCR, value);
+
        return 0;

}

--
2.40.1.windows.1