public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/1] nvme: Remove unused enum constants in nvme.h
       [not found] <CGME20220622085123eucas1p25f724850a5397fa90a0e26eb4d5af92f@eucas1p2.samsung.com>
@ 2022-06-22  8:48 ` Joel Granados
  2022-06-22  8:48   ` [PATCH 1/1] nvme: Remove unused enum constants Joel Granados
  2022-07-19 21:17   ` [PATCH 0/1] nvme: Remove unused enum constants in nvme.h Joel Granados
  0 siblings, 2 replies; 3+ messages in thread
From: Joel Granados @ 2022-06-22  8:48 UTC (permalink / raw)
  To: hch, kbusch; +Cc: linux-nvme

While working in include/linux/nvme.h, I noticed that there are enum
constants that are not being used by the kernel. They are also not included
in any UAPI directory. These variables were synced to keep up with nvme-cli
in 48c9e85b2346 ("nvme: resync include/linux/nvme.h with nvmecli"). Since
nvme-cli now uses libnvme which defines all the structures within itself,
there is no need to synchronize any longer.

There have been discussions to introduce functionality into the kernel that
use some of these variables like in
https://lore.kernel.org/all/1558278418-5702-1-git-send-email-akinobu.mita@gmail.com/
but to my knowledge they have not made it upstream.

This patch removes the enumerations that are not being used within the
kernel.

Please get back to me if I have missed something and these variables are
indeed being used.

Best

Joel Granados (1):
  nvme: Remove unused enum constants

 include/linux/nvme.h | 32 --------------------------------
 1 file changed, 32 deletions(-)

-- 
2.30.2



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] nvme: Remove unused enum constants
  2022-06-22  8:48 ` [PATCH 0/1] nvme: Remove unused enum constants in nvme.h Joel Granados
@ 2022-06-22  8:48   ` Joel Granados
  2022-07-19 21:17   ` [PATCH 0/1] nvme: Remove unused enum constants in nvme.h Joel Granados
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Granados @ 2022-06-22  8:48 UTC (permalink / raw)
  To: hch, kbusch; +Cc: linux-nvme, Joel Granados

These variables were synced to keep up with nvme-cli in
48c9e85b2346 ("nvme: resync include/linux/nvme.h with nvmecli"). Since
nvme-cli now uses libnvme which defines all the structures within itself,
there is no need to synchronize any longer.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 include/linux/nvme.h | 32 --------------------------------
 1 file changed, 32 deletions(-)

diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 29ec3e3481ff..71d7d6afc56a 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -129,24 +129,10 @@ enum {
 	NVME_REG_ACQ	= 0x0030,	/* Admin CQ Base Address */
 	NVME_REG_CMBLOC	= 0x0038,	/* Controller Memory Buffer Location */
 	NVME_REG_CMBSZ	= 0x003c,	/* Controller Memory Buffer Size */
-	NVME_REG_BPINFO	= 0x0040,	/* Boot Partition Information */
-	NVME_REG_BPRSEL	= 0x0044,	/* Boot Partition Read Select */
-	NVME_REG_BPMBL	= 0x0048,	/* Boot Partition Memory Buffer
-					 * Location
-					 */
 	NVME_REG_CMBMSC = 0x0050,	/* Controller Memory Buffer Memory
 					 * Space Control
 					 */
 	NVME_REG_CRTO	= 0x0068,	/* Controller Ready Timeouts */
-	NVME_REG_PMRCAP	= 0x0e00,	/* Persistent Memory Capabilities */
-	NVME_REG_PMRCTL	= 0x0e04,	/* Persistent Memory Region Control */
-	NVME_REG_PMRSTS	= 0x0e08,	/* Persistent Memory Region Status */
-	NVME_REG_PMREBS	= 0x0e0c,	/* Persistent Memory Region Elasticity
-					 * Buffer Size
-					 */
-	NVME_REG_PMRSWTP = 0x0e10,	/* Persistent Memory Region Sustained
-					 * Write Throughput
-					 */
 	NVME_REG_DBS	= 0x1000,	/* SQ 0 Tail Doorbell */
 };
 
@@ -369,14 +355,7 @@ enum {
 	NVME_CTRL_OACS_DIRECTIVES		= 1 << 5,
 	NVME_CTRL_OACS_DBBUF_SUPP		= 1 << 8,
 	NVME_CTRL_LPA_CMD_EFFECTS_LOG		= 1 << 1,
-	NVME_CTRL_CTRATT_128_ID			= 1 << 0,
-	NVME_CTRL_CTRATT_NON_OP_PSP		= 1 << 1,
 	NVME_CTRL_CTRATT_NVM_SETS		= 1 << 2,
-	NVME_CTRL_CTRATT_READ_RECV_LVLS		= 1 << 3,
-	NVME_CTRL_CTRATT_ENDURANCE_GROUPS	= 1 << 4,
-	NVME_CTRL_CTRATT_PREDICTABLE_LAT	= 1 << 5,
-	NVME_CTRL_CTRATT_NAMESPACE_GRANULARITY	= 1 << 7,
-	NVME_CTRL_CTRATT_UUID_LIST		= 1 << 9,
 };
 
 struct nvme_lbaf {
@@ -508,9 +487,6 @@ enum {
 	NVME_ID_CNS_NS_PRESENT		= 0x11,
 	NVME_ID_CNS_CTRL_NS_LIST	= 0x12,
 	NVME_ID_CNS_CTRL_LIST		= 0x13,
-	NVME_ID_CNS_SCNDRY_CTRL_LIST	= 0x15,
-	NVME_ID_CNS_NS_GRANULARITY	= 0x16,
-	NVME_ID_CNS_UUID_LIST		= 0x17,
 };
 
 enum {
@@ -639,7 +615,6 @@ enum {
 	NVME_CMD_EFFECTS_NIC		= 1 << 3,
 	NVME_CMD_EFFECTS_CCC		= 1 << 4,
 	NVME_CMD_EFFECTS_CSE_MASK	= 3 << 16,
-	NVME_CMD_EFFECTS_UUID_SEL	= 1 << 19,
 };
 
 struct nvme_effects_log {
@@ -1185,16 +1160,9 @@ enum {
 	NVME_LOG_FW_SLOT	= 0x03,
 	NVME_LOG_CHANGED_NS	= 0x04,
 	NVME_LOG_CMD_EFFECTS	= 0x05,
-	NVME_LOG_DEVICE_SELF_TEST = 0x06,
-	NVME_LOG_TELEMETRY_HOST = 0x07,
-	NVME_LOG_TELEMETRY_CTRL = 0x08,
-	NVME_LOG_ENDURANCE_GROUP = 0x09,
 	NVME_LOG_ANA		= 0x0c,
 	NVME_LOG_DISC		= 0x70,
-	NVME_LOG_RESERVATION	= 0x80,
 	NVME_FWACT_REPL		= (0 << 3),
-	NVME_FWACT_REPL_ACTV	= (1 << 3),
-	NVME_FWACT_ACTV		= (2 << 3),
 };
 
 /* NVMe Namespace Write Protect State */
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/1] nvme: Remove unused enum constants in nvme.h
  2022-06-22  8:48 ` [PATCH 0/1] nvme: Remove unused enum constants in nvme.h Joel Granados
  2022-06-22  8:48   ` [PATCH 1/1] nvme: Remove unused enum constants Joel Granados
@ 2022-07-19 21:17   ` Joel Granados
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Granados @ 2022-07-19 21:17 UTC (permalink / raw)
  To: hch, kbusch; +Cc: linux-nvme

[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]

On Wed, Jun 22, 2022 at 10:48:58AM +0200, Joel Granados wrote:
> While working in include/linux/nvme.h, I noticed that there are enum
> constants that are not being used by the kernel. They are also not included
> in any UAPI directory. These variables were synced to keep up with nvme-cli
> in 48c9e85b2346 ("nvme: resync include/linux/nvme.h with nvmecli"). Since
> nvme-cli now uses libnvme which defines all the structures within itself,
> there is no need to synchronize any longer.
> 
> There have been discussions to introduce functionality into the kernel that
> use some of these variables like in
> https://lore.kernel.org/all/1558278418-5702-1-git-send-email-akinobu.mita@gmail.com/
> but to my knowledge they have not made it upstream.
> 
> This patch removes the enumerations that are not being used within the
> kernel.
> 
> Please get back to me if I have missed something and these variables are
> indeed being used.
> 
> Best
> 
> Joel Granados (1):
>   nvme: Remove unused enum constants
> 
>  include/linux/nvme.h | 32 --------------------------------
>  1 file changed, 32 deletions(-)
> 
> -- 
> 2.30.2
> 
> 

Ping. Does this make sense? Or are we keeping these around for future
use?

Best

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-19 21:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20220622085123eucas1p25f724850a5397fa90a0e26eb4d5af92f@eucas1p2.samsung.com>
2022-06-22  8:48 ` [PATCH 0/1] nvme: Remove unused enum constants in nvme.h Joel Granados
2022-06-22  8:48   ` [PATCH 1/1] nvme: Remove unused enum constants Joel Granados
2022-07-19 21:17   ` [PATCH 0/1] nvme: Remove unused enum constants in nvme.h Joel Granados

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox