[PATCH] scsi: hisi_sas: silence a static checker warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



phy->phy_type is a u64.  We only ever use the first two bits so it's a
bit over kill perhaps.  Anyway, let's declare the flags as ULL as well
because that lets us do things like "phy->phy_type &= ~PORT_TYPE_SAS;".
In the current code, static checkers complain that that would
unintentionally clear the high 32 bits as well.

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index 4fc23087a939..b23245aeab74 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -56,8 +56,8 @@
 struct hisi_hba;
 
 enum {
-	PORT_TYPE_SAS = (1U << 1),
-	PORT_TYPE_SATA = (1U << 0),
+	PORT_TYPE_SAS = (1ULL << 1),
+	PORT_TYPE_SATA = (1ULL << 0),
 };
 
 enum dev_status {
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux