* [PATCH] remove all blanks in front of goto label
@ 2021-06-19 7:40 Ming.Li
2021-06-21 2:49 ` Chaitanya Kulkarni
2021-06-21 3:23 ` Chaitanya Kulkarni
0 siblings, 2 replies; 4+ messages in thread
From: Ming.Li @ 2021-06-19 7:40 UTC (permalink / raw)
To: axboe, linux-nvme; +Cc: mingli199x
There is a format style mistake. Some blanks in front of goto label.
Signed-off-by: Ming.Li <mingli199x@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)
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] remove all blanks in front of goto label
2021-06-19 7:40 [PATCH] remove all blanks in front of goto label Ming.Li
@ 2021-06-21 2:49 ` Chaitanya Kulkarni
2021-06-21 3:23 ` Chaitanya Kulkarni
1 sibling, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2021-06-21 2:49 UTC (permalink / raw)
To: Ming.Li, axboe, linux-nvme
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@qq.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] remove all blanks in front of goto label
2021-06-19 7:40 [PATCH] remove all blanks in front of goto label Ming.Li
2021-06-21 2:49 ` Chaitanya Kulkarni
@ 2021-06-21 3:23 ` Chaitanya Kulkarni
2021-06-21 5:31 ` Christoph Hellwig
1 sibling, 1 reply; 4+ messages in thread
From: Chaitanya Kulkarni @ 2021-06-21 3:23 UTC (permalink / raw)
To: Christoph Hellwig, Keith Busch; +Cc: axboe, linux-nvme
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@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;
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] remove all blanks in front of goto label
2021-06-21 3:23 ` Chaitanya Kulkarni
@ 2021-06-21 5:31 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2021-06-21 5:31 UTC (permalink / raw)
To: Chaitanya Kulkarni; +Cc: Christoph Hellwig, Keith Busch, axboe, linux-nvme
On Mon, Jun 21, 2021 at 03:23:34AM +0000, Chaitanya Kulkarni wrote:
> 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 ?
This is a pretty common style in Linux. Please don't touch it for
existing code.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-21 5:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-19 7:40 [PATCH] remove all blanks in front of goto label Ming.Li
2021-06-21 2:49 ` Chaitanya Kulkarni
2021-06-21 3:23 ` Chaitanya Kulkarni
2021-06-21 5:31 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.