lkml.org 
[lkml]   [2022]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] iommu/amd: Fix compile warning in init code
From


On 7/29/2022 5:04 PM, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
>
> A recent commit introduced these compile warnings:
>
> CC drivers/iommu/amd/init.o
> drivers/iommu/amd/init.c:938:12: error: ‘iommu_init_ga_log’ defined but not used [-Werror=unused-function]
> 938 | static int iommu_init_ga_log(struct amd_iommu *iommu)
> | ^~~~~~~~~~~~~~~~~
> drivers/iommu/amd/init.c:902:12: error: ‘iommu_ga_log_enable’ defined but not used [-Werror=unused-function]
> 902 | static int iommu_ga_log_enable(struct amd_iommu *iommu)
> | ^~~~~~~~~~~~~~~~~~~
>
> The warnings appear because both functions are defined when IRQ
> remapping is not enabled, but only used when IRQ remapping is enabled.
>
> Fix it by only defining the functions when IRQ remapping is enabled.
>
> Fixes: c5e1a1eb9279 ("iommu/amd: Simplify and Consolidate Virtual APIC (AVIC) Enablement")
> Signed-off-by: Joerg Roedel <jroedel@suse.de>

Ah... sorry. I missed this part.

Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>

Thank you,
Suravee

\
 
 \ /
  Last update: 2022-08-01 10:38    [W:0.068 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site