Linux SPARSE checker discussions
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>,
	kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Christian Loehle <christian.loehle@arm.com>,
	linux-sparse@vger.kernel.org, sparse@chrisli.org
Subject: Re: [linux-next:master 9454/14229] kernel/sched/cpufreq_schedutil.c:732:31: sparse: sparse: Initializer entry defined twice
Date: Thu, 3 Dec 2026 14:57:45 -0800	[thread overview]
Message-ID: <f9fbbbb9-feed-4932-a725-7e63a5c0a53a@acm.org> (raw)
In-Reply-To: <be8c015c-87d2-4a22-be36-2efeba2dfceb@oss.qualcomm.com>

On 12/3/26 1:21 AM, Zhongqiu Han wrote:
> Ccing Chris and linux-sparse@vger.kernel.org
> 
> This is a pre-existing sparse false positive in
> __IRQ_WORK_INIT(), not something introduced by this patch.
> 
> With the same sparse(v0.6.5-rc1-94-g0d159c10), config and W=1, the
> parent commit already reports the identical warning, just at the header:
> 
>    ./include/linux/irq_work.h:34:17: sparse: warning: Initializer entry
> defined twice
> 
> which is init_irq_work() expanding the same __IRQ_WORK_INIT() macro. The
> patch replaces init_irq_work() with IRQ_WORK_INIT_HARD(), so the warning
> moves to the call site. Apart from that, the sparse output for
> kernel/sched/build_utility.c is identical before and after the patch.
> 
> Every IRQ_WORK_INIT*() user warns the same way under W=1, e.g.:
> 
>    kernel/irq_work.c:46:9: sparse: warning: Initializer entry defined twice
>    kernel/task_work.c:20:9: sparse: warning: Initializer entry defined 
> twice
>    kernel/rcu/srcutree.c:267:35: sparse: warning: Initializer entry 
> defined twice
Thanks for having reported this. I'm the new sparse maintainer and I'm
working on a fix.

Best regards,

Bart.

      reply	other threads:[~2026-12-03 22:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261203091753.WpTaK2OO-lkp@intel.com>
2026-12-03  9:21 ` [linux-next:master 9454/14229] kernel/sched/cpufreq_schedutil.c:732:31: sparse: sparse: Initializer entry defined twice Zhongqiu Han
2026-12-03 22:57   ` Bart Van Assche [this message]

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=f9fbbbb9-feed-4932-a725-7e63a5c0a53a@acm.org \
    --to=bvanassche@acm.org \
    --cc=christian.loehle@arm.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rjw@rjwysocki.net \
    --cc=sparse@chrisli.org \
    --cc=zhongqiu.han@oss.qualcomm.com \
    /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