Re: [PATCH] sparse/pre-process: introduce "dissect_mode" option to fix dissect/semind

Chris Li <[email protected]> Sun, 18 Jan 2026 16:23:37 -0800
Newsgroups org.kernel.vger.linux-sparse
Message-ID <CACePvbXb+EJ9tdq=E8pw3uC-fjYp4CgQ27GqLwEgirWJiMVU6g@mail.gmail.com>
On Sat, Jan 17, 2026 at 8:32 AM Oleg Nesterov <[email protected]> wrote:
>
> On 01/17, Oleg Nesterov wrote:
> >
> > Agreed! This was my plan B ;)
> >
> > With this change
> >
> >       -               if (!dissect_mode) {
> >       +               if (preprocess_only) {
> >
> > make check reports 2 failures
> >
> >       -parsing/attr-cleanup.c:10:17: error: argument is not an identifier
> >       +parsing/attr-cleanup.c:10:27: error: argument is not an identifier
> >
> >       -sizeof-void.c:20:14: warning: expression using sizeof(void)
> >       +sizeof-void.c:20:27: warning: expression using sizeof(void)
> >
> > but the new positions look more correct.
> >
> > However. I didn't dare to send this patch because other warnings from
> > sizeof-void.c still blame the column 14, this looks inconsistent...
> > But perhaps we don't really care?
>
> On a 2nd thought...
>
> Unlike other warnings, this one (sizeof-void.c:20:27) refers to the
> inner "sizeof *ptr", so I think that this patch fixes the reported
> position. So yes, I think we don't care even if the new column == 27
> differs from other warnings.
>
> What do you think?

I would just update the checker to have the new expected value
matching what new pos so validation can pass without errors.

Chris