Skip to content

Commit 8fc04e6

Browse files
ming1shligit
authored andcommitted
md: raid1: kill warning on powerpc_pseries
This patch kills the warning reported on powerpc_pseries, and actually we don't need the initialization. After merging the md tree, today's linux-next build (powerpc pseries_le_defconfig) produced this warning: drivers/md/raid1.c: In function 'raid1d': drivers/md/raid1.c:2172:9: warning: 'page_len$' may be used uninitialized in this function [-Wmaybe-uninitialized] if (memcmp(page_address(ppages[j]), ^ drivers/md/raid1.c:2160:7: note: 'page_len$' was declared here int page_len[RESYNC_PAGES]; ^ Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Shaohua Li <shli@fb.com>
1 parent 0bb0c10 commit 8fc04e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/raid1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2157,7 +2157,7 @@ static void process_checks(struct r1bio *r1_bio)
21572157
struct page **ppages = get_resync_pages(pbio)->pages;
21582158
struct page **spages = get_resync_pages(sbio)->pages;
21592159
struct bio_vec *bi;
2160-
int page_len[RESYNC_PAGES];
2160+
int page_len[RESYNC_PAGES] = { 0 };
21612161

21622162
if (sbio->bi_end_io != end_sync_read)
21632163
continue;

0 commit comments

Comments
 (0)