From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 42400C4332F for ; Fri, 23 Dec 2022 07:18:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6L64knV5CJYasfCrWxjwTWXEs8wAQZN2+qY4ZFZFUO8=; b=WLL01meD/kNO74GYYEshu3bNvE G2+fVMArVttbvNct0u6TE5CpSkTD/oCJ7DDATSt9INYRcYoTScj5M8DzzM5QJPaXKn8VPuWO2Rk5q BLvHaqDHCJpB2cdcSn/qwkcVkznqiNyRLEYXe4U3Av7TlRY1fJ/SU3L1wP2LpwFS5KLXtqVsCWqvw tkhwG8iJNJnbB/UpaoS/b+hqJHAk3iH2n8mRrKvdTYBKQWawbOtOcbSo+89wH1l2r2IpaLQpQGt+W GUxo1TF6ZCDGdWzitfLTd/zu3x79dU5Pxax7wvQ/taKy79ClCV7nGjAFgu3x+79hM4yQ9x0XN9BNQ zTAZ6qug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8cK5-004hoA-0R; Fri, 23 Dec 2022 07:18:29 +0000 Received: from [2001:4bb8:199:7829:8d88:c8b3:6416:2f03] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8cJv-004hiC-88; Fri, 23 Dec 2022 07:18:19 +0000 From: Christoph Hellwig To: Keith Busch , Sagi Grimberg , Chaitanya Kulkarni Cc: Kanchan Joshi , linux-nvme@lists.infradead.org Subject: [PATCH 1/6] nvme: fix the NVME_CMD_EFFECTS_CSE_MASK definition Date: Fri, 23 Dec 2022 08:18:09 +0100 Message-Id: <20221223071814.43564-2-hch@lst.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221223071814.43564-1-hch@lst.de> References: <20221223071814.43564-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org 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: Kanchan Joshi --- include/linux/nvme.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/nvme.h b/include/linux/nvme.h index d6be2a6861000e..d1cd53f2b6abd9 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, }; -- 2.35.1