patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v1] net/axgbe: fix the build warninig for GCC-16
@ 2025-11-13 11:30 Venkat Kumar Ande
  2025-11-13 16:41 ` [PATCH v2] net/axgbe: fix the build warning " Venkat Kumar Ande
  0 siblings, 1 reply; 3+ messages in thread
From: Venkat Kumar Ande @ 2025-11-13 11:30 UTC (permalink / raw)
  To: dev; +Cc: Selwin.Sebastian, Venkat Kumar Ande, stable

From: Venkat Kumar Ande <VenkatKumar.Ande@example.com>

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")
Cc: stable@dpdk.org

Signed-off-by: Venkat Kumar Ande <VenkatKumar.Ande@example.com>
---
 drivers/net/axgbe/axgbe_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 31d35ff182..cf3b0d9ef5 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -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


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

* [PATCH v2] net/axgbe: fix the build warning for GCC-16
  2025-11-13 11:30 [PATCH v1] net/axgbe: fix the build warninig for GCC-16 Venkat Kumar Ande
@ 2025-11-13 16:41 ` Venkat Kumar Ande
  2025-11-13 17:33   ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Venkat Kumar Ande @ 2025-11-13 16:41 UTC (permalink / raw)
  To: dev; +Cc: Selwin.Sebastian, Venkat Kumar Ande, stable

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")
Cc: stable@dpdk.org

Signed-off-by: Venkat Kumar Ande <VenkatKumar.Ande@amd.com>
---
 drivers/net/axgbe/axgbe_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 31d35ff182..cf3b0d9ef5 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -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


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

* Re: [PATCH v2] net/axgbe: fix the build warning for GCC-16
  2025-11-13 16:41 ` [PATCH v2] net/axgbe: fix the build warning " Venkat Kumar Ande
@ 2025-11-13 17:33   ` Stephen Hemminger
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2025-11-13 17:33 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: dev, Selwin.Sebastian, stable

On Thu, 13 Nov 2025 22:11:09 +0530
Venkat Kumar Ande <VenkatKumar.Ande@amd.com> wrote:

> 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")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Venkat Kumar Ande <VenkatKumar.Ande@amd.com>
> ---

Queued to next-net

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

end of thread, other threads:[~2025-11-13 17:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-13 11:30 [PATCH v1] net/axgbe: fix the build warninig for GCC-16 Venkat Kumar Ande
2025-11-13 16:41 ` [PATCH v2] net/axgbe: fix the build warning " Venkat Kumar Ande
2025-11-13 17:33   ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).