From patchwork Sat Sep 7 16:09:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riyan Dhiman X-Patchwork-Id: 13795230 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 D4FA1EB64CA for ; Sat, 7 Sep 2024 16:10:59 +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:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=+g5hAHvMQPPH39bScYXFvi1rVaMwrdyfGczEk5Cm4ms=; b=Dm/6+tHe4KJmd0PqHeLETJc2qS fO3bPqPnXviTpby+zfnr79p9NK9fkCfJJfe3JKQxtmuecau7/PUfHEOe4d8RkgIHKROP3PbCfzJEw 0TbmY1E732ABe2YhAXVNJAC1eG0ZWFjETF8s+TZG7vczia+keaI2iur4SZydt+X2Au11b0451GsAz ZwebeiQunBxYcwrnVIETasLuKHGVgmJ1tCq3JPlev67R5/kZqSRua9nam3LOMGVOgsiYSb3yV+ipu ZfUyK0QcTmSSRVQldQWBH8aT2twddssOk/vuvpJ82410BkSqve/PQObkQJUOngVrnkDukN2keDYVF gyeyiXkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smy1R-0000000FHD1-3tGA; Sat, 07 Sep 2024 16:10:50 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smy0P-0000000FH3T-44oI; Sat, 07 Sep 2024 16:09:47 +0000 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-718e9c8bd83so157940b3a.1; Sat, 07 Sep 2024 09:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725725384; x=1726330184; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+g5hAHvMQPPH39bScYXFvi1rVaMwrdyfGczEk5Cm4ms=; b=Js1Cjdgrn9JAsX6ERgLkAhycDdfUa50GVl8TpKmig7bfN29reZjtL7ZY5dr8a2we22 CVNcr/rjfdMqi62aDqlpND4MwKgdSi7zkDXFL/1628796I19oTPzmSHbVPOl5ZgCX4Ya FNy+f6PWG3KURWrlC0XTsgvkuP6GWYIXjhWFD/uy31MLJ++GppiApMjK4U69qXNuyFZ1 5W0v9X38aBHk7numwmovQgRQEaUaExesEg2oBIe6nzBZzL1U6iFGqd/pywA2TUAqFmF0 5gVE9FhliOWS3okVQLJQ+fYQa5PuJXQqUBnvItvjH+XYAiOzgzbcs1ZpxwKD4wPZpTDZ 7jaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725725384; x=1726330184; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+g5hAHvMQPPH39bScYXFvi1rVaMwrdyfGczEk5Cm4ms=; b=TmuED4P0AnJlQA3i81mO52HPQwHtS1VsJBt5qAsDTNgNTvQg5ctrF5eSt6ff1uZjKa IyBr9w9ELQCJ0j33f7PzKMlkx8jaaCqpq9KHppf+reDQyFLDikyIk/J86MWd2gF6fF4D WNABt2ZJ9SOxDVCqSO5T9oDvhiD1cDxIr5oJ9t/oBoxykLD5ISg50ofumt6H29zEtAzG lk74D3G9YKnEiCSDPhmHei/CrNVNyJ15v1LYqrKth/CHBrwllvtdl58R3B4fuyefcBop oXul9U7WP1ERCnjSc/uOiekEkckum0C1HVqeBdLmT9AC6lrMDMUjMRpVtoMZox+TbgnA AuNQ== X-Forwarded-Encrypted: i=1; AJvYcCWFbRdRO8X3rFjZAFPMfW0pQDDDQes9cd+epBfNkmeQtIFwiPX/8sRyULmg4VRs9r2cox7NgIwNt6gZONKqRsyX@lists.infradead.org, AJvYcCWUVb+5MuEQ/0JfZUMPAQfgghwiaJW8ojISMm5gerX2+28SbuFJK0PdYdHrMkiXTXfAGxl2xoyBrufyMHhF2zgFhA==@lists.infradead.org X-Gm-Message-State: AOJu0YzwKzdcIcz6q9vti5k2DB6toGZP6VSYk+EUWYLlRzkC/rjZ5drw mI9GviBU3oyHRzbIJzSHPAYKxLkEsK6cq4MorwzmIssTHPpBAEO1 X-Google-Smtp-Source: AGHT+IFcKQSqo8fsKqSWcivcS8mPO/shbBNm49Vdwr9wRmoLmLr0nfkFACshXBy7qTw/PzlwMq1CQg== X-Received: by 2002:a05:6a20:2d0e:b0:1cf:1228:c175 with SMTP id adf61e73a8af0-1cf1bfa1533mr9190686637.8.1725725384027; Sat, 07 Sep 2024 09:09:44 -0700 (PDT) Received: from fedora.. ([106.219.163.133]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-718e5983002sm1034353b3a.157.2024.09.07.09.09.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2024 09:09:43 -0700 (PDT) From: Riyan Dhiman To: jim2101024@gmail.com, nsaenz@kernel.org, lorian.fainelli@broadcom.com, bcm-kernel-feedback-list@broadcom.com, bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Riyan Dhiman Subject: [PATCH next V2] PCI: brmstb: Fix type mismatch for num_inbound_wins in brcm_pcie_get_inbound_wins Date: Sat, 7 Sep 2024 21:39:26 +0530 Message-ID: <20240907160926.39556-1-riyandhiman14@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240907_090946_029991_0DF32B60 X-CRM114-Status: GOOD ( 10.66 ) 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 Change num_inbound_wins from u8 to int 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 --- V2: Added missing semicolon in variable declaration 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 */