On 11.02.2025 08:43, Denis Mukhin wrote:
>> On 08.02.2025 03:54, Stefano Stabellini wrote:
>>> On Fri, 7 Feb 2025, dm...@proton.me wrote:
>>>
>>>> Move resource definitions to a new architecture-agnostic shared header 
>>>> file.
>>>>
>>>> Signed-off-by: Denis Mukhin dmuk...@ford.com
>>>
>>> Reviewed-by: Stefano Stabellini sstabell...@kernel.org
>>
>>
>> Hmm, don't you think ...
>>
>>>> @@ -70,22 +71,8 @@
>>>> #define of_property_read_u32(np, pname, out) (!dt_property_read_u32(np, 
>>>> pname, out))
>>>> #define of_property_read_bool dt_property_read_bool
>>>> #define of_parse_phandle_with_args dt_parse_phandle_with_args
>>>> -
>>>> -/* Xen: Helpers to get device MMIO and IRQs */
>>>> -struct resource
>>>> -{
>>>> - paddr_t addr;
>>>> - paddr_t size;
>>>> - unsigned int type;
>>>> -};
>>>> -
>>>> -#define resource_size(res) (res)->size;
>>>> -
>>>> #define platform_device dt_device_node
>>
>>
>> ... one of the blank lines being removed here would better stay?
> 
> I think the block of assorted macros (the first macro is not of not of_xxx() 
> type)
> does not need an extra newline.
> 
> The resulting block of macros looks like the following:
> [[
> 
> /* Alias to Xen device tree helpers */
> #define device_node dt_device_node
> #define of_phandle_args dt_phandle_args
> #define of_device_id dt_device_match
> #define of_match_node dt_match_node
> #define of_property_read_u32(np, pname, out) (!dt_property_read_u32(np, 
> pname, out))
> #define of_property_read_bool dt_property_read_bool
> #define of_parse_phandle_with_args dt_parse_phandle_with_args
> #define platform_device dt_device_node
> 
> ]]

And I think the of_* ones would better be separated by blank lines
from the others. Arguably platform_device might then want to move up,
immediately next to device_node.

Jan

Reply via email to