[PATCH] nvme : Revert NVME error report check
Sujaritha Sundaresan
sujaritha.sundaresan at intel.com
Wed Nov 27 17:56:19 UTC 2019
Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan at intel.com>
---
drivers/nvme/host/core.c | 28 ++++++----------------------
1 file changed, 6 insertions(+), 22 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index fa7ba09dca77..74bd630d01b6 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1708,11 +1708,9 @@ static void nvme_config_write_zeroes(struct gendisk *disk, struct nvme_ns *ns)
blk_queue_max_write_zeroes_sectors(disk->queue, max_sectors);
}
-static int nvme_report_ns_ids(struct nvme_ctrl *ctrl, unsigned int nsid,
+static void nvme_report_ns_ids(struct nvme_ctrl *ctrl, unsigned int nsid,
struct nvme_id_ns *id, struct nvme_ns_ids *ids)
{
- int ret = 0;
-
memset(ids, 0, sizeof(*ids));
if (ctrl->vs >= NVME_VS(1, 1, 0))
@@ -1723,12 +1721,10 @@ static int nvme_report_ns_ids(struct nvme_ctrl *ctrl, unsigned int nsid,
/* Don't treat error as fatal we potentially
* already have a NGUID or EUI-64
*/
- ret = nvme_identify_ns_descs(ctrl, nsid, ids);
- if (ret)
+ if (nvme_identify_ns_descs(ctrl, nsid, ids))
dev_warn(ctrl->device,
- "Identify Descriptors failed (%d)\n", ret);
+ "%s: Identify Descriptors failed\n", __func__);
}
- return ret;
}
static bool nvme_ns_ids_valid(struct nvme_ns_ids *ids)
@@ -1866,10 +1862,7 @@ static int nvme_revalidate_disk(struct gendisk *disk)
}
__nvme_revalidate_disk(disk, id);
- ret = nvme_report_ns_ids(ctrl, ns->head->ns_id, id, &ids);
- if (ret)
- goto free_id;
-
+ nvme_report_ns_ids(ctrl, ns->head->ns_id, id, &ids);
if (!nvme_ns_ids_equal(&ns->head->ids, &ids)) {
dev_err(ctrl->device,
"identifiers changed for nsid %d\n", ns->head->ns_id);
@@ -3340,9 +3333,7 @@ static struct nvme_ns_head *nvme_alloc_ns_head(struct nvme_ctrl *ctrl,
head->ns_id = nsid;
kref_init(&head->ref);
- ret = nvme_report_ns_ids(ctrl, nsid, id, &head->ids);
- if (ret)
- goto out_cleanup_srcu;
+ nvme_report_ns_ids(ctrl, nsid, id, &head->ids);
ret = __nvme_check_ids(ctrl->subsys, head);
if (ret) {
@@ -3367,8 +3358,6 @@ static struct nvme_ns_head *nvme_alloc_ns_head(struct nvme_ctrl *ctrl,
out_free_head:
kfree(head);
out:
- if (ret > 0)
- ret = blk_status_to_errno(nvme_error_status(ret));
return ERR_PTR(ret);
}
@@ -3392,10 +3381,7 @@ static int nvme_init_ns_head(struct nvme_ns *ns, unsigned nsid,
} else {
struct nvme_ns_ids ids;
- ret = nvme_report_ns_ids(ctrl, nsid, id, &ids);
- if (ret)
- goto out_unlock;
-
+ nvme_report_ns_ids(ctrl, nsid, id, &ids);
if (!nvme_ns_ids_equal(&head->ids, &ids)) {
dev_err(ctrl->device,
"IDs don't match for shared namespace %d\n",
@@ -3410,8 +3396,6 @@ static int nvme_init_ns_head(struct nvme_ns *ns, unsigned nsid,
out_unlock:
mutex_unlock(&ctrl->subsys->lock);
- if (ret > 0)
- ret = blk_status_to_errno(nvme_error_status(ret));
return ret;
}
--
2.22.0
More information about the Intel-gfx-trybot
mailing list