Skip to content

Commit 5bb494d

Browse files
Gao Shiyuanjoergroedel
authored andcommitted
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]> Reviewed-by: Vasant Hegde <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent b0988ac commit 5bb494d

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

drivers/iommu/amd/init.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3421,25 +3421,23 @@ static bool amd_iommu_sme_check(void)
34213421
* IOMMUs
34223422
*
34233423
****************************************************************************/
3424-
int __init amd_iommu_detect(void)
3424+
void __init amd_iommu_detect(void)
34253425
{
34263426
int ret;
34273427

34283428
if (no_iommu || (iommu_detected && !gart_iommu_aperture))
3429-
return -ENODEV;
3429+
return;
34303430

34313431
if (!amd_iommu_sme_check())
3432-
return -ENODEV;
3432+
return;
34333433

34343434
ret = iommu_go_to_state(IOMMU_IVRS_DETECTED);
34353435
if (ret)
3436-
return ret;
3436+
return;
34373437

34383438
amd_iommu_detected = true;
34393439
iommu_detected = 1;
34403440
x86_init.iommu.iommu_init = amd_iommu_init;
3441-
3442-
return 1;
34433441
}
34443442

34453443
/****************************************************************************

include/linux/amd-iommu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ struct amd_iommu_pi_data {
3131
struct task_struct;
3232
struct pci_dev;
3333

34-
extern int amd_iommu_detect(void);
34+
extern void amd_iommu_detect(void);
3535

3636
#else /* CONFIG_AMD_IOMMU */
3737

38-
static inline int amd_iommu_detect(void) { return -ENODEV; }
38+
static inline void amd_iommu_detect(void) { }
3939

4040
#endif /* CONFIG_AMD_IOMMU */
4141

0 commit comments

Comments
 (0)