From: Christoph Hellwig Date: Wed, 21 Dec 2022 09:30:45 +0000 (+0100) Subject: nvme: fix the NVME_CMD_EFFECTS_CSE_MASK definition X-Git-Tag: v6.1.8~809 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a574e81b37c0add6c143d90b074ea508970a9ca7;p=platform%2Fkernel%2Flinux-starfive.git nvme: fix the NVME_CMD_EFFECTS_CSE_MASK definition [ Upstream commit 685e6311637e46f3212439ce2789f8a300e5050f ] 3 << 16 does not generate the correct mask for bits 16, 17 and 18. Use the GENMASK macro to generate the correct mask instead. Fixes: 84fef62d135b ("nvme: check admin passthru command effects") Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi Signed-off-by: Sasha Levin --- diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 050d7d0..d9fbc5a 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@ -7,6 +7,7 @@ #ifndef _LINUX_NVME_H #define _LINUX_NVME_H +#include #include #include @@ -639,7 +640,7 @@ enum { NVME_CMD_EFFECTS_NCC = 1 << 2, NVME_CMD_EFFECTS_NIC = 1 << 3, NVME_CMD_EFFECTS_CCC = 1 << 4, - NVME_CMD_EFFECTS_CSE_MASK = 3 << 16, + NVME_CMD_EFFECTS_CSE_MASK = GENMASK(18, 16), NVME_CMD_EFFECTS_UUID_SEL = 1 << 19, };