From patchwork Mon Jul 8 12:52:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 168634 Delivered-To: patch@linaro.org Received: by 2002:ac9:6410:0:0:0:0:0 with SMTP id r16csp6511530ock; Mon, 8 Jul 2019 05:52:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcLhwteYZc9lmBBcqgP5gEhJa1OkbKapQa7+JWNhh+1uL/E8DTB8XsQyb/bfEG00VBm7Tr X-Received: by 2002:a17:902:9f93:: with SMTP id g19mr24363934plq.223.1562590358323; Mon, 08 Jul 2019 05:52:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562590358; cv=none; d=google.com; s=arc-20160816; b=Hf4DsWZ9nmdtbYSE+8iPEuSJTjMipmX3EdBKUNaTACTf+BfVkJYFFO1Q4GcgIwWHTD mTkOvcmAg/aRZoeLeNK5ju4T+D3wm4kH2HOZ2CWbjEJ1yFNQ5AImJBiu5qX5mZeZhDns f1hWIh04cdyxwCJWVjxE2ybV2UfYd+S+gjd9EvJxh+hDIbgEcAiCOkt/Dg3FH2fy93tP WdCA0bk8HkNBcn9Npw2zAjMN4Fn/06c3JwVM185MlFyj+AwGaFYtwGkx38xRUydAzDqO UkTZLg7OIFQFgHTGCZ8XNMd0ZizcrHa53eMMt2xgB7UB02gv8og/pXUz91kEEMj8NC+l t1Ew== 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 l70si16849099pje.68.2019.07.08.05.52.38; Mon, 08 Jul 2019 05:52:38 -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 S1731062AbfGHMwg (ORCPT + 30 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 X-Provags-ID: V03:K1:cJtj1haBkBbWRm+C+Iua7rdvkbZLbR4MZWZ6z3vSC1X/PXqtkAs R+qNUxDsVrk6zgmmdUs6UXIxDw//8IMdKBSJyl1ZUQl9wsyHhvL31/QV8xXn9D8roifT7PY GZ1A9E8jTpmXrMwd7rc7egfuxl6cmhOPGYiLqpJKpDSL/DxvxmrJsuTXEe081AhSnUqL2GX Ub4oC7dZySA4sOigUqskA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:ITl96BottfQ=:qqxhzos/aOanf3aqBADACV JwgD/BUjtgaC1QokhGuyrwx9DsbxnL44mYL17o/rvkq300Dt+Iyleg1ZQwXxaUQ3vnRZAvEF5 xOEvUpaESSPGruqL33FOixV+UbWXKGDJn6tNBqOxunBZbQ2QQZT64w9L7ANwxAZwXsjrmmmT5 Rl1TvI0bxyEg8Bzub6PXaQL89ZLZsCW9JVrV/ShakwTiJcIusHUcNTuBSXuuNd+QlKHB+3pb7 PtwTXRrNEGANSh0UAi8Gw6HXax3DSOaqZcLy3nweZ2himUOJELhpVMQMPNcTypax5bEKG8TvD PL4QykHTINpFOQo7eu3Oj1CTPXEVazMUBTRjsuOGTR6pbjDRXvBZdxgl2XJRYpyYprEEnVl0t Ub1w5K4+yQG8XlHNCNPKUrtXz3TulnB9Wb7OSU/u4GAWRL7OEvsHHncCBgxyyta4+X3I/aPrn oTa8fnO+i8VLlgUYGmkZ32uv9tMjbNn1rao1HPmzu8QJ86UUbsNgdEg8UDh1iaGf2qNUOkarZ +hmD7nZH/2Y3jNzeO1gdirDawiVUBRztfjcloIbt++CucLtIuZmv3WBOK04ERzeawGNyRWyom HfeJn13r1mqX56Vg8d5IdgOiUSo+0XnvSOo37Iz3A7YZWP4uTCUPhV3nIESaeQd6Ukjf8U2fP Wb4ngytBXr4k5s64ogPVtk/CGed73Ns0xrh0/X2f+PCEQD0HvVVgmKCkD5A2vtFzhTfWSPrkN 4R0t/U9YTMtk/TpTC68ZfJTIJDUhFNxssqnwRA== 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(+) -- 2.20.0 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: