ANDROID: dm-bow: Fix empty else blocks 38/317138/1 accepted/tizen/unified/20250101.165744 accepted/tizen/unified/x/20250101.210646
authorPaul Lawrence <paullawrence@google.com>
Wed, 11 Sep 2024 19:53:39 +0000 (12:53 -0700)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 23 Dec 2024 09:30:33 +0000 (18:30 +0900)
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
Test: compiles
Signed-off-by: Paul Lawrence <paullawrence@google.com>
[jh80.chung: Taken from Android Common Kernel repo]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Ib6ea01a36c0300aba512a743e658737afcc9ebfa

kernel/dm-bow.c

index f8ccfad74a35a0c1c803c6ce509b9a050c30b4ea..3d577a3364547fe5ded195cac2b01a581de31111 100644 (file)
@@ -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);
        }