From: Christoph Hellwig Date: Thu, 17 Aug 2017 11:57:49 +0000 (+0200) Subject: nvme-fabrics: fix reporting of unrecognized options X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=81a0b8d74edd5841be29d223ce44bc8db2b00d09;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Max Gurtovoy --- 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, 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); }