kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] mlxsw: spectrum_buffers: silence uninitialized warning
@ 2021-10-06  7:33 Dan Carpenter
  2021-10-06 10:04 ` Ido Schimmel
  2021-10-06 14:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-10-06  7:33 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: Ido Schimmel, David S. Miller, Jakub Kicinski, netdev, kernel-janitors

Static checkers and runtime checkers such as KMSan will complain that
we do not initialize the last 6 bytes of "cb_priv".  The caller only
uses the first two bytes so it doesn't cause a runtime issue.  Still
worth fixing though.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
index 9de160e740b2..d78cf5a7220a 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
@@ -1583,7 +1583,7 @@ int mlxsw_sp_sb_occ_snapshot(struct mlxsw_core *mlxsw_core,
 {
 	struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core);
 	struct mlxsw_sp_sb_sr_occ_query_cb_ctx cb_ctx;
-	unsigned long cb_priv;
+	unsigned long cb_priv = 0;
 	LIST_HEAD(bulk_list);
 	char *sbsr_pl;
 	u8 masked_count;
-- 
2.20.1


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

* Re: [PATCH net-next] mlxsw: spectrum_buffers: silence uninitialized warning
  2021-10-06  7:33 [PATCH net-next] mlxsw: spectrum_buffers: silence uninitialized warning Dan Carpenter
@ 2021-10-06 10:04 ` Ido Schimmel
  2021-10-06 14:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Ido Schimmel @ 2021-10-06 10:04 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Jiri Pirko, Ido Schimmel, David S. Miller, Jakub Kicinski,
	netdev, kernel-janitors

On Wed, Oct 06, 2021 at 10:33:47AM +0300, Dan Carpenter wrote:
> Static checkers and runtime checkers such as KMSan will complain that
> we do not initialize the last 6 bytes of "cb_priv".  The caller only
> uses the first two bytes so it doesn't cause a runtime issue.  Still
> worth fixing though.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

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

* Re: [PATCH net-next] mlxsw: spectrum_buffers: silence uninitialized warning
  2021-10-06  7:33 [PATCH net-next] mlxsw: spectrum_buffers: silence uninitialized warning Dan Carpenter
  2021-10-06 10:04 ` Ido Schimmel
@ 2021-10-06 14:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-06 14:30 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: jiri, idosch, davem, kuba, netdev, kernel-janitors

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 6 Oct 2021 10:33:47 +0300 you wrote:
> Static checkers and runtime checkers such as KMSan will complain that
> we do not initialize the last 6 bytes of "cb_priv".  The caller only
> uses the first two bytes so it doesn't cause a runtime issue.  Still
> worth fixing though.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> [...]

Here is the summary with links:
  - [net-next] mlxsw: spectrum_buffers: silence uninitialized warning
    https://git.kernel.org/netdev/net-next/c/9b139a38016f

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] 3+ messages in thread

end of thread, other threads:[~2021-10-06 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06  7:33 [PATCH net-next] mlxsw: spectrum_buffers: silence uninitialized warning Dan Carpenter
2021-10-06 10:04 ` Ido Schimmel
2021-10-06 14:30 ` patchwork-bot+netdevbpf

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).