]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
Explicit casting from void *
authorKeith Busch <kbusch@kernel.org>
Thu, 28 May 2020 20:41:32 +0000 (13:41 -0700)
committerKeith Busch <kbusch@kernel.org>
Thu, 28 May 2020 20:41:32 +0000 (13:41 -0700)
Signed-off-by: Keith Busch <kbusch@kernel.org>
src/nvme/ioctl.h
src/nvme/types.h

index f423bca1758a3a3c71f41e30fbe57d0127011a2c..445468b042723d82d1bea9aabe29c62760064c20 100644 (file)
@@ -576,6 +576,7 @@ enum nvme_get_features_sel {
        NVME_GET_FEATURES_SEL_CURRENT                           = 0,
        NVME_GET_FEATURES_SEL_DEFAULT                           = 1,
        NVME_GET_FEATURES_SEL_SAVED                             = 2,
+       NVME_GET_FEATURES_SEL_SUPPORTED                         = 3,
 };
 
 /**
index d5b3e6b101c52cf987fc5bb17a161e2f1d1c6675..b10737c961db22f90a286ca102c7ddda86d55ea8 100644 (file)
@@ -218,14 +218,14 @@ static inline bool nvme_is_64bit_reg(__u32 offset)
 
 static inline __u32 nvme_mmio_read32(void *addr)
 {
-        __le32 *p = addr;
+        __le32 *p = (__le32 *)addr;
 
         return le32_to_cpu(*p);
 }
 
 static inline __u64 nvme_mmio_read64(void *addr)
 {
-        __le32 *p = addr;
+        __le32 *p = (__le32 *)addr;
 
        /*
         * Some devices fail 64-bit MMIO. Access 64-bit registers as 2 32-bit.