iommu/amd: remove return value of amd_iommu_detect
Subsystems (2)
PATCH v2 1/1 iommu/amd: remove return value of amd_iommu_detect
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 <[email protected]>
--- drivers/iommu/amd/init.c | 10 ++++------ include/linux/amd-iommu.h | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-)
v1 -> v2:
* Remove return; at the end of amd_iommu_detect
drivers/iommu/amd/init.c +4 -6
@@ -3398,25 +3398,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 ; }/****************************************************************************
include/linux/amd-iommu.h +2 -2
@@ -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 */
Signature · 1 line
2.39.3 (Apple Git-146)
Quoted 4 lines · Gao Shiyuan
The return value of
amd_iommu_detectis not used, so remove it and is consistent with other iommu detect functions.Signed-off-by Gao Shiyuan <[email protected]>
Thanks for the fix.
Reviewed-by Vasant Hegde <[email protected]>
-Vasant
Quoted 8 lines · Gao Shiyuan
The return value of
amd_iommu_detectis not used, so remove it and is consistent with other iommu detect functions.Signed-off-by Gao Shiyuan <[email protected]>--- drivers/iommu/amd/init.c | 10 ++++------ include/linux/amd-iommu.h | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-)
Applied, thanks.