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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230108224057.354438-4-beanhuo@iokpp.de>
Date:   Sun,  8 Jan 2023 23:40:57 +0100
From:   Bean Huo <beanhuo@...pp.de>
To:     alim.akhtar@...sung.com, avri.altman@....com, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, beanhuo@...ron.com, bvanassche@....org,
        quic_cang@...cinc.com, quic_xiaosenh@...cinc.com
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel test robot <lkp@...el.com>
Subject: [PATCH v2 3/3] scsi: ufs: core: bsg: Fix cast to restricted __be16 warning

From: Bean Huo <beanhuo@...ron.com>

Fix the following sparse endianness warning:

"sparse warnings: drivers/ufs/core/ufs_bsg.c:91:25: sparse: sparse: cast to
restricted __be16."

For consistency with endianness annotations of other UFS data structures,
change __u16/32 to __be16/32 in UFS ARPMB data structures.

Fixes: 6ff265fc5ef6 ("scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Bean Huo <beanhuo@...ron.com>
---
 include/uapi/scsi/scsi_bsg_ufs.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/uapi/scsi/scsi_bsg_ufs.h b/include/uapi/scsi/scsi_bsg_ufs.h
index 276e2772328f..2801b65299aa 100644
--- a/include/uapi/scsi/scsi_bsg_ufs.h
+++ b/include/uapi/scsi/scsi_bsg_ufs.h
@@ -97,18 +97,18 @@ struct utp_upiu_req {
 };
 
 struct ufs_arpmb_meta {
-	__u16	req_resp_type;
+	__be16	req_resp_type;
 	__u8	nonce[16];
-	__u32	write_counter;
-	__u16	addr_lun;
-	__u16	block_count;
-	__u16	result;
+	__be32	write_counter;
+	__be16	addr_lun;
+	__be16	block_count;
+	__be16	result;
 } __attribute__((__packed__));
 
 struct ufs_ehs {
 	__u8	length;
 	__u8	ehs_type;
-	__u16	ehssub_type;
+	__be16	ehssub_type;
 	struct ufs_arpmb_meta meta;
 	__u8	mac_key[32];
 } __attribute__((__packed__));
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ