From: Valdis.Kletnieks@vt.edu
To: Christoph Hellwig <hch@infradead.org>
Cc: Nikanth Karthikesan <knikanth@suse.de>,
grant@torque.net, tim@cyberelk.net, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] Change paride driver to use unlocked_ioctl instead of ioctl
Date: Wed, 09 Jan 2008 03:23:54 -0500 [thread overview]
Message-ID: <23897.1199867034@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Wed, 09 Jan 2008 08:06:20 GMT." <20080109080620.GE32560@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
On Wed, 09 Jan 2008 08:06:20 GMT, Christoph Hellwig said:
> It's generally considered good style to only have as few as possible
> return values. And this is especially important when returning from
> a section that's under a lock. So in this case it would be much better
> if you changes this function to have a local 'int error' variable
> and then just do
>
> error = -EFOO;
> goto out_unlock;
I think Christoph meant to say "as few as possible return locations". One
should write the code to have as many different return values as are
meaningful, but return them from as few places as possible - which is what the
"assign error and goto end" paradigm does...
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
next prev parent reply other threads:[~2008-01-09 8:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-10 6:14 Nikanth Karthikesan
2008-01-09 8:06 ` Christoph Hellwig
2008-01-09 8:23 ` Valdis.Kletnieks [this message]
[not found] ` <4784D3E0.BANGALORE.BLR.100.174746A.1.EABB.1@1:7.BANGALORE.BLR.100.0.1.0.1@16>
2008-01-10 8:55 ` Nikanth Karthikesan
2008-01-09 12:14 ` Jan Engelhardt
2008-01-09 12:20 ` Christoph Hellwig
2008-01-10 7:23 ` Nikanth Karthikesan
2008-01-09 12:33 ` Matthew Wilcox
2008-01-09 13:26 ` Jiri Kosina
2008-01-09 16:56 ` Alan Cox
2008-01-10 15:01 ` Jiri Kosina
2008-01-10 20:58 ` Alan Cox
[not found] ` <478681FE.BANGALORE.BLR.100.174746A.1.ECB1.1@1:7.BANGALORE.BLR.100.0.1.0.1@16>
2008-01-10 15:31 ` Nikanth Karthikesan
2008-01-10 15:50 ` Matthew Wilcox
[not found] ` <47854BF3.BANGALORE.BLR.100.174746A.1.EB89.1@1:7.BANGALORE.BLR.100.0.1.0.1@16>
2008-01-10 5:29 ` Nikanth Karthikesan
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=23897.1199867034@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=grant@torque.net \
--cc=hch@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=knikanth@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tim@cyberelk.net \
/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®