diff options
| author | Gao Shiyuan <gaoshiyuan@baidu.com> | 2026-09-02 12:13:20 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-09-07 17:18:23 +0200 |
| commit | 17eea3c2041d7f28863d766e7523cdf108d59fcd (patch) | |
| tree | 9849da3e8c2910e2c0c0993eec563d98820cbf42 | |
| parent | 6d666f0b8b36c0765cf19fbe6de5a7ba5a73aad9 (diff) | |
| download | linux-stable-17eea3c2041d7f28863d766e7523cdf108d59fcd.tar.gz linux-stable-17eea3c2041d7f28863d766e7523cdf108d59fcd.zip | |
iommu/amd: remove return value of amd_iommu_detect
[ Upstream commit 5bb494d5cbb9a3403ba8b1c8bc145b42fc119078 ]
The return value of amd_iommu_detect is not used, so remove it and
is consistent with other iommu detect functions.
Signed-off-by: Gao Shiyuan <gaoshiyuan@baidu.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20250103165808.80939-1-gaoshiyuan@baidu.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | drivers/iommu/amd/init.c | 10 | ||||
| -rw-r--r-- | include/linux/amd-iommu.h | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 36a814b6c4de..0e270533bf12 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -3484,25 +3484,23 @@ static bool amd_iommu_sme_check(void) * IOMMUs * ****************************************************************************/ -int __init amd_iommu_detect(void) +void __init amd_iommu_detect(void) { int ret; if (no_iommu || (iommu_detected && !gart_iommu_aperture)) - return -ENODEV; + return; if (!amd_iommu_sme_check()) - return -ENODEV; + return; ret = iommu_go_to_state(IOMMU_IVRS_DETECTED); if (ret) - return ret; + return; amd_iommu_detected = true; iommu_detected = 1; x86_init.iommu.iommu_init = amd_iommu_init; - - return 1; } /**************************************************************************** diff --git a/include/linux/amd-iommu.h b/include/linux/amd-iommu.h index 2b90c48a6a87..062fbd4c9b77 100644 --- a/include/linux/amd-iommu.h +++ b/include/linux/amd-iommu.h @@ -31,11 +31,11 @@ struct amd_iommu_pi_data { struct task_struct; struct pci_dev; -extern int amd_iommu_detect(void); +extern void amd_iommu_detect(void); #else /* CONFIG_AMD_IOMMU */ -static inline int amd_iommu_detect(void) { return -ENODEV; } +static inline void amd_iommu_detect(void) { } #endif /* CONFIG_AMD_IOMMU */ |
