diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2023-01-25 22:57:42 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2023-02-14 14:23:06 -0500 |
commit | 96422281baf57f4d9418581fdfaca9617bb805e1 (patch) | |
tree | e4eaaa5be5e4ef30d733ad17d31d0747fecf3111 /drivers | |
parent | 2f06cd12e11422e4a44ad4cb856c3ef0be9bd208 (diff) | |
download | linux-stable-96422281baf57f4d9418581fdfaca9617bb805e1.tar.gz linux-stable-96422281baf57f4d9418581fdfaca9617bb805e1.tar.bz2 linux-stable-96422281baf57f4d9418581fdfaca9617bb805e1.zip |
dm: address space issues relative to switch/while/for/...
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-bio-prison-v2.c | 2 | ||||
-rw-r--r-- | drivers/md/dm-cache-metadata.c | 8 | ||||
-rw-r--r-- | drivers/md/dm-log.c | 4 | ||||
-rw-r--r-- | drivers/md/dm-mpath.c | 2 | ||||
-rw-r--r-- | drivers/md/dm-ps-io-affinity.c | 2 | ||||
-rw-r--r-- | drivers/md/dm-ps-round-robin.c | 2 | ||||
-rw-r--r-- | drivers/md/dm-zoned-metadata.c | 4 |
7 files changed, 12 insertions, 12 deletions
diff --git a/drivers/md/dm-bio-prison-v2.c b/drivers/md/dm-bio-prison-v2.c index 8c8da49e39cd..fd852981ef9c 100644 --- a/drivers/md/dm-bio-prison-v2.c +++ b/drivers/md/dm-bio-prison-v2.c @@ -195,7 +195,7 @@ static bool __put(struct dm_bio_prison_v2 *prison, // FIXME: shared locks granted above the lock level could starve this if (!cell->shared_count) { - if (cell->exclusive_lock){ + if (cell->exclusive_lock) { if (cell->quiesce_continuation) { queue_work(prison->wq, cell->quiesce_continuation); cell->quiesce_continuation = NULL; diff --git a/drivers/md/dm-cache-metadata.c b/drivers/md/dm-cache-metadata.c index c7c7b4d53fd1..f6817a371ddb 100644 --- a/drivers/md/dm-cache-metadata.c +++ b/drivers/md/dm-cache-metadata.c @@ -1010,13 +1010,13 @@ static bool cmd_write_lock(struct dm_cache_metadata *cmd) do { \ if (!cmd_write_lock((cmd))) \ return -EINVAL; \ - } while(0) + } while (0) #define WRITE_LOCK_VOID(cmd) \ do { \ if (!cmd_write_lock((cmd))) \ return; \ - } while(0) + } while (0) #define WRITE_UNLOCK(cmd) \ up_write(&(cmd)->root_lock) @@ -1035,13 +1035,13 @@ static bool cmd_read_lock(struct dm_cache_metadata *cmd) do { \ if (!cmd_read_lock((cmd))) \ return -EINVAL; \ - } while(0) + } while (0) #define READ_LOCK_VOID(cmd) \ do { \ if (!cmd_read_lock((cmd))) \ return; \ - } while(0) + } while (0) #define READ_UNLOCK(cmd) \ up_read(&(cmd)->root_lock) diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index 7c3f30c58785..c87d8758718d 100644 --- a/drivers/md/dm-log.c +++ b/drivers/md/dm-log.c @@ -784,7 +784,7 @@ static int core_status(struct dm_dirty_log *log, status_type_t status, int sz = 0; struct log_c *lc = log->context; - switch(status) { + switch (status) { case STATUSTYPE_INFO: DMEMIT("1 %s", log->type->name); break; @@ -809,7 +809,7 @@ static int disk_status(struct dm_dirty_log *log, status_type_t status, int sz = 0; struct log_c *lc = log->context; - switch(status) { + switch (status) { case STATUSTYPE_INFO: DMEMIT("3 %s %s %c", log->type->name, lc->log_dev->name, lc->log_dev_flush_failed ? 'F' : diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 27aa062590ea..18df7ff98203 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -1822,7 +1822,7 @@ static void multipath_status(struct dm_target *ti, status_type_t type, if (test_bit(MPATHF_RETAIN_ATTACHED_HW_HANDLER, &m->flags)) DMEMIT("retain_attached_hw_handler "); if (m->queue_mode != DM_TYPE_REQUEST_BASED) { - switch(m->queue_mode) { + switch (m->queue_mode) { case DM_TYPE_BIO_BASED: DMEMIT("queue_mode bio "); break; diff --git a/drivers/md/dm-ps-io-affinity.c b/drivers/md/dm-ps-io-affinity.c index 76ce4ce87222..461ee6b2044d 100644 --- a/drivers/md/dm-ps-io-affinity.c +++ b/drivers/md/dm-ps-io-affinity.c @@ -162,7 +162,7 @@ static int ioa_status(struct path_selector *ps, struct dm_path *path, return sz; } - switch(type) { + switch (type) { case STATUSTYPE_INFO: DMEMIT("%d ", atomic_read(&s->map_misses)); break; diff --git a/drivers/md/dm-ps-round-robin.c b/drivers/md/dm-ps-round-robin.c index aaf805efaedd..7c2dda9e871c 100644 --- a/drivers/md/dm-ps-round-robin.c +++ b/drivers/md/dm-ps-round-robin.c @@ -94,7 +94,7 @@ static int rr_status(struct path_selector *ps, struct dm_path *path, if (!path) DMEMIT("0 "); else { - switch(type) { + switch (type) { case STATUSTYPE_INFO: break; case STATUSTYPE_TABLE: diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index c795ea7da791..35bdb83e3a6e 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm-zoned-metadata.c @@ -1430,7 +1430,7 @@ static int dmz_emulate_zones(struct dmz_metadata *zmd, struct dmz_dev *dev) int idx; sector_t zone_offset = 0; - for(idx = 0; idx < dev->nr_zones; idx++) { + for (idx = 0; idx < dev->nr_zones; idx++) { struct dm_zone *zone; zone = dmz_insert(zmd, idx, dev); @@ -1457,7 +1457,7 @@ static void dmz_drop_zones(struct dmz_metadata *zmd) { int idx; - for(idx = 0; idx < zmd->nr_zones; idx++) { + for (idx = 0; idx < zmd->nr_zones; idx++) { struct dm_zone *zone = xa_load(&zmd->zones, idx); kfree(zone); |