[PATCH] net: phy: ncsi: Correct the endian of the checksum

Jacky Chou jacky_chou at aspeedtech.com
Mon Feb 5 09:02:28 CET 2024


There is no need to perform the endian twice here.

Signed-off-by: Jacky Chou <jacky_chou at aspeedtech.com>
---
 drivers/net/phy/ncsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/ncsi.c b/drivers/net/phy/ncsi.c
index eb3fd65bb4..74c5386d2e 100644
--- a/drivers/net/phy/ncsi.c
+++ b/drivers/net/phy/ncsi.c
@@ -551,7 +551,7 @@ static int ncsi_send_command(unsigned int np, unsigned int nc, unsigned int cmd,
 	checksum = ncsi_calculate_checksum((unsigned char *)hdr,
 					   sizeof(*hdr) + len);
 	pchecksum = (__be32 *)((void *)(hdr + 1) + len);
-	put_unaligned_be32(htonl(checksum), pchecksum);
+	put_unaligned_be32(checksum, pchecksum);
 
 	if (wait) {
 		net_set_timeout_handler(1000UL, ncsi_timeout_handler);
-- 
2.25.1



More information about the U-Boot mailing list