diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2020-10-01 11:54:31 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-10-07 07:56:20 +0200 |
commit | af5d6f7ba5f99f8316473557240ae9acdd20a6bd (patch) | |
tree | bbf023ccec5d92e2d43962d04d2c4f7a0114addb /drivers | |
parent | 7b15336257ed5623cddefa8d33069777494c98e0 (diff) | |
download | linux-af5d6f7ba5f99f8316473557240ae9acdd20a6bd.tar.bz2 |
nvme-core: remove extra variable
In nvme_validate_ns() the exra variable ctrl is used only twice.
Using ns->ctrl directly still maintains the redability and original
length of the lines in the code. Get rid of the extra variable ctrl &
use ns->ctrl directly.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvme/host/core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 385b10317873..2e505cdf051e 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3928,20 +3928,19 @@ static void nvme_ns_remove_by_nsid(struct nvme_ctrl *ctrl, u32 nsid) static void nvme_validate_ns(struct nvme_ns *ns, struct nvme_ns_ids *ids) { - struct nvme_ctrl *ctrl = ns->ctrl; struct nvme_id_ns *id; int ret = -ENODEV; if (test_bit(NVME_NS_DEAD, &ns->flags)) goto out; - ret = nvme_identify_ns(ctrl, ns->head->ns_id, ids, &id); + ret = nvme_identify_ns(ns->ctrl, ns->head->ns_id, ids, &id); if (ret) goto out; ret = -ENODEV; if (!nvme_ns_ids_equal(&ns->head->ids, ids)) { - dev_err(ctrl->device, + dev_err(ns->ctrl->device, "identifiers changed for nsid %d\n", ns->head->ns_id); goto out_free_id; } |