From 4bcafa4d00932c69559ed8af28fb6813a1be9097 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Wed, 11 Sep 2024 12:53:39 -0700 Subject: [PATCH] ANDROID: dm-bow: Fix empty else blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit drivers/md/dm-bow.c:1149:51: error: suggest braces around empty body in an ‘else’ statement [-Werror=empty-body] drivers/md/dm-bow.c:1142:51: error: suggest braces around empty body in an ‘else’ statement [-Werror=empty-body] Link to kernelci result: https://linux.kernelci.org/build/android/branch/android-mainline/kernel/v6.11-rc6-6389-g1cf1608b4abd8/ Build log: https://storage.kernelci.org/android/android-mainline/v6.11-rc6-6389-g1cf1608b4abd8/x86_64/allmodconfig/gcc-12/logs/kernel.log Bug: 366029436 Bug: 379587919 Test: compiles Change-Id: I685754e895ef1cdfd7ab1ae323b36b4ae310a45d Signed-off-by: Paul Lawrence --- drivers/md/dm-bow.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/md/dm-bow.c b/drivers/md/dm-bow.c index c4807e36a833..a9764ea8940f 100644 --- a/drivers/md/dm-bow.c +++ b/drivers/md/dm-bow.c @@ -1138,18 +1138,15 @@ static int dm_bow_map(struct dm_target *ti, struct bio *bio) ret = add_trim(bc, bio); else if (bio_data_dir(bio) == WRITE) ret = remove_trim(bc, bio); - else - /* pass-through */; + /* else pass-through */ } else if (state == CHECKPOINT) { if (bio->bi_iter.bi_sector == 0) ret = handle_sector0(bc, bio); else if (bio_data_dir(bio) == WRITE) ret = queue_write(bc, bio); - else - /* pass-through */; - } else { - /* pass-through */ + /* else pass-through */ } + /* else pass-through */ mutex_unlock(&bc->ranges_lock); }