dm-bow: Fix the missing-prototypes warning 83/317483/2
authorJaehoon Chung <jh80.chung@samsung.com>
Thu, 2 Jan 2025 12:14:04 +0000 (21:14 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Thu, 2 Jan 2025 23:33:56 +0000 (08:33 +0900)
Since v6.8 kernel, turn on missing-prototypes globally.
During building with v6.12 kernel, it's showing some warning about missing-prototypes.

Refer: 0fcb70851fbf ("Makefile.extrawarn: turn on missing-prototypes globally")

Change-Id: Ie3227987f411ee837717ca773949e6ba0fb3854d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
kernel/dm-bow.c
kernel/zlogger/zlogger.c

index 2713b2295b67880ce08770db4fee1431fef4005e..2df6ef1f40f570d1a53d62e59d4ccb8fff6f4365 100644 (file)
@@ -95,13 +95,13 @@ struct bow_context {
        bool forward_trims;
 };
 
-sector_t range_top(struct bow_range *br)
+static sector_t range_top(struct bow_range *br)
 {
        return container_of(rb_next(&br->node), struct bow_range, node)
                ->sector;
 }
 
-u64 range_size(struct bow_range *br)
+static u64 range_size(struct bow_range *br)
 {
        return (range_top(br) - br->sector) * SECTOR_SIZE;
 }
@@ -146,7 +146,7 @@ static struct bow_range *find_first_overlapping_range(struct rb_root *ranges,
        return br;
 }
 
-void add_before(struct rb_root *ranges, struct bow_range *new_br,
+static void add_before(struct rb_root *ranges, struct bow_range *new_br,
                struct bow_range *existing)
 {
        struct rb_node *parent = &(existing->node);
@@ -791,7 +791,7 @@ bad:
        return ret;
 }
 
-void dm_bow_resume(struct dm_target *ti)
+static void dm_bow_resume(struct dm_target *ti)
 {
        struct mapped_device *md = dm_table_get_md(ti->table);
        struct bow_context *bc = ti->private;
@@ -1101,7 +1101,7 @@ static int remove_trim(struct bow_context *bc, struct bio *bio)
        return DM_MAPIO_REMAPPED;
 }
 
-int remap_unless_illegal_trim(struct bow_context *bc, struct bio *bio)
+static int remap_unless_illegal_trim(struct bow_context *bc, struct bio *bio)
 {
        if (!bc->forward_trims && bio_op(bio) == REQ_OP_DISCARD) {
                bio->bi_status = BLK_STS_NOTSUPP;
@@ -1257,7 +1257,7 @@ static void dm_bow_status(struct dm_target *ti, status_type_t type,
        }
 }
 
-int dm_bow_prepare_ioctl(struct dm_target *ti, struct block_device **bdev)
+static int dm_bow_prepare_ioctl(struct dm_target *ti, struct block_device **bdev)
 {
        struct bow_context *bc = ti->private;
        struct dm_dev *dev = bc->dev;
@@ -1293,7 +1293,7 @@ static struct target_type bow_target = {
        .io_hints = dm_bow_io_hints,
 };
 
-int __init dm_bow_init(void)
+static int __init dm_bow_init(void)
 {
        int r = dm_register_target(&bow_target);
 
@@ -1302,7 +1302,7 @@ int __init dm_bow_init(void)
        return r;
 }
 
-void dm_bow_exit(void)
+static void dm_bow_exit(void)
 {
        dm_unregister_target(&bow_target);
 }
index f5073a1ad69b951a4faa956d267b594246118dc9..44345cfcfa3260a4df107b77a2f795d2c0a7bc67 100644 (file)
@@ -653,7 +653,7 @@ static ssize_t init_file_zlog_tag_data(struct file *filep)
        return 0;
 }
 
-int update_zlog_data_buffer_size(struct zlog_file *zlog_file_data, size_t len)
+static int update_zlog_data_buffer_size(struct zlog_file *zlog_file_data, size_t len)
 {
        char *new_buffer = kmalloc(len, GFP_KERNEL);