Skip to content

Commit f068a73

Browse files
Christoph Hellwiggregkh
authored andcommitted
nvme: fix the NVME_CMD_EFFECTS_CSE_MASK definition
[ Upstream commit 685e631 ] 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: 84fef62 ("nvme: check admin passthru command effects") Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Kanchan Joshi <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 576502f commit f068a73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/linux/nvme.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#ifndef _LINUX_NVME_H
88
#define _LINUX_NVME_H
99

10+
#include <linux/bits.h>
1011
#include <linux/types.h>
1112
#include <linux/uuid.h>
1213

@@ -539,7 +540,7 @@ enum {
539540
NVME_CMD_EFFECTS_NCC = 1 << 2,
540541
NVME_CMD_EFFECTS_NIC = 1 << 3,
541542
NVME_CMD_EFFECTS_CCC = 1 << 4,
542-
NVME_CMD_EFFECTS_CSE_MASK = 3 << 16,
543+
NVME_CMD_EFFECTS_CSE_MASK = GENMASK(18, 16),
543544
NVME_CMD_EFFECTS_UUID_SEL = 1 << 19,
544545
};
545546

0 commit comments

Comments
 (0)