On Thu, 26 Feb 2026 15:17:55 +0530 Riana Tauro wrote:
> > 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.  
> 
> If i am using this for the first time (not every time). Shouldn't it 
> include the header file (#include "drm_ras_nl.h) too?
> 
> tools/net/ynl/pyynl/ynl_gen_c.py --spec 
> Documentation/netlink/specs/drm_ras.yaml --mode kernel --source
> 
> But i am seeing this include only when i regenerate using ynl-regen.sh.
> Is it mandatory to regenerate after the initial use of the above command.
> 
> >   
> >> 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"  
> 
> No its not necessary to be in the include directory as it is used 
> internally by drm code.  @Rodrigo I will move this since this is used 
> only by drm_ras.c
> 
> But even after i move it to drivers/gpu/drm/. The initial generation 
> using ynl_gen_c.py doesn't include this header even if the header was 
> generated first.
> 
> The header is included only when i use ynl-regen. Is that expected?

As I explained above you should use the -o $file argument rather than 
a redirect of stdout.

Reply via email to