Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp219407rwb; Wed, 10 Aug 2022 07:17:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR4kE82/tFj9IdAE49SponInaNWtMRoiYPPBcndp4bDZqRk9n8bsEmp9+rvzCRd8FZ/+guD2 X-Received: by 2002:a17:90b:4f49:b0:1f5:c7c:b565 with SMTP id pj9-20020a17090b4f4900b001f50c7cb565mr4175119pjb.32.1660141049080; Wed, 10 Aug 2022 07:17:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660141049; cv=none; d=google.com; s=arc-20160816; b=sploEgRNvurd6I5nZq/bfZKL+vwJjmMAuXyPirvr8V7Jh85lXASGBiEd5+DJr/qOxi GRjGb32MjPR7w0YDSmFBgj1GsFeN81JRVTAy389c9iImJ+1DeyD3Xjt+LRWIW/daVeJn qoVME3jFZXmsv2JeyavjcHoXRHMmj4JxHPbP7tFT1TP+g5mwU6uAhiehASNyO/QzyzR6 Ag+GbfGiXgy8P+zM7zD1nEN2nfhAEhvTHEa92iQO0b4FUZBT8Bn6kKk+vubMZ6X3RgDs GPGVveVpqh9ZQY51O5vB0VoENZcd7Cj7DTEAOmySWYrxXMcBfmUfAyZEehkeVLaiv0Jj VcDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=BmhXoBlh6unTfdQuA8oqX62tQMkETFubF4WQIJ7dCSY=; b=Vo71lB7/64oSaBriEMwFkKZo6lig4CyLFkvcngL0aI0SSgtMB7WBKpbcZF4jx8PLB7 9RVsk3XPd0YQ9gnK60PkzJWmyPkUFh2PC5bvH7PLX7BXsoIUZYpZVXcHw+zieQwYU9LH nUmErB7TjUnt5/Mrbikgu/GMz1Fi+zC74UUljSikI1IHYJOg7rHpcwZE+bT316hRd1gs qdH191/RQAqDhN/6+gxuuI58zSUHq0YUQElHtMID1YkAQwCs546EO7Y+jxpaNC/hVgJ2 5Cndhh+TSi7MXexyy5X3x3W1X1Ctt7myRJRHrcsh5h+8fZwYRNEIPWv+qqX3zqCdDKGC n/jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pi16-20020a17090b1e5000b001f0365517fesi2563550pjb.132.2022.08.10.07.17.13; Wed, 10 Aug 2022 07:17:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232956AbiHJOE6 (ORCPT + 99 others); Wed, 10 Aug 2022 10:04:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232942AbiHJOE5 (ORCPT ); Wed, 10 Aug 2022 10:04:57 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A9A906CD3B for ; Wed, 10 Aug 2022 07:04:55 -0700 (PDT) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 27ADuNcA006903; Wed, 10 Aug 2022 08:56:23 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 27ADuLhX006902; Wed, 10 Aug 2022 08:56:21 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 10 Aug 2022 08:56:21 -0500 From: Segher Boessenkool To: Anders Roxell Cc: nathan@kernel.org, ndesaulniers@google.com, mpe@ellerman.id.au, Arnd Bergmann , llvm@lists.linux.dev, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCHv3, resend] powerpc: mm: radix_tlb: rearrange the if-else block Message-ID: <20220810135621.GX25951@gate.crashing.org> References: <20220810114318.3220630-1-anders.roxell@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220810114318.3220630-1-anders.roxell@linaro.org> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! On Wed, Aug 10, 2022 at 01:43:18PM +0200, Anders Roxell wrote: > Clang warns: > > arch/powerpc/mm/book3s64/radix_tlb.c:1191:23: error: variable 'hstart' is uninitialized when used here [-Werror,-Wuninitialized] > __tlbiel_va_range(hstart, hend, pid, > ^~~~~~ > arch/powerpc/mm/book3s64/radix_tlb.c:1175:23: note: initialize the variable 'hstart' to silence this warning This note often is bad advice: hiding problems instead of investigating and solving them. Bah. If silencing warnings is your goal, look no further than "-w" :-) > Rework the 'if (IS_ENABLE(CONFIG_TRANSPARENT_HUGEPAGE))' so hstart/hend > always gets initialized, this will silence the warnings. That will also > simplify the 'else' path. Clang is getting confused with these warnings, > but the warnings is a false-positive. If it is, please report that bug to clang? It says "*is* uninitialized when used here", there can not be false positives to statements like that. If the analysis was heutistical it should say "may be" or such. Segher