Skip to contentSkip to conversation

nvme: use braces for list_for_each_entry() loops

PATCH In review Tokunori Ikegami 2 participants 2 messages Oct 20, 2024 – Oct 21, 2024 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme: use braces for list_for_each_entry() loops

The loops contain more than a single simple statement. So just fix to follow the coding-style process.

---
 drivers/nvme/host/multipath.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/nvme/host/multipath.c +6 -3
index 6a15873055b9..a335d3d65edd 100644
@@ -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)
Signature · 1 line
2.45.2