skd: Fix endianness annotations

Ensure that sparse does not report any warnings when building the
skd driver with sparse verification enabled (C=1 or C=2).

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 5174303..5a69e32 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -512,7 +512,7 @@
 	u32 lba;
 	u32 count;
 	int data_dir;
-	u64 be_dmaa;
+	__be64 be_dmaa;
 	u64 cmdctxt;
 	u32 timo_slot;
 	void *cmd_ptr;
@@ -645,7 +645,7 @@
 		cmd_ptr = &skmsg->msg_buf[skmsg->length];
 		memset(cmd_ptr, 0, 32);
 
-		be_dmaa = cpu_to_be64((u64)skreq->sksg_dma_address);
+		be_dmaa = cpu_to_be64(skreq->sksg_dma_address);
 		cmdctxt = skreq->id + SKD_ID_INCR;
 
 		scsi_req = cmd_ptr;
@@ -2402,9 +2402,7 @@
 
 		/* SCSI byte order increment of num_returned_bytes by 1 */
 		skcomp->num_returned_bytes =
-			be32_to_cpu(skcomp->num_returned_bytes) + 1;
-		skcomp->num_returned_bytes =
-			be32_to_cpu(skcomp->num_returned_bytes);
+			cpu_to_be32(be32_to_cpu(skcomp->num_returned_bytes) + 1);
 	}
 
 	/* update page length field to reflect the driver's page too */
@@ -2502,7 +2500,7 @@
 	memcpy(buf, &inq, min_t(unsigned, max_bytes, sizeof(inq)));
 
 	skcomp->num_returned_bytes =
-		be32_to_cpu(min_t(uint16_t, max_bytes, sizeof(inq)));
+		cpu_to_be32(min_t(uint16_t, max_bytes, sizeof(inq)));
 }
 
 static void skd_do_driver_inq(struct skd_device *skdev,
@@ -4674,7 +4672,7 @@
 
 	for (i = 0; i < SKD_MAX_BARS; i++)
 		if (skdev->mem_map[i])
-			iounmap((u32 *)skdev->mem_map[i]);
+			iounmap(skdev->mem_map[i]);
 
 	if (skdev->pcie_error_reporting_is_enabled)
 		pci_disable_pcie_error_reporting(pdev);
@@ -4705,7 +4703,7 @@
 
 	for (i = 0; i < SKD_MAX_BARS; i++)
 		if (skdev->mem_map[i])
-			iounmap((u32 *)skdev->mem_map[i]);
+			iounmap(skdev->mem_map[i]);
 
 	if (skdev->pcie_error_reporting_is_enabled)
 		pci_disable_pcie_error_reporting(pdev);