lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240812-mvneta-be16-v1-1-e1ea12234230@kernel.org>
Date: Mon, 12 Aug 2024 12:24:13 +0100
From: Simon Horman <horms@...nel.org>
To: Marcin Wojtas <marcin.s.wojtas@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>, 
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
 Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Subject: [PATCH net-next] net: mvneta: Use __be16 for l3_proto parameter of
 mvneta_txq_desc_csum()

The value passed as the l3_proto argument of mvneta_txq_desc_csum()
is __be16. And mvneta_txq_desc_csum uses this parameter as a __be16
value. So use __be16 as the type for the parameter, rather than
type with host byte order.

Flagged by Sparse as:

 .../mvneta.c:1796:25: warning: restricted __be16 degrades to integer
 .../mvneta.c:1979:45: warning: incorrect type in argument 2 (different base types)
 .../mvneta.c:1979:45:    expected int l3_proto
 .../mvneta.c:1979:45:    got restricted __be16 [usertype] l3_proto

No functional change intended.
Flagged by Sparse.

Signed-off-by: Simon Horman <horms@...nel.org>
---
 drivers/net/ethernet/marvell/mvneta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 41894834fb53..d72b2d5f96db 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1781,7 +1781,7 @@ static int mvneta_txq_sent_desc_proc(struct mvneta_port *pp,
 }
 
 /* Set TXQ descriptors fields relevant for CSUM calculation */
-static u32 mvneta_txq_desc_csum(int l3_offs, int l3_proto,
+static u32 mvneta_txq_desc_csum(int l3_offs, __be16 l3_proto,
 				int ip_hdr_len, int l4_proto)
 {
 	u32 command;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ