Hi Oleksii,

On 11/27/23 1:46 PM, Oleksii wrote:
> On Mon, 2023-11-27 at 15:31 +0100, Jan Beulich wrote:
>> On 27.11.2023 15:13, Oleksii Kurochko wrote:
>>> --- a/xen/arch/ppc/include/asm/irq.h
>>> +++ b/xen/arch/ppc/include/asm/irq.h
>>> @@ -3,7 +3,9 @@
>>>  #define __ASM_PPC_IRQ_H__
>>>  
>>>  #include <xen/lib.h>
>>> +#ifdef CONFIG_HAS_DEVICE_TREE
>>>  #include <xen/device_tree.h>
>>> +#endif
>>>  #include <public/device_tree_defs.h>
>>
>> Why would this #ifdef not cover the public header as well? (Otherwise
>> I'd
>> be inclined to ask that the conditional be moved inside that header.)
> In that header is defined only consts without additional header
> inclusion. At that moment it looked to me pretty save to ifdef only
> xen/device_tree.h but you are right we can move incluion of the public
> header inside #ifdef OR just remove as xen/device_tree.h already
> includes it.
>

Removing the include of <xen/device_tree.h> from ppc's asm/irq.h breaks
the build, because of platform_get_irq's usage of the `struct
dt_device_node` type:

  CC      common/cpu.o
In file included from ./include/xen/irq.h:80,
                 from ./include/xen/pci.h:13,
                 from ./include/xen/iommu.h:25,
                 from ./include/xen/sched.h:12,
                 from ./include/xen/event.h:12,
                 from common/cpu.c:3:
./arch/ppc/include/asm/irq.h:28:49: error: ‘struct dt_device_node’
declared inside parameter list will not be visible outside of this
definition or declaration [-Werror]
   28 | static inline int platform_get_irq(const struct dt_device_node
*device, int index)

I wouldn't be opposed to a forward declaration of that type, but as I
indicated in my other reply to this patch, I'd like to avoid the
addition of these essentially always-dead CONFIG_HAS_DEVICE_TREE checks
to PPC code anyways, so dropping this hunk entirely from the patch might
be the way forward.

> ~ Oleksii

Thanks,
Shawn

Reply via email to