diff options
author | Christoph Hellwig <hch@lst.de> | 2017-08-17 07:57:49 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-08-17 12:48:54 -0400 |
commit | 81a0b8d74edd5841be29d223ce44bc8db2b00d09 (patch) | |
tree | 84017dbbeda72bcf8c2dc30a3b3a35b086098b76 /drivers | |
parent | 369157b41cca435442cf5add9df209aaf951860d (diff) |
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@lst.de>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvme/host/fabrics.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index 2e582a240943..5f5cd306f76d 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c | |||
@@ -794,7 +794,8 @@ static int nvmf_check_allowed_opts(struct nvmf_ctrl_options *opts, | |||
794 | int i; | 794 | int i; |
795 | 795 | ||
796 | for (i = 0; i < ARRAY_SIZE(opt_tokens); i++) { | 796 | for (i = 0; i < ARRAY_SIZE(opt_tokens); i++) { |
797 | if (opt_tokens[i].token & ~allowed_opts) { | 797 | if ((opt_tokens[i].token & opts->mask) && |
798 | (opt_tokens[i].token & ~allowed_opts)) { | ||
798 | pr_warn("invalid parameter '%s'\n", | 799 | pr_warn("invalid parameter '%s'\n", |
799 | opt_tokens[i].pattern); | 800 | opt_tokens[i].pattern); |
800 | } | 801 | } |