Re: [PATCH] drm/nouveau/platform: fix compilation if !CONFIG_IOMMU

From: Arnd Bergmann
Date: Wed May 20 2015 - 08:02:06 EST


On Wednesday 20 May 2015 13:32:33 Thierry Reding wrote:
>
> Since these are all static functions, perhaps an "if (IS_ENABLED(...))"
> would work here? That way you'd get compile coverage of the code in all
> cases.

I had the same thought at first.

> But perhaps that doesn't work for IOMMU. I have a vague memory of
> running across something like this before and IOMMU has this quirk of
> defining struct iommu_ops as empty if IOMMU_API is deselected so you'll
> probably get compiler errors unless you actually preprocess the code
> out.

Exactly.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/