Skip to contentSkip to conversation

Minor clean-ups for nvme and nvme-fabrics

PATCH New Minwoo Im 4 participants 10 messages May 11, 2019 – May 13, 2019 NVMe

lore
Share & tools
lore

Minwoo Im

author
#0 lore raw

cover Minor clean-ups for nvme and nvme-fabrics

Here's minor patchset for nvme and nvme-fabrics.
The first one fixes typos in nvme status code name. Once it's accepted, nvme-cli can be updatd soon.
The second removes a unused argument in nvmf_create_ctrl().

Please review.
Thanks,

Minwoo Im (2):
nvme: Fix typos in nvme status code values
nvme-fabrics: Remove unused argument

 drivers/nvme/host/fabrics.c | 4 ++--
 include/linux/nvme.h        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 1/2 nvme: Fix typos in nvme status code values

Fix typos in enumeration names for nvme status:
s/ACIVATE/ACTIVATE
s/INSUFFICENT/INSUFFICIENT

Signed-off-by Minwoo Im <minwoo.im.dev at gmail.com>
---
 include/linux/nvme.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/nvme.h +2 -2
index c40720cb59ac..8028adacaff3 100644
@@ -1246,9 +1246,9 @@ enum {
 	NVME_SC_FW_NEEDS_SUBSYS_RESET	= 0x110,
 	NVME_SC_FW_NEEDS_RESET		= 0x111,
 	NVME_SC_FW_NEEDS_MAX_TIME	= 0x112,
-	NVME_SC_FW_ACIVATE_PROHIBITED	= 0x113,
+	NVME_SC_FW_ACTIVATE_PROHIBITED	= 0x113,
 	NVME_SC_OVERLAPPING_RANGE	= 0x114,
-	NVME_SC_NS_INSUFFICENT_CAP	= 0x115,
+	NVME_SC_NS_INSUFFICIENT_CAP	= 0x115,
 	NVME_SC_NS_ID_UNAVAILABLE	= 0x116,
 	NVME_SC_NS_ALREADY_ATTACHED	= 0x118,
 	NVME_SC_NS_IS_PRIVATE		= 0x119,
Signature · 1 line
2.17.1
author
#4 lore raw

PATCH 2/2 nvme-fabrics: Remove unused argument

In reply to Minwoo Im

The variable 'count' is not currently used by nvmf_create_ctrl(), so remove it.

Signed-off-by Minwoo Im <minwoo.im.dev at gmail.com>
---
 drivers/nvme/host/fabrics.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/fabrics.c +2 -2
index 592d1e61ef7e..5838f7cd53ac 100644
@@ -978,7 +978,7 @@ EXPORT_SYMBOL_GPL(nvmf_free_options);
 				 NVMF_OPT_DISABLE_SQFLOW)
 
 static struct nvme_ctrl *
-nvmf_create_ctrl(struct device *dev, const char *buf, size_t count)
+nvmf_create_ctrl(struct device *dev, const char *buf)
 {
 	struct nvmf_ctrl_options *opts;
 	struct nvmf_transport_ops *ops;
@@ -1073,7 +1073,7 @@ static ssize_t nvmf_dev_write(struct file *file, const char __user *ubuf,
 		goto out_unlock;
 	}
 
-	ctrl = nvmf_create_ctrl(nvmf_device, buf, count);
+	ctrl = nvmf_create_ctrl(nvmf_device, buf);
 	if (IS_ERR(ctrl)) {
 		ret = PTR_ERR(ctrl);
 		goto out_unlock;
Signature · 1 line
2.17.1
#2 lore raw

PATCH 1/2 nvme: Fix typos in nvme status code values

In reply to Minwoo Im

Looks good.

Reviewed-by Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
Quoted 1 line · Minwoo Im
include/linux/nvme.h +1 -0
+	NVME_SC_NS_INSUFFICIENT_CAP	= 0x115,
#5 lore raw

PATCH 2/2 nvme-fabrics: Remove unused argument

In reply to Minwoo Im

Variable "count" use removed by any commit ?

Or it is been like that since the introduction of this function ?

Quoted 30 lines · Minwoo Im

The variable 'count' is not currently used by nvmf_create_ctrl(), so remove it.

Signed-off-by Minwoo Im <minwoo.im.dev at gmail.com>
---
 drivers/nvme/host/fabrics.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/fabrics.c +2 -2
index 592d1e61ef7e..5838f7cd53ac 100644
@@ -978,7 +978,7 @@ EXPORT_SYMBOL_GPL(nvmf_free_options);
 				 NVMF_OPT_DISABLE_SQFLOW)
 
 static struct nvme_ctrl *
-nvmf_create_ctrl(struct device *dev, const char *buf, size_t count)
+nvmf_create_ctrl(struct device *dev, const char *buf)
 {
 	struct nvmf_ctrl_options *opts;
 	struct nvmf_transport_ops *ops;
@@ -1073,7 +1073,7 @@ static ssize_t nvmf_dev_write(struct file *file, const char __user *ubuf,
 		goto out_unlock;
 	}
 
-	ctrl = nvmf_create_ctrl(nvmf_device, buf, count);
+	ctrl = nvmf_create_ctrl(nvmf_device, buf);
 	if (IS_ERR(ctrl)) {
 		ret = PTR_ERR(ctrl);
 		goto out_unlock;
author
#6 lore raw

PATCH 2/2 nvme-fabrics: Remove unused argument

Quoted 3 lines

Variable "count" use removed by any commit ?

Or it is been like that since the introduction of this function ?

If you do "blame" with the first line of this function, you can see the count has been introduced without being used at all.

Commit 07bfcd09a ("nvme-fabrics: add a generic NVMe over Fabrics library")

#7 lore raw

PATCH 2/2 nvme-fabrics: Remove unused argument

In reply to Minwoo Im

Looks good.

Reviewed-by Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
Quoted 8 lines · Minwoo Im
Quoted 3 lines

Variable "count" use removed by any commit ?

Or it is been like that since the introduction of this function ?

If you do "blame" with the first line of this function, you can see the count has been introduced without being used at all.

Commit 07bfcd09a ("nvme-fabrics: add a generic NVMe over Fabrics library")