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: 11875339 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB39BC00A89 for ; Mon, 2 Nov 2020 20:59:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 262CA206E5 for ; Mon, 2 Nov 2020 20:59:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oyFrCdSl"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="I7uF5lej" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 262CA206E5 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-Id:Date:Subject:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=CO6TO9Zxerb73GyiKWaktRuNk+1SPPitpuGRCWt6qm0=; b=oyF rCdSlyphv5rxOfwHvriNaeEDsk/3lJoRkwtgnbNYdnnOwMYGKe8mxJ1zBqPL27WndGaBrL070i0GU WwjgrVIepbxE4x3+4/kzHO8Ef384ACWwKOTRvT/3/wfuoPnUgxyH8X5SCa3uAoKjmZUXPhapFgDp7 wmbt/gTsMJaxacH+RaclzhT8MOP1X9fIrWh53M8JdSGrbzkZu7yb15s4m6nl08t2mKpf22HFBI1Ao Ra91+MwIgfWJug/M5naV95MJVne4XTcoWS43RfWmy6bERomdBNaDIj1ux8TcgaQzeIzG0g+PG53ri Hjh0RZ9IeXcZAP45c3E9VO4MWe2JBIA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZgtM-0001B1-Ec; Mon, 02 Nov 2020 20:57:28 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZgtG-0001AC-RD for linux-arm-kernel@lists.infradead.org; Mon, 02 Nov 2020 20:57:25 +0000 Received: by mail-pg1-x542.google.com with SMTP id r186so11852066pgr.0 for ; Mon, 02 Nov 2020 12:57:20 -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=NcQGpwUMYKhO5+SNvZtUd6dp+MLfxD64AmWqeaEY7Bk=; b=I7uF5lej+TqbBSxiKsCWyH+k66Jpm/w42YNzbeFS66S5TupqkYClBh/bioMGMmLTjv 7ckyEZGjYIQvqcFibJ6DCTIT5BLcKD2oiFCsMsvTEeX6iq/NOjnI0u+kEbnWMsR69X3K MdfBY7Nd5r2Lepr8b3xDnJDF3TAE6SW4HlIuU= 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=NcQGpwUMYKhO5+SNvZtUd6dp+MLfxD64AmWqeaEY7Bk=; b=TvDGXvj4J1C7hOhPG7nuENe2YydLnitJUlNq0rhyEMTRym4TN0sx6Xq32zAFGUKwWL 4K0FHyh+XR6fTDKwd3v0Flm6P0Fe2YG2dCb/wcNY/8Pi6oxWPfvKksXiEosQNhFt3tmx v9/A8raKYLlMRTdDxiHI4ElnUi+p2jahtcK8rci5/LiLEL7LcGFVkvBD5cFhqAFa9+60 zLEOCMn4GlmnhKadOx/Ak4SIkKLWlgttamEVgySwn+hpv2jUjpfHNE5qupf58c4UE5oj eE8h+tSIkiAu+a++6/Ao12asxMhMcFIw08FcwqJiuYpueWm33ZRFRHfbyKBM7UQgmLRo cpMQ== X-Gm-Message-State: AOAM533juNs002g3OU9fSTeXeZ05eESpfDANCqEmKa3Aj2tNELzZcwY/ WnPLd/H/rSHqTzXlhnCc9RdjAw== 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?= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201102_155723_125657_F6B9A89E X-CRM114-Status: GOOD ( 10.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Rob Herring , Lorenzo Pieralisi , open list , Jeremy Linton , Florian Fainelli , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Bjorn Helgaas , Nicolas Saenz Julienne , Andrew Murray Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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);