From patchwork Mon Nov 2 20:57:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 11875337 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EEDDA139F for ; Mon, 2 Nov 2020 20:58:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2B4B2072C for ; Mon, 2 Nov 2020 20:58:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="GdKdVi0V" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725940AbgKBU6C (ORCPT ); Mon, 2 Nov 2020 15:58:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726188AbgKBU5T (ORCPT ); Mon, 2 Nov 2020 15:57:19 -0500 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BAFBC0617A6 for ; Mon, 2 Nov 2020 12:57:19 -0800 (PST) Received: by mail-pg1-x542.google.com with SMTP id h6so11833151pgk.4 for ; Mon, 02 Nov 2020 12:57:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version; bh=cTXeqeRI1AMYuTYPj5msy0dt3h+2BWreEBIGnNR3cCg=; b=GdKdVi0V5BwcYxz9LiCpS0yyl0N2kXxvOg5338yR34O8Ry9Ah1tjkExVLXZmVYsA9Z LrP7UaUn3cyPfRFL7k6VCGW47tIWWF8L+z96LoKPtriGcgbN3H/jCkoZknHUsFCxXnUe nD+J/WYIil5/eOcGwErJFmCFwFSxS9CgpUiNY= 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:mime-version; bh=cTXeqeRI1AMYuTYPj5msy0dt3h+2BWreEBIGnNR3cCg=; b=rzXWICik3X/N9J3LaC60nn5qGZBVyzudfQzyBNFbWl7cGs6Q8SV0wbwVaqkJehsNYG p0Bq1OZ//GKDLa3QGpzmCKSCqtM5W0kD9/hsQ995Jno4bHmCPRwGGFrLQe74na2gVm/t 4I6VUl6exMc8+c/1PajeoqVq4LTwcpCc/MRMhrJHsJMRLQi4KxzxpGT90f3iYv9vuzFj jVJN9Z4tjgrlZS47oM6xirG8ncYTSuWbtHivIPiIvFyIcd2Lqtg3/bvBsyz4Ui67npO5 AZSethQb0n5tgk8nhFWNo51PGHaH3G0sX9KFwuOuI0zIgWKwzICx+viCrxGjgTGL3Iwa Rrbw== X-Gm-Message-State: AOAM533sVFTGQPqZPku2Y50P1JLZq3Fo/DMIjjCfSyp45AbZDKkaeeKL HUD8HBA4eSupo3vBHCHHKD7froI0uHDd5AraXV6EjGqxc3kjM4C4pvlDjGkGNzk47NO5BfeZf07 7wSHQRJ6Wkv+ZUn0qrSfwdtb68ORJdCvf+IWb9bbdv9hkxLyOqoZi6h9+7DWifzFeRJB+k2CxpL 3P36e/ZrA= X-Google-Smtp-Source: ABdhPJxdxkJSK4ZxFxzY/iQS0ILOjNZ9PrkofiyeQ35qAF2NxZKvQYvSxaPklRKJ0ehuQGqDW3Siyg== X-Received: by 2002:a63:9d8d:: with SMTP id i135mr759867pgd.213.1604350638383; Mon, 02 Nov 2020 12:57:18 -0800 (PST) Received: from stbsrv-and-01.and.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id 136sm14917277pfa.132.2020.11.02.12.57.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 12:57:17 -0800 (PST) From: Jim Quinlan To: linux-pci@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Cc: Nicolas Saenz Julienne , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Florian Fainelli , Andrew Murray , Jeremy Linton , linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1] PCI: brcmstb: variable is missing proper initialization Date: Mon, 2 Nov 2020 15:57:12 -0500 Message-Id: <20201102205712.23332-1-james.quinlan@broadcom.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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. Fixes: c0452137034b ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver") Suggested-by: Rafał Miłecki Signed-off-by: Jim Quinlan Acked-by: Florian Fainelli Acked-by: Nicolas Saenz Julienne --- 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 bea86899bd5d..9c3d2982248d 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);