From patchwork Thu Apr 17 08:25:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 882053 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 097B322E011; Thu, 17 Apr 2025 08:25:20 +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=1744878321; cv=none; b=n9/kRfUpNNuimqN5zmd17qPbyIi0q3vhI3Sn0swnwMuDQ/5cOvG9GEsyZq4qyD6rX/knfgAbyp3iCG6vRjBA8sbTdaX6/wuySO6CtJcR+sCvZRDHi4SEUNqGoBky2zeoRB4tE3/yiFXnG8yiS4D8C+N4gDQrvgHRFyud1gilSJ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744878321; c=relaxed/simple; bh=8L1voKG5qXOIBBuMnJMvx1MQh/Oz9nEc8hHGq/1Vog8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EIaRjt0jnpTDsWeXgD4s8rtqP+2drkIWcCzZgEPveovtoWYZBlxuHKIiAxycihEq2LsIcJNKBCmii6dKJse5dria6K+TBqEo5UbBoQ7DePLkAT1dUPsq7vBRt2ZCrr5hqQTY+ClDnwLmhwKDOlUDjQioWgJXp1YJXd8VPQ4H/p0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Q7TtqNLv; 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="Q7TtqNLv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88C24C4CEE4; Thu, 17 Apr 2025 08:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744878320; bh=8L1voKG5qXOIBBuMnJMvx1MQh/Oz9nEc8hHGq/1Vog8=; h=From:To:Cc:Subject:Date:From; b=Q7TtqNLvoVx6yLrNA1yTYw8iLvswSTOsea8EA9zb2VekL74Hs5m3SbcaCpkXw6GUq QimjfSI0dVa00WGwxBwAbaoqUwlggOUdGipC5mJx9OfhLn0j8De88oYZtrl3MyQ+QN ags7ABemahDgVNDQvc6znspqk4h3U4dL0vZs33HMyMdOzTswTk72RsCWvTNXtBYZ1d +e7lJAfji5lC14M1x0VFmEZxhbpJcSHjs0GlA3MTvwHZg4yzqR8VQo0yLuxSO2rI6E GQm2u2HrwOMVXKvNzOjyom2o6syX1BETUMfwgv2MS1nzRVtqQpBuYAH/mYiBZqNBfp QJJb5BOREu10A== From: Philipp Stanner To: Seth Heasley , Neil Horman , Andi Shyti , Robert Richter Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Stanner Subject: [PATCH 1/2] i2c: ismt: Use non-hybrid PCI devres API Date: Thu, 17 Apr 2025 10:25:11 +0200 Message-ID: <20250417082511.22272-2-phasta@kernel.org> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 ismt enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_region() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Replace the call to sometimes-managed pci_request_region() with one to the always-managed pcim_request_region(). Signed-off-by: Philipp Stanner --- drivers/i2c/busses/i2c-ismt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c index c93c02aa6ac8..7aaefb21416a 100644 --- a/drivers/i2c/busses/i2c-ismt.c +++ b/drivers/i2c/busses/i2c-ismt.c @@ -933,7 +933,7 @@ ismt_probe(struct pci_dev *pdev, const struct pci_device_id *id) return err; } - err = pci_request_region(pdev, SMBBAR, ismt_driver.name); + err = pcim_request_region(pdev, SMBBAR, ismt_driver.name); if (err) { dev_err(&pdev->dev, "Failed to request SMBus region 0x%lx-0x%lx\n", From patchwork Thu Apr 17 08:25:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 882723 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 4EBDB22F3A8; Thu, 17 Apr 2025 08:25:22 +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=1744878323; cv=none; b=ikQRaSHTtOQuKNaaJKsujT4OEEnqg73X9E7z+gwG904GKUpllnnIRPjkYvNBDGgrz4+mtLVK4tp66P2ZtXMjtv9C6cGnCe3cYhj0YU65d3QKHv4QKAzmJHA89uIROLvmN4fMZ+aCWktkt9LNjsLqDeuCEeO0LRvR8BuhV7kqv4o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744878323; c=relaxed/simple; bh=yzHrg+rkgUvxrzdi1fRil713s99SCk5tLba9qmsqsPY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GBC1joiIh9f0UgWIm03dwOZHsi9BNXUWf0lpNTc0Ki9sQOUsso/rkPr2/J28UH6GpIGqGrZszv2QWIbZjmiyvEQk+F0D3Nccf2EAdzqFly58RRXrr5tVLkhbcwIDlegPgiXfYUP/sPj+7lprIZqFRAued24XrLM+FkkDnKxNB7c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ea2R1M5N; 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="ea2R1M5N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03DE6C4CEE7; Thu, 17 Apr 2025 08:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744878322; bh=yzHrg+rkgUvxrzdi1fRil713s99SCk5tLba9qmsqsPY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ea2R1M5NQa87Pi4uoXS1JyE99ALdHRU2br8FRT/gTD0jmlXZOt/OeCLgPmp7EY+el BMZl/F79cTXHCO/tXXvPaHYSlfBu7bYw1qi+SiPnMwOUz69CxNMsqxBRV4cBon7AhX Hbwswp4BupVUu1MoxkKK9aKryWABfqzbwCJf3/vqQmT9T9YTTte2rc/ZsDgaevIh/x nwVFua6yKAIDkqxWoa4rnwd3vH02UJz5EN+kbgMwoLa5KpHx+JUORgyavQ8f+NEL/4 MsJQsVJF6lkpRpjLfhBUwNEvwlqRbXzZ/yQ8Np0eP9+FK/9QlrodDYAk7+CGhJ558S B7eyDSVEFr3Hw== From: Philipp Stanner To: Seth Heasley , Neil Horman , Andi Shyti , Robert Richter Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Stanner Subject: [PATCH 2/2] i2c: thunderx: Use non-hybrid PCI devres API Date: Thu, 17 Apr 2025 10:25:12 +0200 Message-ID: <20250417082511.22272-3-phasta@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250417082511.22272-2-phasta@kernel.org> References: <20250417082511.22272-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 thunderx enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Replace the call to sometimes-managed pci_request_regions() with one to the always-managed pcim_request_all_regions(). Signed-off-by: Philipp Stanner --- drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busses/i2c-thunderx-pcidrv.c index 143d012fa43e..93c18c99178d 100644 --- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c +++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c @@ -175,7 +175,7 @@ static int thunder_i2c_probe_pci(struct pci_dev *pdev, if (ret) return ret; - ret = pci_request_regions(pdev, DRV_NAME); + ret = pcim_request_all_regions(pdev, DRV_NAME); if (ret) return ret;