From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63F92CD4857 for ; Wed, 4 Sep 2024 17:02:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=MUYVhW+agrBVAsSUhpLcywCjOwQUtSdv8FRryXwoCAU=; b=J/rBDVAkqyLmVq IFCiBLplpiktfqm9f0lCFCQi9phr8F6ukul6XvHx19NIHM77ba2KNrC+T9csSts3BUUaRoVrmPcgq y2bv2nLR8eOPlB6Md9Q0K1ciG9C5fzyBLDlc9CgIGxI0iIFOvoPq2dDumK5TrcDjFz0ze6V5OhYef xBWpfcSI6oYgaL5RiRXdIr9uTHvSiC2PeOZEHpycFOIkQSy8LgxBOJNPVKlhW+NSou0cZDigexMlW SliO6QhAVfda7la2OEvjZ5Pun8BFw8NgVyB4eEwAcCUPwTpQpxMxWn2LhyPXEEvUOGbIqQyNrsYQM xoBFyUusK0XQHj29+e8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sltOI-00000005Mqi-0sUN; Wed, 04 Sep 2024 17:01:58 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sltN8-00000005MJW-1Jkk; Wed, 04 Sep 2024 17:00:47 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 1FE95A44519; Wed, 4 Sep 2024 17:00:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1694C4CEC2; Wed, 4 Sep 2024 17:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725469245; bh=W7tyF895qn4+3mvsOG3cOeeo5wL/ONqmkzwYccW6yzs=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=LFs4Q608D/9lSjMZewlt21eDmm6aNXJvd1Q4Z/mzDmOD9nS0R06L0IlKcjTEgkZ0O BXzDjjI2Ph6dF9r6Fyqn96PgKc/UFY3n8zUfxpmA5KkB9uYWHFE3wQAfswWzk670nC /sUEw29VOEDCY4qQXepBdM6YKotOJ3mE3zisTyYRNQE1cXDoBb1i2WNBtXaDJANCFk MbCO+jk6UUZj5Rjr0ysopWklbtoRhPfy4SaqWg+n9luTblYuv230Jo8Fu22O49Yp9d T7Bs7lkI4eXw4h1pDHSPdgP8t8J3URJRlvElrGRKF+MKoot3fYoPMUO3CcOCY0StmT YMFxt0Ie6cfpw== Date: Wed, 4 Sep 2024 12:00:42 -0500 From: Bjorn Helgaas To: Riyan Dhiman Cc: jim2101024@gmail.com, nsaenz@kernel.org, lorian.fainelli@broadcom.com, bcm-kernel-feedback-list@broadcom.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH next] PCI: brmstb: Fix type mismatch for num_inbound_wins in brcm_pcie_setup() Message-ID: <20240904170042.GA336896@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240904161953.46790-2-riyandhiman14@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_100046_440450_5259D6C7 X-CRM114-Status: GOOD ( 16.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 04, 2024 at 09:49:54PM +0530, Riyan Dhiman wrote: > Change num_inbound_wins from u8 to int in brcm_pcie_setup() function to correctly > handle potential negative error codes returned by brcm_pcie_get_inbound_wins(). > The u8 type was inappropriate for capturing the function's return value, > which can include error codes. > > Signed-off-by: Riyan Dhiman Apparently a fix for 46c981fd60de ("PCI: brcmstb: Refactor for chips with many regular inbound windows"), which is currently queued on the pci/controller/brcmstb branch? I agree, this looks good, and we should squash it into 46c981fd60de. > --- > drivers/pci/controller/pcie-brcmstb.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c > index e8332fe5396e..b2859c4fd931 100644 > --- a/drivers/pci/controller/pcie-brcmstb.c > +++ b/drivers/pci/controller/pcie-brcmstb.c > @@ -1030,7 +1030,8 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie) > struct pci_host_bridge *bridge; > struct resource_entry *entry; > u32 tmp, burst, aspm_support; > - u8 num_out_wins = 0, num_inbound_wins = 0; > + u8 num_out_wins = 0 > + int num_inbound_wins = 0; > int memc, ret; > > /* Reset the bridge */ > -- > 2.46.0 >