From 770ffb655326f289bc462d4a06e92719763b0bd9 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 25 Jul 2020 14:47:24 +0000 Subject: [PATCH] qla2x00t-32gbit: Address a set of sparse warnings Fix the following sparse warnings: drivers/scsi/qla2xxx/qla_isr.c:881:23: warning: restricted __le16 degrades to integer drivers/scsi/qla2xxx/qla_isr.c:881:23: warning: cast to restricted __le16 Link: https://lore.kernel.org/r/20200715043358.21668-1-njavali@marvell.com Signed-off-by: Shyam Sundar Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen See also commit 58101f1504ad9b36e34533ec1fb01a8de80aa6d6 upstream. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9075 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_fw.h | 2 +- qla2x00t-32gbit/qla_isr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qla2x00t-32gbit/qla_fw.h b/qla2x00t-32gbit/qla_fw.h index f5306df5d..f2d560d50 100644 --- a/qla2x00t-32gbit/qla_fw.h +++ b/qla2x00t-32gbit/qla_fw.h @@ -622,7 +622,7 @@ struct sts_entry_24xx { __le32 residual_len; /* FW calc residual transfer length. */ union { - uint16_t reserved_1; + __le16 reserved_1; __le16 nvme_rsp_pyld_len; }; diff --git a/qla2x00t-32gbit/qla_isr.c b/qla2x00t-32gbit/qla_isr.c index 6023f1b16..5c1c03ed7 100644 --- a/qla2x00t-32gbit/qla_isr.c +++ b/qla2x00t-32gbit/qla_isr.c @@ -890,7 +890,7 @@ qla27xx_copy_fpin_pkt(struct scsi_qla_host *vha, void **pkt, struct purex_item *item; void *fpin_pkt = NULL; - total_bytes = le16_to_cpu(purex->frame_size & 0x0FFF) + total_bytes = (le16_to_cpu(purex->frame_size) & 0x0FFF) - PURX_ELS_HEADER_SIZE; pending_bytes = total_bytes; entry_count = entry_count_remaining = purex->entry_count;