linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Zhou <dennis@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Dennis Zhou <dennis@kernel.org>, Tejun Heo <tj@kernel.org>,
	Christoph Lameter <cl@linux.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Peng Fan <peng.fan@nxp.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mike Rapoport <rppt@linux.ibm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Dennis Zhou (Facebook)" <dennisszhou@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] percpu: fix pcpu_page_first_chunk return code handling
Date: Mon, 8 Jul 2019 10:50:02 -0400	[thread overview]
Message-ID: <20190708145002.GA17098@dennisz-mbp> (raw)
In-Reply-To: <20190708125217.3757973-1-arnd@arndb.de>

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 <arnd@arndb.de>
> ---
>  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


      reply	other threads:[~2019-07-08 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 12:52 Arnd Bergmann
2019-07-08 14:50 ` Dennis Zhou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190708145002.GA17098@dennisz-mbp \
    --to=dennis@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=cl@linux.com \
    --cc=dennisszhou@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peng.fan@nxp.com \
    --cc=rppt@linux.ibm.com \
    --cc=tj@kernel.org \
    --cc=wangkefeng.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox