Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp264425pxx; Thu, 29 Oct 2020 01:56:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIrM+B6Xj/b6P1EvvFXZRfTsCTc9Gdmww5nRe4Hf4Mzkw5WId8neK9vPP+WtVknnfurELv X-Received: by 2002:aa7:c1d3:: with SMTP id d19mr2967327edp.293.1603961818495; Thu, 29 Oct 2020 01:56:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603961818; cv=none; d=google.com; s=arc-20160816; b=PBZEkKr3ePnipfM0T6avDZCK/dK6Mh2KX9T+35d2k1hJWX+4H1I/90sBPOKo5Rz2eX L8yTFWvggl/6I6cRvhy0fUrqeqI62LLBPuynoTbLn/KmP8DPc7HUfnYFSNTCt+tsGHr4 UmqlR60TTmF0jsy+tb40IMuOqnLQMvzshiaGLWMMrWJqFvXWAUrG2YE78a1VxD5nVVzP j3HQZ/AAbfYxGCf3++3bg5z0N8yI/YRfJPMf2Mt+dD9IKDmg+CKf3M+sAGiVOtNjsmcO kWIoqWlq6eZju48kyDVyWAz7U0MS+FEm6JgaqsKTKfZ++cc8UJH2tprz3U4GGhHHbmrt pn/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6XRUpzLiGuEo7PmpLXwl6+IIfCCFqx3XPv+eOFg52rM=; b=TTkhy10+JP8TrfEiRu4u/mwfllsak4I0669hwJ7TJtvCQTj9Zi68jhBPhAiCl9+UHf qo6lAFZmEQhm81YuzkqB450uoSuYmxUdtiJK22itUgJQ5JlmBBikOfoqPZkXhAOsXST5 wJR/q7RjvbWmK7y5yhT+XqAsI+qLYoAoKT+XErYF97IWif1mC4QVO58LHFCvAdOTkqlX pGGchbKM30DjI5l5RCZg7NgHY0/sBLWwxRpWq6OViDwqkABNUtaCg/Yoo2ghkHiHLgfg gK33brx1/oF2XkoVzt7t515x3V3vMi44iamkn1NJLmUiBO5puke0Q2tgTYNJ74uIIQkE hO1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HuHr7lUi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si1475280edu.247.2020.10.29.01.56.36; Thu, 29 Oct 2020 01:56:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HuHr7lUi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404440AbgJ2CiH (ORCPT + 99 others); Wed, 28 Oct 2020 22:38:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404439AbgJ2ChT (ORCPT ); Wed, 28 Oct 2020 22:37:19 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77A6EC0613D1; Wed, 28 Oct 2020 19:37:18 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id x13so1118526pgp.7; Wed, 28 Oct 2020 19:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=6XRUpzLiGuEo7PmpLXwl6+IIfCCFqx3XPv+eOFg52rM=; b=HuHr7lUi/XoZQNR8Nvwne0y+X9Y+XBP606LI3k20mieA7XVQIeIq73NEYxr+bDDgvi fnn1bIS0zlOhEs6bIn7T4dYsGFi/sqbfRnZV4WuK/Az64S7W7wbOrQudn1NM+v9Zn1Ia FP+aBs9Y0mI/T8pw7WVPb6yQz3LPEuVr2H5MoL85yBTNkeB5cPCIl3WC47z+XU8UGagN 5hmWpRPCrwtEJSjDnu9J6yJg7gzMZbRRkeu+qL/YONDiVu+OPA2yA7F7/ghWLQBKFpEc cFzUp88lx69s0EosKkBIgMcU/0IvcJuZD/KZ3MiBQZZPbt9QxZINDHHSMxPgSYLW4Dbf pM+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6XRUpzLiGuEo7PmpLXwl6+IIfCCFqx3XPv+eOFg52rM=; b=SMdG4Tfk7J2vVWon6T7u9P4zHsDS+it+zJbxKFYgdehWW43NzJeLIRlXA5WPnTFPSk lnwp2+8RDOTOSKDCN6Q4uLxo1i5EuyPagPLbr1owb8qPjaahW1Dod/aKQkTB+XCV/h7B zvaNcBe/+LtO0GzIFJmhfgiiWl8Ik3ZNIKFzOwdk8dFkAoNK6GWUvYsJUFE740El6lzt mPEqLvR5y+NbH0KVrM0gY1YVU/AOjFr0BaALRwdNq64gI/RUVgUf+M2Z6f//K36Jx7rc g4MazTUEIUo6VNqyXgOsuFdDOt/Fz10SVrPRFnbmJa+aDVnXvESJvUi8YF684+hSPhaF 1jTQ== X-Gm-Message-State: AOAM531y90IbOCnyiZgtlNynS1q1Vk3GLTVs+d5gPZIe7TV0/KYCPrh3 BtAHpjRHyWWl8X+M0Y1EAWU= X-Received: by 2002:a65:689a:: with SMTP id e26mr2046138pgt.136.1603939037979; Wed, 28 Oct 2020 19:37:17 -0700 (PDT) Received: from Ryzen-9-3900X.localdomain (ip68-98-75-144.ph.ph.cox.net. [68.98.75.144]) by smtp.gmail.com with ESMTPSA id f71sm895705pfa.155.2020.10.28.19.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 19:37:17 -0700 (PDT) Date: Wed, 28 Oct 2020 19:37:16 -0700 From: Nathan Chancellor To: Lukas Bulwahn Cc: David Airlie , Nick Desaulniers , Tom Rix , clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-safety@lists.elisa.tech Subject: Re: [PATCH] agp: amd64: remove unneeded initialization Message-ID: <20201029023716.GB2316@Ryzen-9-3900X.localdomain> References: <20201028133106.5420-1-lukas.bulwahn@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201028133106.5420-1-lukas.bulwahn@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 28, 2020 at 02:31:06PM +0100, Lukas Bulwahn wrote: > make clang-analyzer on x86_64 defconfig caught my attention with: > > drivers/char/agp/amd64-agp.c:336:2: warning: \ > Value stored to 'i' is never read [clang-analyzer-deadcode.DeadStores] > i = 0; > ^ > > Remove this unneeded initialization to make clang-analyzer happy. > > Commit a32073bffc65 ("x86_64: Clean and enhance up K8 northbridge access > code") refactored cache_nbs() and introduced this unneeded dead-store > initialization. > > As compilers will detect this unneeded assignment and optimize this anyway, > the resulting binary is identical before and after this change. > > No functional change. No change in binary code. > > Signed-off-by: Lukas Bulwahn Seems obvious :) Reviewed-by: Nathan Chancellor > --- > applies cleanly on current master and next-20201028 > > David, please pick this minor non-urgent clean-up patch. > > drivers/char/agp/amd64-agp.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c > index b40edae32817..0413b3136541 100644 > --- a/drivers/char/agp/amd64-agp.c > +++ b/drivers/char/agp/amd64-agp.c > @@ -333,7 +333,6 @@ static int cache_nbs(struct pci_dev *pdev, u32 cap_ptr) > if (!amd_nb_has_feature(AMD_NB_GART)) > return -ENODEV; > > - i = 0; > for (i = 0; i < amd_nb_num(); i++) { > struct pci_dev *dev = node_to_amd_nb(i)->misc; > if (fix_northbridge(dev, pdev, cap_ptr) < 0) { > -- > 2.17.1 >