Received: by 10.223.164.221 with SMTP id h29csp2065345wrb; Thu, 2 Nov 2017 05:26:52 -0700 (PDT) X-Google-Smtp-Source: ABhQp+R6ACrccGf+3W4FQImnhtuNXFNncfOX1vz7Nn5tzHnZ0kuC+/kzqzYitIr0lnVS4GrSdXuV X-Received: by 10.99.135.199 with SMTP id i190mr3387544pge.5.1509625612496; Thu, 02 Nov 2017 05:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509625612; cv=none; d=google.com; s=arc-20160816; b=x/oOyMQufrNgMOGQTQr9D0+J7WHL8VLcnvGLmfMUugR86zkg0V26yfmyfmnV3rddKH YBzzwe7Q80y1DrEBk8Yjk3KrYHaYFcjtpW2IPtBVoRNRQ82RD4t9WJpWwnYFJrr6O3je wnLc4UR6Fl1t+A4IPlEgQ2HHiGGnnxxuxY1MzTWKchCkLX0Q/+EsQ5yo2gyqpRhR/NcH j1KxgRc1hTHFOxQEur7Jo7+9s1yIIJC9XRD7ZI2HAq3zhZYvZ7Y9OYR+9aKCbr+bUeCU bB8Ud5RQDqjsSofaQBt94uHki86BUH2kz0D0ooXdFcd+AKKuN2WBXNXTgr9N9LPZThqY Wm6w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=C4+7T0rQy53X7NpHvZFvjRatADRYHg1wZ1pdfYPhLSA=; b=jxOB6+ycxVN/N+HgY+B1h7O1gS2akFIvU2MtnKcf5X29sA3wNX6PtlF8945+0lMWj3 TlrUQmXyK4gzdKnEUDL7wCcCYWVNDl0lrIfj4sqlBWKGadBITsprZDDhI9YF1aJTqx1p WrgQxgRZYU4sapU2k5wpPvjEB+qduukYn8pXbYbE+2xm0hqFvibZfSWie/oiXdBvycf7 fQCglCoOfUmyXESFbeuS2at9Ch02lOYE/n9Z1O3zxLMHcts49/XOVIa2JsY/cs8h9+mm XXMfOgvwmmx9ORo28ZxFNBLriJ5dduF+aisSwEA1/DnZ586oYjZzFmuHvGHL8Mh/EuNG dZIw== 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 m18si3689914pfj.4.2017.11.02.05.26.38; Thu, 02 Nov 2017 05:26:52 -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 S1755161AbdKBM0D (ORCPT + 96 others); Thu, 2 Nov 2017 08:26:03 -0400 Received: from foss.arm.com ([217.140.101.70]:59330 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752607AbdKBM0B (ORCPT ); Thu, 2 Nov 2017 08:26:01 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CE5C81435; Thu, 2 Nov 2017 05:26:00 -0700 (PDT) Received: from [10.1.79.67] (unknown [10.1.79.67]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 910FB3F3E1; Thu, 2 Nov 2017 05:25:59 -0700 (PDT) Subject: Re: [PATCH] ARM: NOMMU: work around maybe-uninitialized warning To: Arnd Bergmann , Russell King Cc: Nicolas Pitre , afzal mohammed , Laura Abbott , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20171102092155.737712-1-arnd@arndb.de> From: Vladimir Murzin Message-ID: <681a1757-ddbe-c9a7-6945-fa72600cf172@arm.com> Date: Thu, 2 Nov 2017 12:25:47 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20171102092155.737712-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/11/17 09:21, Arnd Bergmann wrote: > The reworked MPU code produces a new warning in some configurations, > presumably starting with the code move after the compiler now makes > different inlining decisions: > > arch/arm/mm/pmsa-v7.c: In function 'adjust_lowmem_bounds_mpu': > arch/arm/mm/pmsa-v7.c:310:5: error: 'specified_mem_size' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > This appears to be harmless, as we know that there is always at > least one memblock, and the only way this could get triggered is > if the for_each_memblock() loop was never entered. > > I could not come up with a better workaround than initializing > the specified_mem_size to zero, but at least that is the value > that the variable would have in the hypothetical case of no > memblocks. > > Fixes: 877ec119dbbf ("ARM: 8706/1: NOMMU: Move out MPU setup in separate module") > Signed-off-by: Arnd Bergmann > --- > Vladimir, if this looks good to you, can you forward it to Russell's > patch tracker, or otherwise suggest a different fix? Accepted as patch 8719/1. Not sure if Russell will pick it up or not... anyway, thanks for the patch! Vladimir > --- > arch/arm/mm/pmsa-v7.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mm/pmsa-v7.c b/arch/arm/mm/pmsa-v7.c > index 106ae1c435a3..976df60ac426 100644 > --- a/arch/arm/mm/pmsa-v7.c > +++ b/arch/arm/mm/pmsa-v7.c > @@ -234,7 +234,7 @@ static int __init allocate_region(phys_addr_t base, phys_addr_t size, > /* MPU initialisation functions */ > void __init adjust_lowmem_bounds_mpu(void) > { > - phys_addr_t specified_mem_size, total_mem_size = 0; > + phys_addr_t specified_mem_size = 0, total_mem_size = 0; > struct memblock_region *reg; > bool first = true; > phys_addr_t mem_start; > From 1582945654361281415@xxx Thu Nov 02 09:23:34 +0000 2017 X-GM-THRID: 1582945654361281415 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread