Re: [PATCH] irqdomain: fix compiling when IRQ_DOMAIN unset

From: Marc Zyngier
Date: Mon Nov 14 2016 - 05:41:26 EST


Hi Stephan,

On 13/11/16 15:59, Stefan Christ wrote:
> When config option IRQ_DOMAIN is unset, compiling the file
> 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c' fails:
>
> CC drivers/gpu/drm/amd/amdgpu/amdgpu_irq.o
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c: In function âamdgpu_irq_dispatchâ:
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:345:3: error: implicit declaration of
> function âirq_find_mappingâ [-Werror=implicit-function-declaration]
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c: In function âamdgpu_irq_add_domainâ:
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:529:2: error: implicit declaration of
> function âirq_domain_add_linearâ [-Werror=implicit-function-declaration]
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c: In function âamdgpu_irq_remove_domainâ:
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:550:3: error: implicit declaration of
> function âirq_domain_removeâ [-Werror=implicit-function-declaration]
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c: In function âamdgpu_irq_create_mappingâ:
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:569:2: error: implicit declaration of
> function âirq_create_mappingâ [-Werror=implicit-function-declaration]
>
> Adding the functions stubs in the header file so it compiles cleanly.
> Maybe the drm driver 'amdgpu' should select the config option IRQ_DOMAIN
> if it cannot work without it. But I don't know if that's necessary.

This looks like the wrong fix to me, as you just end-up with a
non-functional driver which will compiles just fine, making it even
harder to find out what's wrong with it.

Selecting IRQ_DOMAIN is a much saner option.

Thanks,

M.
--
Jazz is not dead. It just smells funny...