Re: [PATCH v2] kbuild: uapi: Strip comments before size type check
From: Geert Uytterhoeven
Date: Tue Oct 07 2025 - 03:43:11 EST
Hi Nathan,
On Mon, 6 Oct 2025 at 20:02, Nathan Chancellor <nathan@xxxxxxxxxx> wrote:
> On Mon, Oct 06, 2025 at 03:20:52PM +0200, Geert Uytterhoeven wrote:
> > On Mon, 6 Oct 2025 at 14:40, Andreas Schwab <schwab@xxxxxxxxxxxxxx> wrote:
> > > On Okt 06 2025, Geert Uytterhoeven wrote:
> > > > --- a/usr/include/headers_check.pl
> > > > +++ b/usr/include/headers_check.pl
> > > > @@ -155,6 +155,8 @@ sub check_sizetypes
> > > > if (my $included = ($line =~ /^\s*#\s*include\s+[<"](\S+)[>"]/)[0]) {
> > > > check_include_typesh($included);
> > > > }
> > > > + # strip comments (single-line only)
> > > > + $line =~ s@\/\*.*?\*\/@@;
> > >
> > > I don't think you need to quote the forward slashes in the regexp.
> >
> > Thanks, you are right!
> >
> > So far for not just following my instinct, but looking for similar functionality
> > in other scripts like scripts/kernel-doc.pl...
>
> I will fix this up when applying. I think I am going to adjust the
> comment to
>
> # strip single-line comments, as types may be referenced within them
>
> just to be a little more verbose about why it is being done.
OK, thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds