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 4830DCD4847 for ; Wed, 4 Sep 2024 18:12:12 +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:References: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:List-Owner; bh=vaZn7t1f9p2C+9KGgClJBqRBfNG/EZMLVSixIkNLNy0=; b=QDFOqOGHsOPnfgz7xmukp7R48t NkEr5SG/h7Zxfie7JtI9mDuZCQgEE4gPivZ8G7Nfrv9a3mpqmjeYRsUZWdzZzhxzvAjdB8sTjfh3O 7g4ndUvtP1XfWz2dt/c6TMwYmEibAJmOiu7ulu9zjpmN3XK8I6/VShSrFjhm7qj1RUw32UoYPsCma PLdYJVI1i3o3aehft4QLdxmcPICCQffQ1moYYltbMnEXvTLUVRaIFJth1+LBqc73avOh7uqBSOntC z9A+MeLKtMbQ9Z1TgoBLOOvha0KR96ByM5MUVxi6v9XL/8fAYFYV3rvnIQiijQ0HY6ztXib4+oJh4 1xrvdqZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sluU3-00000005Z3C-0N2G; Wed, 04 Sep 2024 18:11:59 +0000 Received: from mail-pg1-f171.google.com ([209.85.215.171]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sluT4-00000005Yvf-49Ov; Wed, 04 Sep 2024 18:11:00 +0000 Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-656d8b346d2so4252440a12.2; Wed, 04 Sep 2024 11:10:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725473458; x=1726078258; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vaZn7t1f9p2C+9KGgClJBqRBfNG/EZMLVSixIkNLNy0=; b=NlNK4ZYhfGGbHz4MQcNCuhUCunG/47cMkPcwLjtXNZ7k4f1nSId24WBQR2OmcP3O4R ByYue3SHEeKldrWJgWLG9F1R0cX5wvEN2QjOMbi2wBW7Haq3si9mV9H495bXRfhcIGB6 1UqRGhVpIWawTMEEtsWRypL8F5bWya47/XGGHUeQdR6/M4PSe8Jt3fMZuIabx360wU6g i4792DgSzgrZySwa9dSP6yO96/yGS0EoJC7vNqd71YtjLwI6S4DhEzhBTHnk0HoFkISv ZoftjF+ZDWI4gQiLDkswMcliJnTI41hWuwV0NoULiD0v7/1J1dTdNfzHfykE1C/t8+l9 4DSA== X-Forwarded-Encrypted: i=1; AJvYcCV937njvZmt6ZwTfkek2PQvhR8rr4nBWdW5Nat5WKVk32++F/wItQMVxY5MjoQhJlEOJHybUYVesjT/+Z5Ha+oqdg==@lists.infradead.org, AJvYcCW8K77uk9kUDUUfDPXr2Ukywehyyhr6/XxGoVbdKn8zfOTsiZX6OsAdq8qOVzjrZNVrLwJPe+11IdLrM/3QBEEV@lists.infradead.org X-Gm-Message-State: AOJu0YyOy4PkKCKUh0rtHX7dJT7oKZxsPbEUSmVa0wRbQfxpuDg3bsSp fb78jEVz8TZmb/IEkiYerzAadyESrKQispU9uyoMp9jfnepihp4X X-Google-Smtp-Source: AGHT+IEL1SR5b0viGbzwKw6Mdv/n35g8dS9bGsmDdRkVV7XHmzsSthsikksdSKV4HccdbFQcdAx89g== X-Received: by 2002:a05:6a21:6b0c:b0:1c2:8d33:af69 with SMTP id adf61e73a8af0-1cece5d1678mr16248108637.41.1725473457520; Wed, 04 Sep 2024 11:10:57 -0700 (PDT) Received: from localhost (fpd11144dd.ap.nuro.jp. [209.17.68.221]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7177859a377sm1964498b3a.143.2024.09.04.11.10.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 11:10:56 -0700 (PDT) Date: Thu, 5 Sep 2024 03:10:55 +0900 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: florian.fainelli@broadcom.com Cc: Riyan Dhiman , 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: <20240904181055.GA20073@rocinante> References: <20240904161953.46790-2-riyandhiman14@gmail.com> <159c5fcf-709d-42ba-8d45-a70b109fe261@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <159c5fcf-709d-42ba-8d45-a70b109fe261@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_111059_047710_FFBCB8BE X-CRM114-Status: GOOD ( 15.72 ) 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 Hello, > > 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. [...] > This looks fine, however it seems like we could either: > > - update brcm_pcie_get_inbound_wins() to take a reference to an u8 and > assign num_inbound_wins directly plus return a negative error code > > or > > - update brcm_pcie_get_inbound_wins() to return 0 when encountering an error > > We should have at least 1 inbound window to operate this PCIe controller, so > if we get 0, nothing useful is going to happen. > > Deferring to Jim as to whether he prefers to take your patch or fix it in a > different way. Thanks! The former would be my preference. As such, I can make the change on the branch directly, if needed. To avoid reposting or sending a new patch. Krzysztof