mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	Charlemagne Lasse <charlemagnelasse@gmail.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	Muchun Song <muchun.song@linux.dev>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Clark Williams <clrkwllms@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jakub Kicinski <kuba@kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Davidlohr Bueso <dave@stgolabs.net>,
	LKML <linux-kernel@vger.kernel.org>,
	"open list:CONTROL GROUP (CGROUP)" <cgroups@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	linux-rt-devel@lists.linux.dev
Subject: Re: locking/local_lock, mm: sparse warnings about shadowed variable
Date: Wed, 11 Jun 2025 15:33:47 -0700	[thread overview]
Message-ID: <20250611153347.779ae8c66be1aa806dbeb816@linux-foundation.org> (raw)
In-Reply-To: <CAADnVQK+wjvxmBM7WJOGNK=AqeJ7UHBO4tUZR3Gjc4kfgux1sw@mail.gmail.com>

On Wed, 11 Jun 2025 11:20:16 -0700 Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:

> > diff --git a/include/linux/local_lock_internal.h b/include/linux/local_lock_internal.h
> > index 8d5ac16a9b17..075338f270d0 100644
> > --- a/include/linux/local_lock_internal.h
> > +++ b/include/linux/local_lock_internal.h
> > @@ -97,17 +97,17 @@ do {                                                                \
> >  #define __local_lock_acquire(lock)                                     \
> >         do {                                                            \
> >                 local_trylock_t *tl;                                    \
> > -               local_lock_t *l;                                        \
> > +               local_lock_t *ll;                                       \
> 
> I wouldn't bother messing with the code because of sparse.
> Compilers don't warn here.

There's some value in not cluttering up the sparse output in this
fashion.  sparse does often find things which we choose to fix.

  reply	other threads:[~2025-06-11 22:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 17:37 Charlemagne Lasse
2025-06-11 17:57 ` Vlastimil Babka
2025-06-11 18:20   ` Alexei Starovoitov
2025-06-11 22:33     ` Andrew Morton [this message]
2025-06-12  7:03     ` Charlemagne Lasse

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=20250611153347.779ae8c66be1aa806dbeb816@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=cgroups@vger.kernel.org \
    --cc=charlemagnelasse@gmail.com \
    --cc=clrkwllms@kernel.org \
    --cc=dave@stgolabs.net \
    --cc=hannes@cmpxchg.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=peterz@infradead.org \
    --cc=roman.gushchin@linux.dev \
    --cc=rostedt@goodmis.org \
    --cc=shakeel.butt@linux.dev \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    /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

all inboxes | Powered by JetHome®