Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9122485pxu; Mon, 28 Dec 2020 07:10:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJx71a/TkPmpjV/MV4DsTApmX1HYaBVAO8BkIcAGItJeTu6BxJfqtaHnoEJjxSp1pzf7ImPX X-Received: by 2002:a17:906:6d0b:: with SMTP id m11mr24595941ejr.230.1609168248410; Mon, 28 Dec 2020 07:10:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168248; cv=none; d=google.com; s=arc-20160816; b=X28KdKDsT81iCIG+zMd0QT7Y4dDAMpOdbmVN8EkUWOiIT7921MpbRfJsFp+Kv8CNGr M/+nkuLT4ApHWdEjpDP0JdVkRRpHzdDrTGVBlSk6u8jb0keFBUAh/6mIx1IFeYnRYJaw Dlvv48abtEa/h8PJn/YWE3j0XNu1ajLgTmUBAxR596ZJMtCeU1yUsDq8KEYRCkwP4Y0f 8oNjrQv0xt/Dbe2pvxrfESu1OUrpni5gV3plB1EB/9chZ0iTEXb/CwTLiOfhdK+WzTon B9UYVfwa9Qy8xQOcqN2BQeVJfmwe0F75HT0ldj6S97pe8doebZycVwdTmvy6Qsudvars yT/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MOhOnDRsRLvxqFvfkh+lHe55FdJDAZ7KRiaB9BSoPbw=; b=EDsERpD8n3AQmfR3tV9Tb4sdSE89S1k17g8mMQrWaJMGPPWUIiFChR8aX1bvMj70x0 cS/dPpG8aEghVe4wgOXlB+ONp4nMkLejQvzJQEBKhcKGqVpDw8NKR72YiSetKqj7uP8L +gWUYRMsPU7bvXYDe3e5jw/U7jLa3oUDxM/Zwj4t6t3D1SMQOAZVnMZ1omQevbDQPlHo 9FWb8xaKg7XQR8EmtfEJ1xIyQ6PM4yNG3qUWm1rExHwH1X2WGP2Tj3DA8yLgOek85Pky aeLW8Qlzbpcbp7iRgRSuszw71s8ALkLkYwITkjVwV5KPb5kREAQfx7dyb4Divb9+tBZJ 72Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hJN3ATnO; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f13si20161175edw.454.2020.12.28.07.10.24; Mon, 28 Dec 2020 07:10:48 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=hJN3ATnO; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391902AbgL1PH0 (ORCPT + 99 others); Mon, 28 Dec 2020 10:07:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:43244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391750AbgL1OIj (ORCPT ); Mon, 28 Dec 2020 09:08:39 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2837D206C3; Mon, 28 Dec 2020 14:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164478; bh=82mzM1lZEnwgvckRxASow2+oILhN7WGcmCtxSn4PGJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hJN3ATnOCHEz0icSGO9S35bCmrA2r3pBt6hA8GZHxJ+n4cEbYDLxeJffVRWjFrikL ymrg/QcyGcGKYFMmhofa84tCFQ83g9/yySc6vHZBclTL+UW/2LHsShqeBM183AETFm k1gugCWBxmfm8Vn3KbSNtrCH0fuQ3/KDJDFuYnyw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Jim Quinlan , Lorenzo Pieralisi , Nicolas Saenz Julienne , Florian Fainelli , Sasha Levin Subject: [PATCH 5.10 177/717] PCI: brcmstb: Initialize "tmp" before use Date: Mon, 28 Dec 2020 13:42:55 +0100 Message-Id: <20201228125029.445272963@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jim Quinlan [ Upstream commit ddaff0af653136ee1e0b49116ecf2988c2fc64ca ] The variable 'tmp' is used multiple times in the brcm_pcie_setup() function. One such usage did not initialize 'tmp' to the current value of the target register. By luck the mistake does not currently affect behavior; regardless 'tmp' is now initialized properly. Suggested-by: Rafał Miłecki Link: https://lore.kernel.org/r/20201102205712.23332-1-james.quinlan@broadcom.com Fixes: c0452137034b ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver") Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Acked-by: Nicolas Saenz Julienne Acked-by: Florian Fainelli Signed-off-by: Sasha Levin --- drivers/pci/controller/pcie-brcmstb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index bea86899bd5df..9c3d2982248d3 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -893,6 +893,7 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie) burst = 0x2; /* 512 bytes */ /* Set SCB_MAX_BURST_SIZE, CFG_READ_UR_MODE, SCB_ACCESS_EN */ + tmp = readl(base + PCIE_MISC_MISC_CTRL); u32p_replace_bits(&tmp, 1, PCIE_MISC_MISC_CTRL_SCB_ACCESS_EN_MASK); u32p_replace_bits(&tmp, 1, PCIE_MISC_MISC_CTRL_CFG_READ_UR_MODE_MASK); u32p_replace_bits(&tmp, burst, PCIE_MISC_MISC_CTRL_MAX_BURST_SIZE_MASK); -- 2.27.0