From: Christoph Hellwig Date: Thu, 15 Jun 2023 06:48:31 +0000 (+0200) Subject: md-bitmap: initialize variables at declaration time in md_bitmap_file_unmap X-Git-Tag: v6.6.17~4087^2~40^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=546ac0b2e2b15d0af7e6d10506558dded1d9d54a;p=platform%2Fkernel%2Flinux-rpi.git md-bitmap: initialize variables at declaration time in md_bitmap_file_unmap Just a small tidyup to prepare for bigger changes. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Himanshu Madhani Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230615064840.629492-3-hch@lst.de --- diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index d846972..0b2d893 100644 --- a/drivers/md/md-bitmap.c +++ b/drivers/md/md-bitmap.c @@ -842,14 +842,10 @@ static int md_bitmap_storage_alloc(struct bitmap_storage *store, static void md_bitmap_file_unmap(struct bitmap_storage *store) { - struct page **map, *sb_page; - int pages; - struct file *file; - - file = store->file; - map = store->filemap; - pages = store->file_pages; - sb_page = store->sb_page; + struct file *file = store->file; + struct page *sb_page = store->sb_page; + struct page **map = store->filemap; + int pages = store->file_pages; while (pages--) if (map[pages] != sb_page) /* 0 is sb_page, release it below */