Minor clean-ups for nvme and nvme-fabrics
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
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
--- include/linux/nvme.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/nvme.h +2 -2
@@ -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
PATCH 1/2 nvme: Fix typos in nvme status code values
Looks good.
Quoted 1 line · Minwoo Im
include/linux/nvme.h +1
-0+ NVME_SC_NS_INSUFFICIENT_CAP = 0x115,
Sagi Grimberg
maintainerPATCH 1/2 nvme: Fix typos in nvme status code values
In reply to Minwoo ImPATCH 2/2 nvme-fabrics: Remove unused argument
In reply to Minwoo ImThe variable 'count' is not currently used by nvmf_create_ctrl(), so remove it.
--- drivers/nvme/host/fabrics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/fabrics.c +2 -2
@@ -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
PATCH 2/2 nvme-fabrics: Remove unused argument
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@@ -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;
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")
PATCH 2/2 nvme-fabrics: Remove unused argument
Looks good.
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")
Sagi Grimberg
maintainerPATCH 2/2 nvme-fabrics: Remove unused argument
In reply to Minwoo Imcover Minor clean-ups for nvme and nvme-fabrics
In reply to Minwoo ImThanks,
applied both patches to nvme-5.2.