diff mbox series

[v2] qla2xxx: Address a set of sparse warnings.

Message ID 20200715043358.21668-1-njavali@marvell.com (mailing list archive)
State Mainlined
Commit 58101f1504ad9b36e34533ec1fb01a8de80aa6d6
Headers show
Series [v2] qla2xxx: Address a set of sparse warnings. | expand

Commit Message

Nilesh Javali July 15, 2020, 4:33 a.m. UTC
From: Shyam Sundar <ssundar@marvell.com>

v1->v2:
- Rebase on 5.9/scsi-queue

Fix 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

Signed-off-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_fw.h  | 2 +-
 drivers/scsi/qla2xxx/qla_isr.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Martin K. Petersen July 15, 2020, 10:14 p.m. UTC | #1
On Tue, 14 Jul 2020 21:33:58 -0700, Nilesh Javali wrote:

> v1->v2:
> - Rebase on 5.9/scsi-queue
> 
> Fix 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

Applied to 5.9/scsi-queue, thanks!

[1/1] scsi: qla2xxx: Address a set of sparse warnings
      https://git.kernel.org/mkp/scsi/c/58101f1504ad
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
index 49403fb1c3f7..bba1b77fba7e 100644
--- a/drivers/scsi/qla2xxx/qla_fw.h
+++ b/drivers/scsi/qla2xxx/qla_fw.h
@@ -610,7 +610,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/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 7be32de2ae06..27bcd346af7c 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -790,7 +790,7 @@  qla27xx_handle_8200_aen(scsi_qla_host_t *vha, uint16_t *mb)
 	}
 }
 
-struct purex_item *
+static struct purex_item *
 qla24xx_alloc_purex_item(scsi_qla_host_t *vha, uint16_t size)
 {
 	struct purex_item *item = NULL;
@@ -878,7 +878,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;