Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755378AbdC1KpD (ORCPT ); Tue, 28 Mar 2017 06:45:03 -0400 Received: from mail-vk0-f68.google.com ([209.85.213.68]:35549 "EHLO mail-vk0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755349AbdC1KpA (ORCPT ); Tue, 28 Mar 2017 06:45:00 -0400 MIME-Version: 1.0 In-Reply-To: <20170328095029.3500369-1-arnd@arndb.de> References: <20170328095029.3500369-1-arnd@arndb.de> From: Ming Lei Date: Tue, 28 Mar 2017 18:44:43 +0800 Message-ID: Subject: Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()" To: Arnd Bergmann Cc: Shaohua Li , NeilBrown , Jens Axboe , "colyli@suse.de" , Guoqing Jiang , Mike Christie , "open list:SOFTWARE RAID (Multiple Disks) SUPPORT" , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 943 Lines: 27 On Tue, Mar 28, 2017 at 5:49 PM, Arnd Bergmann wrote: > Commit 60928a91b0b3 ("md: raid1: use bio helper in process_checks()") > is probably correct, but I get a new compile-time warning after > it, and have trouble understanding what it fixes: > > drivers/md/raid1.c: In function 'sync_request_write': > drivers/md/raid1.c:2172:9: error: 'page_len$' may be used uninitialized in this function [-Werror=maybe-uninitialized] > if (memcmp(page_address(ppages[j]), > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > page_address(spages[j]), > ~~~~~~~~~~~~~~~~~~~~~~~~ > page_len[j])) > ~~~~~~~~~~~~ > drivers/md/raid1.c:2160:7: note: 'page_len$' was declared here > int page_len[RESYNC_PAGES]; > ^~~~~~~~ > > This reverts it to resolve the warning. Please try the following patch: https://lkml.org/lkml/2017/3/28/126 BTW, the compile failure is just a false positive. Thanks, Ming