Merge tag 'powerpc-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[platform/kernel/linux-starfive.git] / drivers / md / dm-log.c
index aea95bc..afd94d2 100644 (file)
@@ -389,8 +389,7 @@ static int create_log_context(struct dm_dirty_log *log, struct dm_target *ti,
                else if (!strcmp(argv[1], "nosync"))
                        sync = NOSYNC;
                else {
-                       DMWARN("unrecognised sync argument to "
-                              "dirty region log: %s", argv[1]);
+                       DMWARN("unrecognised sync argument to dirty region log: %s", argv[1]);
                        return -EINVAL;
                }
        }
@@ -448,8 +447,7 @@ static int create_log_context(struct dm_dirty_log *log, struct dm_target *ti,
                 */
                buf_size =
                    dm_round_up((LOG_OFFSET << SECTOR_SHIFT) + bitset_size,
-                               bdev_logical_block_size(lc->header_location.
-                                                           bdev));
+                               bdev_logical_block_size(lc->header_location.bdev));
 
                if (buf_size > bdev_nr_bytes(dev->bdev)) {
                        DMWARN("log device %s too small: need %llu bytes",
@@ -655,12 +653,14 @@ static int disk_resume(struct dm_dirty_log *log)
 static uint32_t core_get_region_size(struct dm_dirty_log *log)
 {
        struct log_c *lc = (struct log_c *) log->context;
+
        return lc->region_size;
 }
 
 static int core_resume(struct dm_dirty_log *log)
 {
        struct log_c *lc = (struct log_c *) log->context;
+
        lc->sync_search = 0;
        return 0;
 }
@@ -668,12 +668,14 @@ static int core_resume(struct dm_dirty_log *log)
 static int core_is_clean(struct dm_dirty_log *log, region_t region)
 {
        struct log_c *lc = (struct log_c *) log->context;
+
        return log_test_bit(lc->clean_bits, region);
 }
 
 static int core_in_sync(struct dm_dirty_log *log, region_t region, int block)
 {
        struct log_c *lc = (struct log_c *) log->context;
+
        return log_test_bit(lc->sync_bits, region);
 }
 
@@ -726,12 +728,14 @@ static int disk_flush(struct dm_dirty_log *log)
 static void core_mark_region(struct dm_dirty_log *log, region_t region)
 {
        struct log_c *lc = (struct log_c *) log->context;
+
        log_clear_bit(lc, lc->clean_bits, region);
 }
 
 static void core_clear_region(struct dm_dirty_log *log, region_t region)
 {
        struct log_c *lc = (struct log_c *) log->context;
+
        if (likely(!lc->flush_failed))
                log_set_bit(lc, lc->clean_bits, region);
 }
@@ -784,7 +788,7 @@ static region_t core_get_sync_count(struct dm_dirty_log *log)
        do { \
                if (lc->sync != DEFAULTSYNC) \
                        DMEMIT("%ssync ", lc->sync == NOSYNC ? "no" : ""); \
-       } while (0);
+       } while (0)
 
 static int core_status(struct dm_dirty_log *log, status_type_t status,
                       char *result, unsigned int maxlen)