[PATCH] nvme: use braces for list_for_each_entry() loops
Tokunori Ikegami
ikegami.t at gmail.com
Sun Oct 20 09:13:22 PDT 2024
The loops contain more than a single simple statement.
So just fix to follow the coding-style process.
Signed-off-by: Tokunori Ikegami <ikegami.t at gmail.com>
---
drivers/nvme/host/multipath.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 6a15873055b9..a335d3d65edd 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -58,9 +58,10 @@ void nvme_mpath_unfreeze(struct nvme_subsystem *subsys)
struct nvme_ns_head *h;
lockdep_assert_held(&subsys->lock);
- list_for_each_entry(h, &subsys->nsheads, entry)
+ list_for_each_entry(h, &subsys->nsheads, entry) {
if (h->disk)
blk_mq_unfreeze_queue(h->disk->queue);
+ }
}
void nvme_mpath_wait_freeze(struct nvme_subsystem *subsys)
@@ -68,9 +69,10 @@ void nvme_mpath_wait_freeze(struct nvme_subsystem *subsys)
struct nvme_ns_head *h;
lockdep_assert_held(&subsys->lock);
- list_for_each_entry(h, &subsys->nsheads, entry)
+ list_for_each_entry(h, &subsys->nsheads, entry) {
if (h->disk)
blk_mq_freeze_queue_wait(h->disk->queue);
+ }
}
void nvme_mpath_start_freeze(struct nvme_subsystem *subsys)
@@ -78,9 +80,10 @@ void nvme_mpath_start_freeze(struct nvme_subsystem *subsys)
struct nvme_ns_head *h;
lockdep_assert_held(&subsys->lock);
- list_for_each_entry(h, &subsys->nsheads, entry)
+ list_for_each_entry(h, &subsys->nsheads, entry) {
if (h->disk)
blk_freeze_queue_start(h->disk->queue);
+ }
}
void nvme_failover_req(struct request *req)
--
2.45.2
More information about the Linux-nvme
mailing list