From: Mike Snitzer <snitzer@kernel.org>
To: dm-devel@redhat.com
Cc: ebiggers@kernel.org, Heinz Mauelshagen <heinzm@redhat.com>,
Mike Snitzer <snitzer@kernel.org>
Subject: [dm-devel] [PATCH 08/39] dm: address space issues relative to switch/while/for/...
Date: Mon, 13 Feb 2023 15:13:30 -0500 [thread overview]
Message-ID: <20230213201401.45973-9-snitzer@kernel.org> (raw)
In-Reply-To: <20230213201401.45973-1-snitzer@kernel.org>
From: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
---
drivers/md/dm-bio-prison-v2.c | 2 +-
drivers/md/dm-cache-metadata.c | 8 ++++----
drivers/md/dm-log.c | 4 ++--
drivers/md/dm-mpath.c | 2 +-
drivers/md/dm-ps-io-affinity.c | 2 +-
drivers/md/dm-ps-round-robin.c | 2 +-
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 3b4875a8488c..388d7c88e4d5 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 94634a901157..ddcd633cce4b 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 3cd166d3a7a8..2601dc9acb08 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 a8fcb41878fe..c882d6e8dfdb 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 3cc80efbadd2..85ca14f87873 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);
--
2.37.0 (Apple Git-136)
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2023-02-13 20:14 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 20:13 [dm-devel] [PATCH 00/39] dm: fix checkpatch errors and warnings Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 01/39] dm: add missing SPDX-License-Indentifiers Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 02/39] dm: prefer kmap_local_page() instead of deprecated kmap_atomic() Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 03/39] dm: use fsleep() instead of msleep() for deterministic sleep duration Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 04/39] dm: change "unsigned" to "unsigned int" Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 05/39] dm: avoid assignment in if conditions Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 06/39] dm: enclose complex macros into parentheses where possible Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 07/39] dm: avoid initializing static variables Mike Snitzer
2023-02-13 20:13 ` Mike Snitzer [this message]
2023-02-13 20:13 ` [dm-devel] [PATCH 09/39] dm: address indent/space issues Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 10/39] dm: correct block comments format Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 11/39] dm: fix undue/missing spaces Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 12/39] dm: fix trailing statements Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 13/39] dm crypt: correct 'foo*' to 'foo *' Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 14/39] dm block-manager: avoid not required parentheses Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 15/39] dm: avoid spaces before function arguments or in favour of tabs Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 16/39] dm: add argument identifier names Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 17/39] dm: add missing empty lines Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 18/39] dm: remove unnecessary braces from single statement blocks Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 19/39] dm: avoid split of quoted strings where possible Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 20/39] dm: adjust EXPORT_SYMBOL() to follow functions immediately Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 21/39] dm: prefer '"%s...", __func__' Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 22/39] dm: avoid using symbolic permissions Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 23/39] dm: favour __aligned(N) versus "__attribute__ (aligned(N))" Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 24/39] dm: favour __packed versus "__attribute__ ((packed))" Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 25/39] dm: avoid useless 'else' after 'break' or return' Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 26/39] dm: add missing blank line after declarations/fix those Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 27/39] dm: avoid inline filenames Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 28/39] dm: don't indent labels Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 29/39] dm ioctl: have constant on the right side of the test Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 30/39] dm log: avoid trailing semicolon in macro Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 31/39] dm log: avoid multiple line dereference Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 32/39] dm: avoid 'do {} while(0)' loop in single statement macros Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 33/39] dm: fix use of sizeof() macro Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 34/39] dm integrity: change macros min/max() -> min_t/max_t where appropriate Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 35/39] dm: avoid void function return statements Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 36/39] dm ioctl: prefer strscpy() instead of strlcpy() Mike Snitzer
2023-02-13 20:13 ` [dm-devel] [PATCH 37/39] dm: fix suspect indent whitespace Mike Snitzer
2023-02-13 20:14 ` [dm-devel] [PATCH 38/39] dm: declare variables static when sensible Mike Snitzer
2023-02-13 20:14 ` [dm-devel] [PATCH 39/39] dm clone: prefer kvmalloc_array() Mike Snitzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230213201401.45973-9-snitzer@kernel.org \
--to=snitzer@kernel.org \
--cc=dm-devel@redhat.com \
--cc=ebiggers@kernel.org \
--cc=heinzm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.