All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2] net: hns: use u32 for register offset in RCB TX coalescing
@ 2026-07-15 12:58 Daniil Iskhakov
  2026-07-24 22:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Daniil Iskhakov @ 2026-07-15 12:58 UTC (permalink / raw)
  To: Jian Shen
  Cc: Daniil Agalakov, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Daniil Iskhakov, netdev,
	linux-kernel, rrv, lvc-project

From: Daniil Agalakov <ade@amicon.ru>

In both hns_rcb_get_tx_coalesced_frames() and
hns_rcb_set_tx_coalesced_frames(), the local variable reg holds a
register offset passed to dsaf_read_dev() or dsaf_write_dev().

Register offsets on this hardware are 32-bit values. Use u32 for reg
to match the register access interfaces and avoid implying that
64-bit offsets are supported.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Daniil Agalakov <ade@amicon.ru>
Signed-off-by: Daniil Iskhakov <dish@amicon.ru>
---
This is an unchanged resend of v1, which missed the previous net-next
development cycle.

Changes in v2:

  - no code changes
  - reword the commit message
  - add my Signed-off-by tag
  - rebase onto the current net-next tree

v1: https://lore.kernel.org/all/20260420144047.2846673-1-ade@amicon.ru/

 drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
index 635b3a95dd82..3c4e4e8ca140 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
@@ -563,7 +563,7 @@ u32 hns_rcb_get_rx_coalesced_frames(
 u32 hns_rcb_get_tx_coalesced_frames(
 	struct rcb_common_cb *rcb_common, u32 port_idx)
 {
-	u64 reg;
+	u32 reg;
 
 	reg = RCB_CFG_PKTLINE_REG + (port_idx + HNS_RCB_TX_PKTLINE_OFFSET) * 4;
 	return dsaf_read_dev(rcb_common, reg);
@@ -634,7 +634,7 @@ int hns_rcb_set_tx_coalesced_frames(
 {
 	u32 old_waterline =
 		hns_rcb_get_tx_coalesced_frames(rcb_common, port_idx);
-	u64 reg;
+	u32 reg;
 
 	if (coalesced_frames == old_waterline)
 		return 0;

base-commit: f6f3b36c15ed44de1fbb44e645e4fae8c4a4453e
-- 
2.43.0


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

* Re: [PATCH net-next v2] net: hns: use u32 for register offset in RCB TX coalescing
  2026-07-15 12:58 [PATCH net-next v2] net: hns: use u32 for register offset in RCB TX coalescing Daniil Iskhakov
@ 2026-07-24 22:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-07-24 22:40 UTC (permalink / raw)
  To: Daniil Iskhakov
  Cc: shenjian15, ade, andrew+netdev, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, rrv, lvc-project

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 15 Jul 2026 15:58:48 +0300 you wrote:
> From: Daniil Agalakov <ade@amicon.ru>
> 
> In both hns_rcb_get_tx_coalesced_frames() and
> hns_rcb_set_tx_coalesced_frames(), the local variable reg holds a
> register offset passed to dsaf_read_dev() or dsaf_write_dev().
> 
> Register offsets on this hardware are 32-bit values. Use u32 for reg
> to match the register access interfaces and avoid implying that
> 64-bit offsets are supported.
> 
> [...]

Here is the summary with links:
  - [net-next,v2] net: hns: use u32 for register offset in RCB TX coalescing
    https://git.kernel.org/netdev/net-next/c/bf8cdde4ef35

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2026-07-24 22:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15 12:58 [PATCH net-next v2] net: hns: use u32 for register offset in RCB TX coalescing Daniil Iskhakov
2026-07-24 22:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.