linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	Arun Easi <aeasi@marvell.com>,
	Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH] handle more graciously labels with no statement
Date: Mon, 26 Oct 2020 16:39:23 -0700	[thread overview]
Message-ID: <CAHk-=wh=Uf4DydFyii-nFe-a2SjRemPr9w0iw+aK8rL8_MjEYA@mail.gmail.com> (raw)
In-Reply-To: <3abeaeef-ddde-5c47-f79b-4c61a0820c08@acm.org>

On Mon, Oct 26, 2020 at 4:22 PM Bart Van Assche <bvanassche@acm.org> wrote:
>
> The #ifndef __CHECKER__ / #endif that I added in 2015 in the above code
> (commit 8d16366b5f23) was added because at that time I didn't see a
> better solution.

I think there are only a couple of callers, and all of them just have
a constant "device_locked" argument.

It should be easy to make the (I think single) use that _didn't_ lock
the device just do the locking, and then all of them have
"device_locked = 1", and then that argument can be removed and the
whole conditional be replaced by a lockdep assert.

Exactly like y9ou did in 8ae178760b23 ("scsi: qla2xxx: Simplify the
functions for dumping firmware") in other words.

But I didn't really look _that_ much into it, this is just from a
simple "grep" thing and maybe I missed something. I just did the
minimal "don't do invalid C" thing.

              Linus

      reply	other threads:[~2020-10-26 23:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26  4:53 [PATCH] handle more graciously labels with no statement Luc Van Oostenryck
2020-10-26 17:41 ` Linus Torvalds
2020-10-26 20:48   ` Luc Van Oostenryck
2020-10-26 22:56     ` Linus Torvalds
2020-10-26 23:22       ` Bart Van Assche
2020-10-26 23:39         ` Linus Torvalds [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='CAHk-=wh=Uf4DydFyii-nFe-a2SjRemPr9w0iw+aK8rL8_MjEYA@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=aeasi@marvell.com \
    --cc=bvanassche@acm.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.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;
as well as URLs for NNTP newsgroup(s).