From: Bean Huo <beanhuo@iokpp.de>
To: alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, beanhuo@micron.com,
bvanassche@acm.org, quic_cang@quicinc.com,
quic_xiaosenh@quicinc.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel test robot <lkp@intel.com>
Subject: [PATCH v2 3/3] scsi: ufs: core: bsg: Fix cast to restricted __be16 warning
Date: Sun, 8 Jan 2023 23:40:57 +0100 [thread overview]
Message-ID: <20230108224057.354438-4-beanhuo@iokpp.de> (raw)
In-Reply-To: <20230108224057.354438-1-beanhuo@iokpp.de>
From: Bean Huo <beanhuo@micron.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@intel.com>
Signed-off-by: Bean Huo <beanhuo@micron.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
next prev parent reply other threads:[~2023-01-08 22:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-08 22:40 [PATCH v2 0/3] Several compilation warnings fixes for UFS Advanced RPMB Bean Huo
2023-01-08 22:40 ` [PATCH v2 1/3] scsi: ufs: core: bsg: Fix sometimes-uninitialized warnings Bean Huo
2023-01-11 17:22 ` Nick Desaulniers
2023-01-08 22:40 ` [PATCH v2 2/3] scsi: core: Fix invisible definition compilation warning Bean Huo
2023-01-08 22:40 ` Bean Huo [this message]
2023-01-08 23:40 ` [PATCH v2 0/3] Several compilation warnings fixes for UFS Advanced RPMB Bart Van Assche
2023-01-12 4:37 ` Martin K. Petersen
2023-01-14 3:06 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230108224057.354438-4-beanhuo@iokpp.de \
--to=beanhuo@iokpp.de \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lkp@intel.com \
--cc=martin.petersen@oracle.com \
--cc=quic_cang@quicinc.com \
--cc=quic_xiaosenh@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox