Re: [PATCH] drm/tegra: vic: fix implicit function declaration warning

From: Thierry Reding
Date: Mon Feb 18 2019 - 09:43:43 EST


On Mon, Feb 18, 2019 at 12:00:50PM +0100, Anders Roxell wrote:
> When CONFIG_IOMMU_API isn't set the following warnings pops up:
>
> drivers/gpu/drm/tegra/vic.c: In function âvic_bootâ:
> drivers/gpu/drm/tegra/vic.c:110:31: error: implicit declaration of function âdev_iommu_fwspec_getâ; did you mean âiommu_fwspec_freeâ? [-Werror=implicit-function-declaration]
> struct iommu_fwspec *spec = dev_iommu_fwspec_get(vic->dev);
> ^~~~~~~~~~~~~~~~~~~~
> iommu_fwspec_free
> drivers/gpu/drm/tegra/vic.c:110:31: warning: initialization of âstruct iommu_fwspec *â from âintâ makes pointer from integer without a cast [-Wint-conversion]
> drivers/gpu/drm/tegra/vic.c:117:19: error: âstruct iommu_fwspecâ has no member named ânum_idsâ
> if (spec && spec->num_ids > 0) {
> ^~
> drivers/gpu/drm/tegra/vic.c:118:16: error: âstruct iommu_fwspecâ has no member named âidsâ
> value = spec->ids[0] & 0xffff;
> ^~
>
> Rework so that its inside a '#ifdef CONFIG_IOMMU_API' block.
>
> Fixes: f3779cb190a5 ("drm/tegra: vic: Support stream ID register programming")
> Signed-off-by: Anders Roxell <anders.roxell@xxxxxxxxxx>
> ---
> drivers/gpu/drm/tegra/vic.c | 2 ++
> 1 file changed, 2 insertions(+)

Applied, thanks.

Thierry

Attachment: signature.asc
Description: PGP signature