Skip to content

Commit 685e631

Browse files
author
Christoph Hellwig
committed
nvme: fix the NVME_CMD_EFFECTS_CSE_MASK definition
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]>
1 parent 8ca4fc3 commit 685e631

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

@@ -639,7 +640,7 @@ enum {
639640
NVME_CMD_EFFECTS_NCC = 1 << 2,
640641
NVME_CMD_EFFECTS_NIC = 1 << 3,
641642
NVME_CMD_EFFECTS_CCC = 1 << 4,
642-
NVME_CMD_EFFECTS_CSE_MASK = 3 << 16,
643+
NVME_CMD_EFFECTS_CSE_MASK = GENMASK(18, 16),
643644
NVME_CMD_EFFECTS_UUID_SEL = 1 << 19,
644645
};
645646

0 commit comments

Comments
 (0)