Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7002280ybi; Mon, 8 Jul 2019 12:28:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzI4zsC0ImPpinFIJRmlZzz6PjBHvTbzzZTSCNkPoKUn8hC3xdjWU+/QWMP+ASIp9uvL56V X-Received: by 2002:a17:90a:ab01:: with SMTP id m1mr26851400pjq.69.1562614080481; Mon, 08 Jul 2019 12:28:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562614080; cv=none; d=google.com; s=arc-20160816; b=rw6fjobkTFEwurlMYYm2EhK4XVdnAY8ydlTXBHLmTOJS/i9tRX2GBKimzs9HTWXOwx RJA/fv0P8HeIOsK7Ln9ojRHZU35X8HsEm5odw7sgzGbT7sQFdCW3weTnt5yJHOOKstyw /KlXvn/A6qjIgmiWE1ctt8S8RkSFAKXxy6yXQmQRaRwteUCSJetH9lOLHi9E/xakST2i Kl9qeeLLU8nbbvgbuukPscKnRQwuthznxK3IZe5qTSeL7ifE0CKizT9+71oEPanxbXRn M9UAvcN3vt/RfZkHu78FTBzwt9Ax2Pyqhd2xXYkXuT+OQyxnX0jFjam9i36oeHWOtHF5 MQdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=m4lJKeNqPF6PUhJfVn2/MLy0a1U7ORLGNDoWGGROjW8=; b=KXhxXJwJrrR7GaBnDh1DThDcvPw0T43eh9Zgri0RXgxSIwNMEvyolVIsNNlS3iV2gH yXU3PjpewJxnIOnFTRfiTfVAx0j5OxHuKM8WJdCPXL7WN1tkkru2buyaNUFLpRy0KDWZ 359DngzDjlfF8kE+0vhOIytbVkosBAc0UAQfstKERs8qSFxlfNHLjyLhrPHOPMtA5LLx LN6cNpKghg63Ej1s/tUgDSC+cTxlP/31rVf0y+7xMdBdwnggAeP/vNKwP7r39S5aqwBn M+yQsUT+pdCoqyliOP3FrC8Q7d8AuKxeG3pQKQdCTI1unp4DEXFp9Kw6FImoy99PEeVp TsPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bx21si419503pjb.21.2019.07.08.12.27.45; Mon, 08 Jul 2019 12:28:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731906AbfGHOuG (ORCPT + 99 others); Mon, 8 Jul 2019 10:50:06 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:41781 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725905AbfGHOuF (ORCPT ); Mon, 8 Jul 2019 10:50:05 -0400 Received: by mail-qk1-f196.google.com with SMTP id v22so13487452qkj.8 for ; Mon, 08 Jul 2019 07:50:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=m4lJKeNqPF6PUhJfVn2/MLy0a1U7ORLGNDoWGGROjW8=; b=C7A5mLSiTfjgbzYTC3X6pmXN7G3Wa0TtLyNnOcY+pfGI7T0WZc5M/R2HsIgD+YdQsK eBhyIx56QXOIenHYBSVIn5kiePzp9OrF6DSOXDoHLKZ9sDktvhuqOddkDWRXMPAkDfqf 3hxWPyzc/G2gDvbkL8XjGo2BSYPAipm/Dxh8RqebqTomEybidCUKAkHXKvSsH5kDGdb6 IFbnAwzFkOzkAcjF/gHCBS+BAe8M1QmocAucp0bEzqcyDxXWVcDX2Tza1HfNAgIdySM5 hq8wZeLaRg7vEAB44XJasKPie3agTxDLA/8Tu8W79Z/PRFx+ZuagUn4RnRioiVR3jRa2 itpQ== X-Gm-Message-State: APjAAAWL257FaERG0nIDvS1DWk1zzNlD3Gyn0zIFxdQ0fHlemh8+N4Z+ RRF1ohxQle6tEnGRAMu6mIrKiyFSTFM= X-Received: by 2002:a37:2c46:: with SMTP id s67mr15092125qkh.396.1562597404820; Mon, 08 Jul 2019 07:50:04 -0700 (PDT) Received: from dennisz-mbp ([2620:10d:c091:500::3:8b5a]) by smtp.gmail.com with ESMTPSA id a6sm6872044qkn.59.2019.07.08.07.50.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jul 2019 07:50:03 -0700 (PDT) Date: Mon, 8 Jul 2019 10:50:02 -0400 From: Dennis Zhou To: Arnd Bergmann Cc: Dennis Zhou , Tejun Heo , Christoph Lameter , Kefeng Wang , Peng Fan , Andrew Morton , Mike Rapoport , Greg Kroah-Hartman , "Dennis Zhou (Facebook)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] percpu: fix pcpu_page_first_chunk return code handling Message-ID: <20190708145002.GA17098@dennisz-mbp> References: <20190708125217.3757973-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190708125217.3757973-1-arnd@arndb.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 08, 2019 at 02:52:09PM +0200, Arnd Bergmann wrote: > gcc complains that pcpu_page_first_chunk() might return an uninitialized > error code when the loop is never entered: > > mm/percpu.c: In function 'pcpu_page_first_chunk': > mm/percpu.c:2929:9: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > Make it return zero like before the cleanup. > > Fixes: a13e0ad81216 ("percpu: Make pcpu_setup_first_chunk() void function") > Signed-off-by: Arnd Bergmann > --- > mm/percpu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/percpu.c b/mm/percpu.c > index 5a918a4b1da0..5b65f753c575 100644 > --- a/mm/percpu.c > +++ b/mm/percpu.c > @@ -2917,6 +2917,7 @@ int __init pcpu_page_first_chunk(size_t reserved_size, > ai->reserved_size, ai->dyn_size); > > pcpu_setup_first_chunk(ai, vm.addr); > + rc = 0; > goto out_free_ar; > > enomem: > -- > 2.20.0 > Hi Arnd, I got the report for the kbuild bot. I have the fix in my tree already. Thanks, Dennis