From: Oleg Nesterov <oleg@redhat.com>
To: Chris Li <sparse@chrisli.org>
Cc: Luc Van Oostenryck <lucvoo@kernel.org>,
Alexey Gladkov <legion@kernel.org>,
linux-sparse@vger.kernel.org
Subject: Re: [PATCH] sparse/pre-process: introduce "dissect_mode" option to fix dissect/semind
Date: Mon, 19 Jan 2026 13:32:56 +0100 [thread overview]
Message-ID: <aW4keHjmqTS_S9ie@redhat.com> (raw)
In-Reply-To: <CACePvbXb+EJ9tdq=E8pw3uC-fjYp4CgQ27GqLwEgirWJiMVU6g@mail.gmail.com>
On 01/18, Chris Li wrote:
>
> On Sat, Jan 17, 2026 at 8:32 AM Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > 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.
Yes, this is what I did. See
[PATCH] sparse/pre-process: don't update next->pos in collect_arg()
https://lore.kernel.org/all/aWz0V_zQ47afKFJy@redhat.com/
I was confused and tried to confuse you... let me explain. With this patch
./sparse -Wpointer-arith validation/sizeof-void.c outputs
validation/sizeof-void.c:16:14: warning: expression using sizeof(void)
validation/sizeof-void.c:17:14: warning: expression using sizeof(void)
validation/sizeof-void.c:18:14: warning: expression using sizeof(void)
validation/sizeof-void.c:19:14: warning: expression using sizeof(void)
validation/sizeof-void.c:20:27: warning: expression using sizeof(void) // changed
validation/sizeof-void.c:21:14: warning: expression using sizeof(void)
validation/sizeof-void.c:22:14: warning: expression using sizeof(void)
validation/sizeof-void.c:23:14: warning: expression using sizeof(void)
and somehow I wrongly came to conlusion that my patch is incomplete or
inconsistent because it only corrects the warning's position for the
line 20.
Now that I actually looked at validation/sizeof-void.c, I see that the
code at line 20
s += is_constexpr(sizeof *ptr);
differs in that it is the inner "sizeof *ptr" which triggers the warning,
so I think the patch is fine.
Thank you,
Oleg.
next prev parent reply other threads:[~2026-01-19 12:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 15:17 [PATCH] sparse/pre-process: introduce "dissect_mode" option to fix dissect/semind Oleg Nesterov
2026-01-16 23:29 ` Chris Li
2026-01-17 14:19 ` Oleg Nesterov
2026-01-17 16:32 ` Oleg Nesterov
2026-01-19 0:23 ` Chris Li
2026-01-19 12:32 ` Oleg Nesterov [this message]
2026-01-19 0:21 ` Chris Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aW4keHjmqTS_S9ie@redhat.com \
--to=oleg@redhat.com \
--cc=legion@kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=lucvoo@kernel.org \
--cc=sparse@chrisli.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox