Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp724022pxx; Wed, 28 Oct 2020 15:36:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygI4D0Rw3e7G4H4yQmnjNMk731JlpZI0+7yqs5BE4WXiD1VH1t61mAn8lTDrioLZ+iva2H X-Received: by 2002:a17:906:85c1:: with SMTP id i1mr1290828ejy.157.1603924617226; Wed, 28 Oct 2020 15:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603924617; cv=none; d=google.com; s=arc-20160816; b=u1tNms3eGZyTZ7miPdJo9DoYSO2Ks9x+CLi4kGueg7hzN6lEQ0VxYH+dPhxgHMPKtd 5iciQ4GDVXXU9sCSeYMqrFJZOtL4CPQjMKj/88/CzcRt2Ydt0LoRYDpzVE9zAXhbwIpz /5NbDDi9Js7zS1fkiWjAlim5kmUrjnlwNw/WU95qZUvIJGqY0zsAyjTqmvzpoVk06ISM GihFy/zFubXYW/uml0AUSedDhXf19Kdym3V9ZPO55ywR7HCVo8B8zR5K741hJF35AHcm +nrzX+17fuXM9S0DXHBjzjJ2cDoe8Q8U4+YEPLEjBIkiuCGdmsXbkCG5d57y7ip0E+9C cE7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=5BWRuAigFz9km9p6yXg2RqfU876ueFRRadA3U73oXM0=; b=EU3DlgPQne/+bs82w49THLF/rw+luuS+W+Lvu+l9SRvOzLQxyoEivgq6l4vzRMF+OX HbVXhOZaV5j9OnGwzpfqChZGk2Ec4Ot2OISURGhrL1bbN+mntKOJNQuXEDEw1yzorCNU QkgX/SNpiSR32VPmW1QKGq7d/hWcCdoNbIye0ac0LoYrTsDSczEffOFfjKuXmeDLKaod ZX33pBX7c9PdSxK1Ukdt0s+lam13iZgrcOVcP2kXoYy+aQxIjLfLJ8SHCuhB6juCCn7C A2R9ThFW4nPFcO/d1pAUCTPilmbl6Wmf6a7qioJXivWoE2VuCYU9WUL28s/Owgibqian B2Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mg0c3Trr; 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 rh15si485799ejb.496.2020.10.28.15.36.35; Wed, 28 Oct 2020 15:36:57 -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=mg0c3Trr; 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 S2388159AbgJ1WdJ (ORCPT + 99 others); Wed, 28 Oct 2020 18:33:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388134AbgJ1Wco (ORCPT ); Wed, 28 Oct 2020 18:32:44 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7107BC0613CF; Wed, 28 Oct 2020 15:32:44 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id n18so737477wrs.5; Wed, 28 Oct 2020 15:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=5BWRuAigFz9km9p6yXg2RqfU876ueFRRadA3U73oXM0=; b=mg0c3Trr7UnelD/TS7jZb3IcNYeg9PUNHKBgqgm2EOd5jhChVWzR7Apqj6AK9Q1KcM tMxe2Td1CttKGmKE3XNu4yHzvYGc2d/3FPBr1E7Y33kuY17IGo9E+HePbnXDW1qhbzZf Mo2K88bcLPkj3qUuqSOJ62RsHUgRuZDO1xsh0Op1D/JeaiG4MEZ+W4Rm513htVXedB0b /NHjMeVlr8JNFxof3gbATzlE+7fDvqAm0BEIS8KcqBQ+MXPy4XkLAtJHm74dq5PgUmbr T5a2ETgU0vHk9mdGPq6gyauAO/i7Z60Hxli1OIslYELpFfZqe5XIgX2ZOsYacCET9rfi xfYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5BWRuAigFz9km9p6yXg2RqfU876ueFRRadA3U73oXM0=; b=GNWxlFEM3hN4lTz5FQBeTd5YAwqTQxNwUVZ/ANw5brqc4AYoJizXW/QErqiBAbnvUL TShvR9cAgZR0IzEiwWPJZVAysO6W0rACyZG3Ue6ptWprufzN7qr7ZEPLxzAQ31WP4IA3 DP2i4jonvtc4a0G8SSHTwKMfRPn/E28uFFEaTTdSTyCw+21lWpBVpKc7yybA62UT0Qk/ HVlB7FfQEYc9DpmaUC4KS6lOJ9wKN7YsSb2W85ST427V2HDzPvC/Rwi8usDKnirn4HoI dXVViHEYhZhF5QVer4IqstYWs+CIGpsXXruOAGqwIPIn3626qkJXWLfCzG1AGZfrsAKa 3YMA== X-Gm-Message-State: AOAM531FW7Mo6HB1+sPo6RQ12yV/j70bv5oKtuOKGUYnpgxvxVzz2jHR woeKxLGqR7FNyIa+n9n7LyQz5qNxotJvBP3b X-Received: by 2002:a17:906:3a55:: with SMTP id a21mr7365323ejf.357.1603891879235; Wed, 28 Oct 2020 06:31:19 -0700 (PDT) Received: from felia.fritz.box ([2001:16b8:2d7a:200:a915:6596:e9b0:4f60]) by smtp.gmail.com with ESMTPSA id ce15sm3186691ejc.39.2020.10.28.06.31.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 06:31:18 -0700 (PDT) From: Lukas Bulwahn To: David Airlie Cc: Nathan Chancellor , Nick Desaulniers , Tom Rix , clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-safety@lists.elisa.tech, Lukas Bulwahn Subject: [PATCH] agp: amd64: remove unneeded initialization Date: Wed, 28 Oct 2020 14:31:06 +0100 Message-Id: <20201028133106.5420-1-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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