]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iommu/amd: remove return value of amd_iommu_detect
authorGao Shiyuan <gaoshiyuan@baidu.com>
Fri, 3 Jan 2025 16:58:08 +0000 (00:58 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 6 Jan 2025 11:42:00 +0000 (12:42 +0100)
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>
drivers/iommu/amd/init.c
include/linux/amd-iommu.h

index 41294807452d20f34dffafab890d65187d3bf8ac..9db8fd1275bed92f0068764b7b546efdb45906ba 100644 (file)
@@ -3421,25 +3421,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;
 }
 
 /****************************************************************************
index 2b90c48a6a871dc62b4292aa3e062dd12c270189..062fbd4c9b772b3c0443f99f58be1ed579cf22f8 100644 (file)
@@ -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 */