Re: [PATCH 5.5 102/170] scripts/dtc: Remove redundant YYLOC global declaration

From: Dirk MÃller
Date: Tue Mar 31 2020 - 17:36:16 EST


Hi Greg,

>> However I think the sed above on the *patch* means that the patch will *only* modify the generated sources, not the input sources. I think
>> it would be better to patch both *input* and *generated* sources, or backport the generate-at-runtime patch as well (which might be
>> even further outside the stable policy).
>
> What do you mean by "input sources" here?


scripts/dtc/update-dtc-source.sh in older kernel generates a _shipped variant of the files from the .l/.y files:


$ ls -1 scripts/dtc/dtc-lexer.l*
scripts/dtc/dtc-lexer.l
scripts/dtc/dtc-lexer.lex.c_shipped

in newer kernels these _shipped files are generated at build time from dtc-lexer.l, which my patch is updating. I suggested
to modify the patches for older release to *both* patch dtc-lexer.l as well as update the *generated* files that are tracked
in git as dtc-lexer.lex.c_shipped rather than just in/place modifying the generated file (which would then at some later point
in time get lost as other changes regenerate the _shipped file then, reintroducing the bug).


> If I drop it for now, I'll have to add it back when gcc10 is pushed out
> to my build systems and laptops :(

Let me know if I can help with a backportable patch.

Greetings,
Dirk