[PATCH 04/20] nvme: rename nvme_validate_ns to nvme_validate_or_alloc_ns
Damien Le Moal
Damien.LeMoal at wdc.com
Mon Sep 28 10:19:44 EDT 2020
On 2020/09/28 21:35, Christoph Hellwig wrote:
> Use a slightly more descriptive name to enable reusing nvme_validate_ns
> in the next patch for a lower level function.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
> drivers/nvme/host/core.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index d4b5032084972a..c5f2615bf58374 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -4021,7 +4021,7 @@ static void nvme_ns_remove_by_nsid(struct nvme_ctrl *ctrl, u32 nsid)
> }
> }
>
> -static void nvme_validate_ns(struct nvme_ctrl *ctrl, unsigned nsid)
> +static void nvme_validate_or_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
> {
> struct nvme_ns *ns;
> int ret;
> @@ -4083,7 +4083,7 @@ static int nvme_scan_ns_list(struct nvme_ctrl *ctrl)
>
> if (!nsid) /* end of the list? */
> goto out;
> - nvme_validate_ns(ctrl, nsid);
> + nvme_validate_or_alloc_ns(ctrl, nsid);
> while (++prev < nsid)
> nvme_ns_remove_by_nsid(ctrl, prev);
> }
> @@ -4106,7 +4106,7 @@ static void nvme_scan_ns_sequential(struct nvme_ctrl *ctrl)
> kfree(id);
>
> for (i = 1; i <= nn; i++)
> - nvme_validate_ns(ctrl, i);
> + nvme_validate_or_alloc_ns(ctrl, i);
>
> nvme_remove_invalid_namespaces(ctrl, nn);
> }
>
Looks good.
Reviewed-by: Damien Le Moal <damien.lemoal at wdc.com>
--
Damien Le Moal
Western Digital Research
More information about the Linux-nvme
mailing list