[PATCH] remove all blanks in front of goto label
Chaitanya Kulkarni
Chaitanya.Kulkarni at wdc.com
Sun Jun 20 20:23:34 PDT 2021
Keith/Christoph,
On 6/19/21 00:49, Ming.Li wrote:
> There is a format style mistake. Some blanks in front of goto label.
>
> Signed-off-by: Ming.Li <mingli199x at qq.com>
> ---
> drivers/nvme/host/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index a29b170701fc..bf3deda1561e 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -2780,7 +2780,7 @@ static int nvme_dev_map(struct nvme_dev *dev)
> goto release;
>
> return 0;
> - release:
> +release:
> pci_release_mem_regions(pdev);
> return -ENODEV;
> }
> -- 2.24.3 (Apple Git-128)
While reviewing this patch I found that on the host side there
are many places where we've spaces before goto labeldefinition,
perhaps following cleanup is useful ?
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 559637ebda25..03c8201d15b2 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1095,7 +1095,7 @@ int __nvme_submit_sync_cmd(struct request_queue
*q, struct nvme_command *cmd,
ret = -EINTR;
else
ret = nvme_req(req)->status;
- out:
+out:
blk_mq_free_request(req);
return ret;
}
@@ -3997,9 +3997,9 @@ static int nvme_scan_ns_list(struct nvme_ctrl *ctrl)
nvme_ns_remove_by_nsid(ctrl, prev);
}
}
- out:
+out:
nvme_remove_invalid_namespaces(ctrl, prev);
- free:
+free:
kfree(ns_list);
return ret;
}
diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c
index d93928d1e5bd..49a9e376251c 100644
--- a/drivers/nvme/host/ioctl.c
+++ b/drivers/nvme/host/ioctl.c
@@ -105,10 +105,10 @@ static int nvme_submit_user_cmd(struct
request_queue *q,
ret = -EFAULT;
}
kfree(meta);
- out_unmap:
+out_unmap:
if (bio)
blk_rq_unmap_user(bio);
- out:
+out:
blk_mq_free_request(req);
return ret;
}
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index d3c5086673bc..1519433d541f 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2188,7 +2188,7 @@ static int nvme_setup_io_queues(struct nvme_dev *dev)
} while (1);
adminq->q_db = dev->dbs;
- retry:
+retry:
/* Deregister the admin queue's interrupt */
pci_free_irq(pdev, 0, adminq);
@@ -2279,7 +2279,7 @@ static bool __nvme_disable_io_queues(struct
nvme_dev *dev, u8 opcode)
int nr_queues = dev->online_queues - 1, sent = 0;
unsigned long timeout;
- retry:
+retry:
timeout = NVME_ADMIN_TIMEOUT;
while (nr_queues > 0) {
if (nvme_delete_queue(&dev->queues[nr_queues], opcode))
@@ -2428,7 +2428,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)
pci_save_state(pdev);
return 0;
- disable:
+disable:
pci_disable_device(pdev);
return result;
}
@@ -2702,9 +2702,9 @@ static void nvme_reset_work(struct work_struct *work)
nvme_start_ctrl(&dev->ctrl);
return;
- out_unlock:
+out_unlock:
mutex_unlock(&dev->shutdown_lock);
- out:
+out:
if (result)
dev_warn(dev->ctrl.device,
"Removing after probe failure status: %d\n",
result);
@@ -2905,15 +2905,15 @@ static int nvme_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
return 0;
- release_mempool:
+release_mempool:
mempool_destroy(dev->iod_mempool);
- release_pools:
+release_pools:
nvme_release_prp_pools(dev);
- unmap:
+unmap:
nvme_dev_unmap(dev);
put_pci:
put_device(dev->dev);
- free:
+free:
kfree(dev->queues);
kfree(dev);
return result;
More information about the Linux-nvme
mailing list