On Wed, 25 Feb 2026 11:38:53 +0530 Riana Tauro wrote:
> $ tools/net/ynl/pyynl/ynl_gen_c.py --spec \
>   Documentation/netlink/specs/drm_ras.yaml --mode uapi --header \
>   > include/uapi/drm/drm_ras.h  
> 
> $ tools/net/ynl/pyynl/ynl_gen_c.py --spec \
>   Documentation/netlink/specs/drm_ras.yaml --mode kernel --header \
>   > drivers/gpu/drm/drm_ras_nl.h  
> 
> $ tools/net/ynl/pyynl/ynl_gen_c.py --spec \
>   Documentation/netlink/specs/drm_ras.yaml --mode kernel --source \
>   > drivers/gpu/drm/drm_ras_nl.c  

Oh interesting.. that's technically supported but the regen script
uses "-o $file --cmp-out" instead of "> $file". If we were to use
a shell redirect we override the file each time which makes incremental
kernel builds much larger.

> I used above commands to generate the initial files moving the 
> drm_ras_nl.h from include/ to drm layer.
> 
> Even after that if i regen using tools/net/ynl/ynl-regen.sh -f
> I see the above diff.
> 
> Am i using the commands wrong or missing something?

If you use the redirect the script doesn't know what the file name is
so it gives up on adding the local header. If you really want to have
the header under include we can just add an option for "--no-auto-hdr"
But again, just double checking that its what we really need, as the
auto-generated header is usually quite internal to the Netlink code.
The users of the netlink family within the kernel include the uAPI
and some human-written header.

Reply via email to