Skip to content

Commit

Permalink
md: raid1: kill warning on powerpc_pseries
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ming1 authored and shligit committed Mar 28, 2017
1 parent 0bb0c10 commit 8fc04e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,7 @@ static void process_checks(struct r1bio *r1_bio)
struct page **ppages = get_resync_pages(pbio)->pages;
struct page **spages = get_resync_pages(sbio)->pages;
struct bio_vec *bi;
int page_len[RESYNC_PAGES];
int page_len[RESYNC_PAGES] = { 0 };

if (sbio->bi_end_io != end_sync_read)
continue;
Expand Down

0 comments on commit 8fc04e6

Please sign in to comment.