Skip to contentSkip to conversation

nvme-fabrics: fix reporting of unrecognized options

PATCH New Christoph Hellwig 3 participants 3 messages Aug 17, 2017 – Aug 20, 2017 NVMe

lore
Share & tools
lore

Christoph Hellwig

author maintainer
#0 lore raw

PATCH 1/1 nvme-fabrics: fix reporting of unrecognized options

Only print the specified options that are not recognized, instead of the whole list of options.

Signed-off-by Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/fabrics.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/host/fabrics.c +2 -1
index 6238452af6a4..81d18c2921df 100644
@@ -795,7 +795,8 @@ static int nvmf_check_allowed_opts(struct nvmf_ctrl_options *opts,
 		int i;
 
 		for (i = 0; i < ARRAY_SIZE(opt_tokens); i++) {
-			if (opt_tokens[i].token & ~allowed_opts) {
+			if ((opt_tokens[i].token & opts->mask) &&
+			    (opt_tokens[i].token & ~allowed_opts)) {
 				pr_warn("invalid parameter '%s'\n",
 					opt_tokens[i].pattern);
 			}
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 nvme-fabrics: fix reporting of unrecognized options

Quoted 8 lines · Christoph Hellwig

Only print the specified options that are not recognized, instead of the whole list of options.

Signed-off-by Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/fabrics.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Looks good,

Reviewed-by Max Gurtovoy <maxg at mellanox.com>