[PATH libnvme v1 1/2] fabrics: Shorten/rename supported option function/vars names

Daniel Wagner dwagner at suse.de
Tue Jul 25 01:41:36 PDT 2023


No need to be extra verbose and using so many chars per line.

Also rename to __nvmf_supported_options to nvmf_read_options
which describes better what the function actually is doing.

Signed-off-by: Daniel Wagner <dwagner at suse.de>
---
 src/nvme/fabrics.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/nvme/fabrics.c b/src/nvme/fabrics.c
index 800293e2a8e7..2f26c2b7f39a 100644
--- a/src/nvme/fabrics.c
+++ b/src/nvme/fabrics.c
@@ -202,7 +202,7 @@ const char *nvmf_cms_str(__u8 cm)
  * Not all of these options may actually be supported,
  * but we retain the old behavior of passing all that might be.
  */
-static const struct nvme_fabric_options default_supported_options = {
+static const struct nvme_fabric_options default_options = {
 	.ctrl_loss_tmo = true,
 	.data_digest = true,
 	.disable_sqflow = true,
@@ -652,7 +652,7 @@ static int build_options(nvme_host_t h, nvme_ctrl_t c, char **argstr)
 		continue;		   \
 	}
 
-static  int __nvmf_supported_options(nvme_root_t r)
+static int nvmf_read_options(nvme_root_t r)
 {
 	char buf[0x1000], *options, *p, *v;
 	int fd, ret;
@@ -683,7 +683,7 @@ static  int __nvmf_supported_options(nvme_root_t r)
 			nvme_msg(r, LOG_DEBUG,
 			         "Cannot read %s, using default options\n",
 			         nvmf_dev);
-			*r->options = default_supported_options;
+			*r->options = default_options;
 			ret = 0;
 			goto out_close;
 		}
@@ -913,7 +913,7 @@ int nvmf_add_ctrl(nvme_host_t h, nvme_ctrl_t c,
 		free(traddr);
 	}
 
-	ret = __nvmf_supported_options(h->r);
+	ret = nvmf_read_options(h->r);
 	if (ret)
 		return ret;
 	ret = build_options(h, c, &argstr);
-- 
2.41.0




More information about the Linux-nvme mailing list