From nobody Sun Nov 24 22:37:38 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E80931531E3; Fri, 1 Nov 2024 07:15:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730445335; cv=none; b=oB2DlxpIpSIfxSmOSRD161N+gjd+gM+eRewlnupHlxbBqi9ar3az2FO5YC6sObfslgXh59tzIAw05vL1oM24ORgrzdQUV1sqZkepOfgp1Xvcx/JQlzxk+4YXv9gCnFcJ3DywYW5F/d9FBQE1L2vaHdg1K1FXtFgmI4h3iMCxgkU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730445335; c=relaxed/simple; bh=pqCHbefJia4K1aQNqr1JJ0xqZ/HF1gOFf70y9GquLnQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rPabca7V3Y4cwidq8i7VqaIRIqw1JsdoagP7VPXE9vJ1ptvPZzYSwExqWOd+9KsGBELkxkfrZnu3EPN4ZxF1DKUrLX+wz+K2Us+ODln/0bvecAnXf7bGv1sq3pywERwIrPg4MXqRcCqJCy7pM24S8gwUbww0tp0mOsulcqWXYVs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sa0meP7T; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sa0meP7T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7386C4CED3; Fri, 1 Nov 2024 07:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730445334; bh=pqCHbefJia4K1aQNqr1JJ0xqZ/HF1gOFf70y9GquLnQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sa0meP7TB9ImCr9Iium0o34uyLo55rKpvlZg3Xy9Ub5ryk1a0EbNNMCsyKAS+mP1Q mwOkIOcWPmF+ksNcDV85avuEfGtCwBzhy5kaSQWweMdfcCgxcbBQ0KCZsiW4idbucZ xirpwG/kd5KvqEc8FVdGR8ZARwFugca/dz1MHy6/9mq/WMvdX/aZVWd8wxgSzFVw4X i+YnLhWaYUWIDu99sKgqsy5zZtbYKWagJ0jM8Zs5l/ilaWq4YFeMK+MbnQLdaOOgHk UBu/KImE77URpLonFvix8LLst5dE6Vx13kunLZcqv+I9i9Kga9Ijl3GL0plOtFHWKc 84akrOyqAxwPw== From: William Breathitt Gray Date: Fri, 01 Nov 2024 16:15:08 +0900 Subject: [PATCH 1/2] gpio: pci-idio-16: Replace deprecated PCI functions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241101-pci_iomap_region_gpio_acces-v1-1-26eb1dc93e45@kernel.org> References: <20241101-pci_iomap_region_gpio_acces-v1-0-26eb1dc93e45@kernel.org> In-Reply-To: <20241101-pci_iomap_region_gpio_acces-v1-0-26eb1dc93e45@kernel.org> To: Bartosz Golaszewski , Linus Walleij Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1802; i=wbg@kernel.org; h=from:subject:message-id; bh=pqCHbefJia4K1aQNqr1JJ0xqZ/HF1gOFf70y9GquLnQ=; b=owGbwMvMwCW21SPs1D4hZW3G02pJDOkqDSJvv7TK1vxqyZuvXKR69ar9k+I7bt8Er/PL8M/OY 9aofvu8o5SFQYyLQVZMkaXX/OzdB5dUNX68mL8NZg4rE8gQBi5OAZjIgruMDK95+Ld+rOw2d+MW bxJd+v+j4qHGyztvrO9imima8TBF/zwjw2VzPwc731zxPm8lDoUyK3U9RUvur53MXRkL5WO6jR9 zAwA= X-Developer-Key: i=wbg@kernel.org; a=openpgp; fpr=8D37CDDDE0D22528F8E89FB6B54856CABE12232B pcim_iomap_regions() and pcim_iomap_table() have been deprecated in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with pcim_iomap_region(). In order to match the rest of the code in idio_16_probe(), utilize dev_err_probe() to handle error for pcim_enable_device(). Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij --- drivers/gpio/gpio-pci-idio-16.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/gpio/gpio-pci-idio-16.c b/drivers/gpio/gpio-pci-idio-1= 6.c index 44c0a21b1d1d9f1ba4e013ba0947ccae78288d5c..64f332c805507645039615e0a89= b83175f6bb616 100644 --- a/drivers/gpio/gpio-pci-idio-16.c +++ b/drivers/gpio/gpio-pci-idio-16.c @@ -70,24 +70,17 @@ static int idio_16_probe(struct pci_dev *pdev, const st= ruct pci_device_id *id) struct device *const dev =3D &pdev->dev; int err; const size_t pci_bar_index =3D 2; - const char *const name =3D pci_name(pdev); struct idio_16_regmap_config config =3D {}; void __iomem *regs; struct regmap *map; =20 err =3D pcim_enable_device(pdev); - if (err) { - dev_err(dev, "Failed to enable PCI device (%d)\n", err); - return err; - } - - err =3D pcim_iomap_regions(pdev, BIT(pci_bar_index), name); - if (err) { - dev_err(dev, "Unable to map PCI I/O addresses (%d)\n", err); - return err; - } + if (err) + return dev_err_probe(dev, err, "Failed to enable PCI device\n"); =20 - regs =3D pcim_iomap_table(pdev)[pci_bar_index]; + regs =3D pcim_iomap_region(pdev, pci_bar_index, pci_name(pdev)); + if (IS_ERR(regs)) + return dev_err_probe(dev, PTR_ERR(regs), "Unable to map PCI I/O addresse= s\n"); =20 map =3D devm_regmap_init_mmio(dev, regs, &idio_16_regmap_config); if (IS_ERR(map)) --=20 2.47.0 From nobody Sun Nov 24 22:37:38 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA6321547D8; Fri, 1 Nov 2024 07:15:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730445335; cv=none; b=cyPYVmU7gWzmDEXXR2iiFFGsVU/LvI8BAPzu2RwQ/1ABago3mY6bjYb/p8273yGDrQGGTQvaPwQZY+4MXBizQ8rhuWrLGHIhcYVN4wEZ6ep82rUbkIF2vxOiMuYvlfoikfJruVE9FYSuOOVJQFoOTIaGoDZ18U9hoIisdXXIAbM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730445335; c=relaxed/simple; bh=Sjm00QEBvrr9+gjMgcJgKfjF19vL6wR3gvmB25nW2BA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EEtGQaUVAjT3VrJNEOnmkRcRGFAx+PqDWmBBGg1Ek84N2ER8HCkup2mAm1PsFNhJJ+CkMLWJajh1qHDAO4E7woEKhf+VigU4/pbXw7/q5FZRNTm6EGGTMWZRyogN4WFClcqPaSf4cjXQMF4Nc7m8n3PE4aSjFxef4nXuzTk2Z1E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uu6SeCRc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uu6SeCRc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4F4EC4CED2; Fri, 1 Nov 2024 07:15:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730445335; bh=Sjm00QEBvrr9+gjMgcJgKfjF19vL6wR3gvmB25nW2BA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=uu6SeCRcgueAUbZkWKfHjLKBhxMxFKAgZ7mbRGEpmOtfYkenpUNRtqA4l4YPzbAms XgxDF2c41+p1tHOB2Okr4jGPOkc+J5wmgIs8mJa1HkS+5RGWtdCACsrQ07e3+kvKSV QvbPt2TQio9GsIq87Pnx4q9BebriZlY70abjU8ZmfE6fZCwjiVuKnU06BfUox+IZy2 omBIDCccUzow7H1cWKRZ1w6llV51GfNUK8epT1afy+U65Nxeg3NcjrWy29wMc+AI+m tLNOalpJe/vOpVBd7md/KmywvmqZDnqKfnOKYSHzNYM0h2Zm4mTq8Euo38kzfjAAlL iyszSq5kiZFOw== From: William Breathitt Gray Date: Fri, 01 Nov 2024 16:15:09 +0900 Subject: [PATCH 2/2] gpio: pcie-idio-24: Replace deprecated PCI functions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241101-pci_iomap_region_gpio_acces-v1-2-26eb1dc93e45@kernel.org> References: <20241101-pci_iomap_region_gpio_acces-v1-0-26eb1dc93e45@kernel.org> In-Reply-To: <20241101-pci_iomap_region_gpio_acces-v1-0-26eb1dc93e45@kernel.org> To: Bartosz Golaszewski , Linus Walleij Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1974; i=wbg@kernel.org; h=from:subject:message-id; bh=Sjm00QEBvrr9+gjMgcJgKfjF19vL6wR3gvmB25nW2BA=; b=owGbwMvMwCW21SPs1D4hZW3G02pJDOkqDSKXc9bc4/ilt1/eJPl/9AoxybeJ1f+YnqkU/pZK4 dS/6vWoo5SFQYyLQVZMkaXX/OzdB5dUNX68mL8NZg4rE8gQBi5OAZgI3xxGhguqJ9X+v3/k7n3s b9ti92BOyRUH3DR/JCwwlHg4qe71p5OMDBPVXjv6bVgQ67w8tWG99umcZM9dFrblGgtUjYKPvOc O4gIA X-Developer-Key: i=wbg@kernel.org; a=openpgp; fpr=8D37CDDDE0D22528F8E89FB6B54856CABE12232B pcim_iomap_regions() and pcim_iomap_table() have been deprecated in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with pcim_iomap_region(). In order to match the rest of the code in idio_24_probe(), utilize dev_err_probe() to handle error for pcim_enable_device(). Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij --- drivers/gpio/gpio-pcie-idio-24.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/gpio/gpio-pcie-idio-24.c b/drivers/gpio/gpio-pcie-idio= -24.c index 7f7f95ad4343d91de13b5c32936bc132f93d6a68..80c0ba0afa672d276d553787fdc= 499010d4619cd 100644 --- a/drivers/gpio/gpio-pcie-idio-24.c +++ b/drivers/gpio/gpio-pcie-idio-24.c @@ -305,19 +305,16 @@ static int idio_24_probe(struct pci_dev *pdev, const = struct pci_device_id *id) struct regmap_irq_chip_data *chip_data; =20 err =3D pcim_enable_device(pdev); - if (err) { - dev_err(dev, "Failed to enable PCI device (%d)\n", err); - return err; - } + if (err) + return dev_err_probe(dev, err, "Failed to enable PCI device\n"); =20 - err =3D pcim_iomap_regions(pdev, BIT(pci_plx_bar_index) | BIT(pci_bar_ind= ex), name); - if (err) { - dev_err(dev, "Unable to map PCI I/O addresses (%d)\n", err); - return err; - } + pex8311_regs =3D pcim_iomap_region(pdev, pci_plx_bar_index, "pex8311"); + if (IS_ERR(pex8311_regs)) + return dev_err_probe(dev, PTR_ERR(pex8311_regs), "Unable to map PEX 8311= I/O addresses\n"); =20 - pex8311_regs =3D pcim_iomap_table(pdev)[pci_plx_bar_index]; - idio_24_regs =3D pcim_iomap_table(pdev)[pci_bar_index]; + idio_24_regs =3D pcim_iomap_region(pdev, pci_bar_index, name); + if (IS_ERR(idio_24_regs)) + return dev_err_probe(dev, PTR_ERR(idio_24_regs), "Unable to map PCIe-IDI= O-24 I/O addresses\n"); =20 intcsr_map =3D devm_regmap_init_mmio(dev, pex8311_regs, &pex8311_intcsr_r= egmap_config); if (IS_ERR(intcsr_map)) --=20 2.47.0