Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6908126ybi; Mon, 8 Jul 2019 10:38:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyC5JMItQblnoIxAb92RSy6WgMhHVx04Sbhthrtb2X2kfGH9jWFb/Tj0Sqj4XQe9kLcxmQy X-Received: by 2002:a17:902:28e9:: with SMTP id f96mr25531953plb.114.1562607508146; Mon, 08 Jul 2019 10:38:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562607508; cv=none; d=google.com; s=arc-20160816; b=OSM7BLQhgAZGWrI8alb/mxkD28+KXDQm8AfcIejz+5SwYNtItnR+ad+YKoubSkzLSj oho2uZ0ywh4AnHG3S0rADIP3cRwb01Z9VZHIhUgw3E4vfAYeNcpIhI3+LwLMz19G9y4w 3+0U0UQTSrkGUaH0o2OblB9aFighEiGHk3dltXe5jOxTEukCgle9pU2IbQdd8XJaP4kU hjy6eSPhAbRduglD+FQk4ZzK4TAKO94EQ5fO7lJ1DphejxAJgZErqdJpgphgSi04WWcV CfJOKAjnOPCYjAYcH3/MagGAY6Zo37a3PTe1MhaQtsS7DBMGjXLGXOQn2G+IxK6a9LxH qMlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=77Vp1juDzlRrpvVnwfZYS6xDqW19KpmeFqUsetecy2o=; b=rg1JCMnWsabEWfAs4V3UM1JjCR5R3CGP2s07xh7lfdtZ/0qkLQxdtlMCaC9yQSpcbl sKHkTTsjgtyN5ArA3RRibZvgJluxRNnfRfHzDXb0Ul7LsTd+Ateg5y2GC0qDlQe3/GmH Q43TvNy0qG/HEBR42JGUsH/v35kQoKJf2ksQsB78V9AVbIgjVrrGs7054cnzYMJFSBsx HemcjYkfE0je6uAkWFcLR3gYtuP7x9h9FHo/hjDE0mfG/SO4CnPOr2W6kciuHJqszBRo Iq99rbBtosjrMVbmSrVGTybnKpNl5IVtBIciQA++PjrA4Aoax1FQohQ4y+/akJJOOC6K pwNQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i186si23337401pge.9.2019.07.08.10.38.13; Mon, 08 Jul 2019 10:38:28 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731058AbfGHMwg (ORCPT + 99 others); Mon, 8 Jul 2019 08:52:36 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:34375 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728615AbfGHMwf (ORCPT ); Mon, 8 Jul 2019 08:52:35 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MALql-1hd0Lw2Uqh-00Bs63; Mon, 08 Jul 2019 14:52:19 +0200 From: Arnd Bergmann To: Dennis Zhou , Tejun Heo , Christoph Lameter Cc: Arnd Bergmann , Kefeng Wang , Peng Fan , Andrew Morton , Mike Rapoport , Greg Kroah-Hartman , "Dennis Zhou (Facebook)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] percpu: fix pcpu_page_first_chunk return code handling Date: Mon, 8 Jul 2019 14:52:09 +0200 Message-Id: <20190708125217.3757973-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Enco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IJDUhFNxssqnwRA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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