Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1354001pxb; Wed, 4 Nov 2020 06:52:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEe5Xw/PA3diy2peB0vJxa8Q6IjiNouBLC2b64VXNeiZ+5EbW9/2teqAjtX9iulYcWv8ar X-Received: by 2002:a05:6402:3131:: with SMTP id dd17mr21639088edb.58.1604501536590; Wed, 04 Nov 2020 06:52:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604501536; cv=none; d=google.com; s=arc-20160816; b=txyfwtuI2OCXcRdOW5EbjMnDQjyXhSw1MP07GS6xpR4kncWGeHLbZyU00fAafMzCsI SZApLXAgrKr7bbTIN6dZushLn8WUET0+e5OBsbmCWv0quUIcZ5lGokBpOJPCZ+b0hOZ9 BJq++V0buMqVyzReM9V5eBFwaW6ssd9JWTTrPX5vpka6TIWTuU7Ha/kPIVJeF1UA6JD3 X5gSOV36XM9BuZYCFMTFjxdQHJxxaWFpUpEqWsnuE8m5/NYM7QJCijBt6kebBiiw0+IH HgBD0kjkZ/urEn4fNbd96YFfgCn5ODKm/rwKHP3NGmiI3Y6JFJmXY6UcxHU0QMPQhN25 e6lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=V7Gp5tfLl9IMvYSUY0tkzcHr1xwU8nGSCy9B4XO7c5Q=; b=EfEBHVpMU6zisA4cYoMUsT3xv6C9PNJpUWCf7rKvYxngEPunEsXufwjEc5mzdHcnO4 GvtaRyALEy4U9bW6AXeGjn3b0TC4EqQTUEDfV6AR7qP3SiypM5112xM2uUeI3zNIp46W grmF7QKbWP3VBWmGnPcyHTx+6OQFJePBdT318QkNLVy2sjNji5KVLpNp2E9qlwYyi1VY lDcU7SsW0br+OHZadQEUOcXEJUK2h9ku4BMJ1EaOB5CI9z7S5mVD5Adma43ciFDsLndH 7fDmGBZx1z6C337fwDkc6kIHKCaZs5+d009MRIcccr+g1Of3tINWt0Tm0/DT+1dBqV02 1sDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=H11ugObf; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm22si1397434edb.342.2020.11.04.06.51.53; Wed, 04 Nov 2020 06:52:16 -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=@broadcom.com header.s=google header.b=H11ugObf; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726944AbgKDOsU (ORCPT + 99 others); Wed, 4 Nov 2020 09:48:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730183AbgKDOsT (ORCPT ); Wed, 4 Nov 2020 09:48:19 -0500 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 253E5C061A4A for ; Wed, 4 Nov 2020 06:48:19 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id k10so21007876wrw.13 for ; Wed, 04 Nov 2020 06:48:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V7Gp5tfLl9IMvYSUY0tkzcHr1xwU8nGSCy9B4XO7c5Q=; b=H11ugObfA6Im9ih2Fy91jfhHb/u7tOHiJ0QbNdOU3nh5e8VvKcJSWL+m8c6CSRoIi2 M0WPG0yMzEMV2D32uDWCwT1mSfEHeCenZeCbONT6zJ3WkJTrtbpe6ERAxWxI4uhw9p6Y CDeC5Ax1G8ahB3zo1hO0jJHZ7y2ur2zo3TU94= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V7Gp5tfLl9IMvYSUY0tkzcHr1xwU8nGSCy9B4XO7c5Q=; b=RcHF1agFa0cX92AsdLmsfKqABMhCugWNX26pa5oKJmxTNWIseiwcXwoq+qZjvbrGAI vghgHgyzbGFBPQvxdStgz6EU5FgX9JdvO4ovUj8HGyv4fFkBdSyKaEIDf/XBOR75QuIJ WAGhKqpbdxYFZ7Pi3bdMSH7IprjmFmJDxmzM7g1O7N2jmKm8wiqVj6N9vQZfGEFDolxB Gz89hOhlbshA/EQCt/afNr+7GSmJuIEGbj7zzhDmkQuyxboS/R3EnuO8Pobf6d/Yiiad 3eD+UpVMZL2hjY7852xoa+ka76/8b+OONab7lvmcHBkwfapgfvAf0skfOmONrRWosBTJ 8eVA== X-Gm-Message-State: AOAM533xZpgP2c/eUD4yYjDJhMDMiYLCmyNplsMXtDsxs51JGrG+NSeh ONOrWDYUfObaMHOkRcpBeH7ksjB3AYzReoW88VYx0A== X-Received: by 2002:a5d:6ac6:: with SMTP id u6mr23404110wrw.145.1604501297714; Wed, 04 Nov 2020 06:48:17 -0800 (PST) MIME-Version: 1.0 References: <20201102205712.23332-1-james.quinlan@broadcom.com> <20201103193816.GA258457@bjorn-Precision-5520> In-Reply-To: <20201103193816.GA258457@bjorn-Precision-5520> From: Jim Quinlan Date: Wed, 4 Nov 2020 09:48:06 -0500 Message-ID: Subject: Re: [PATCH v1] PCI: brcmstb: variable is missing proper initialization To: Bjorn Helgaas Cc: "open list:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS" , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Nicolas Saenz Julienne , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Florian Fainelli , Andrew Murray , Jeremy Linton , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000e9b88b05b34911b1" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000e9b88b05b34911b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Nov 3, 2020 at 2:38 PM Bjorn Helgaas wrote: > > On Mon, Nov 02, 2020 at 03:57:12PM -0500, Jim Quinlan wrote: > > 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. > > This is so trivial that there's probably no reason to post this again, > but if you post a v2 for some reason, please update the subject to > match the convention ("PCI: brcmstb: Verb ..."), e.g., > > PCI: brcmstb: Initialize "tmp" before use > > The commit log does not say what the patch does, leaving it to the > reader to infer it. Got it. Thanks, Jim Quinlan Broadcom STB > > > > > Lorenzo will likely fix this up when he applies it. > > Incidental curiosity: where should I look to see what > u32p_replace_bits() does? "git grep u32p_replace_bits" shows several > calls, but no definitions. > > > Fixes: c0452137034b ("PCI: brcmstb: Add Broadcom STB PCIe host controll= er driver") > > Suggested-by: Rafa=C5=82 Mi=C5=82ecki > > Signed-off-by: Jim Quinlan > > --- > > drivers/pci/controller/pcie-brcmstb.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/contro= ller/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 =3D 0x2; /* 512 bytes */ > > > > /* Set SCB_MAX_BURST_SIZE, CFG_READ_UR_MODE, SCB_ACCESS_EN */ > > + tmp =3D 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_M= ASK); > > u32p_replace_bits(&tmp, burst, PCIE_MISC_MISC_CTRL_MAX_BURST_SIZE= _MASK); > > -- > > 2.17.1 > > > > --000000000000e9b88b05b34911b1 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQQwYJKoZIhvcNAQcCoIIQNDCCEDACAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2YMIIE6DCCA9CgAwIBAgIOSBtqCRO9gCTKXSLwFPMwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UE CxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMT Ckdsb2JhbFNpZ24wHhcNMTYwNjE1MDAwMDAwWhcNMjQwNjE1MDAwMDAwWjBdMQswCQYDVQQGEwJC RTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEzMDEGA1UEAxMqR2xvYmFsU2lnbiBQZXJzb25h bFNpZ24gMiBDQSAtIFNIQTI1NiAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA tpZ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