LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
	Al Viro <viro@ftp.linux.org.uk>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: Sparse fix for scsi_request_fn
Date: Tue, 23 Oct 2007 15:13:37 -0600	[thread overview]
Message-ID: <20071023211337.GT27248@parisc-linux.org> (raw)
In-Reply-To: <alpine.LFD.0.999.0710221908130.30120@woody.linux-foundation.org>

On Mon, Oct 22, 2007 at 07:09:56PM -0700, Linus Torvalds wrote:
> Umm. This is why we write things like
> 
> 	static void double_lock_balance(struct rq *this_rq, struct rq *busiest)
> 		__releases(this_rq->lock)
> 		__acquires(busiest->lock)
> 		__acquires(this_rq->lock)
> 	{
> 		...
> 
> ie your "__holds()" is nothing new, and should be written as 
> a pair of __releases(x) and __acquires(x), which is more readable anyway 
> (since it actually says what the function does!)

Thanks, I hadn't realised that sparse would unify the two declarations.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

      reply	other threads:[~2007-10-23 21:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-23  1:48 Matthew Wilcox
2007-10-23  2:09 ` Linus Torvalds
2007-10-23 21:13   ` Matthew Wilcox [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=20071023211337.GT27248@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=James.Bottomley@steeleye.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ftp.linux.org.uk \
    --subject='Re: Sparse fix for scsi_request_fn' \
    /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

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).