From: Keith Busch Date: Thu, 28 May 2020 20:41:32 +0000 (-0700) Subject: Explicit casting from void * X-Git-Tag: v1.0-rc0~154 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=be604f2e8f0f3c55a57684db14b24f510489c0df;p=users%2Fsagi%2Flibnvme.git Explicit casting from void * Signed-off-by: Keith Busch --- diff --git a/src/nvme/ioctl.h b/src/nvme/ioctl.h index f423bca1..445468b0 100644 --- a/src/nvme/ioctl.h +++ b/src/nvme/ioctl.h @@ -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, }; /** diff --git a/src/nvme/types.h b/src/nvme/types.h index d5b3e6b1..b10737c9 100644 --- a/src/nvme/types.h +++ b/src/nvme/types.h @@ -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.