From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [RFC] request_region() error handling fixes
Date: Wed, 27 Sep 2006 20:48:05 +0000 [thread overview]
Message-ID: <20060927204805.GJ7457@us.ibm.com> (raw)
In-Reply-To: <1159387194.1709.40.camel@dyn9047017100.beaverton.ibm.com>
On 27.09.2006 [12:59:54 -0700], Badari Pulavarty wrote:
> Hi,
>
> I started working on request_region() error handling fixes.
> Before I got too far, want to make sure its following approach
> is acceptable. (not happy with too many "goto" statements).
> Is there a better way to do this ?
I don't think there is any better way to do multiple stacked failures
than many gotos. At least, if the goal is to avoid code duplication
(which I would say it is).
> Please comment.
Looks good, except one nit and one error below.
<snip>
> =================================> --- linux-2.6.18.orig/arch/powerpc/platforms/chrp/setup.c 2006-09-27 09:17:23.000000000 -0700
> +++ linux-2.6.18/arch/powerpc/platforms/chrp/setup.c 2006-09-27 13:20:17.000000000 -0700
<snip>
> + if (!request_region(0x20,0x20,"pic1")) {
> + printk(KERN_WARNING"chrp_init: pic1 request region failed\n");
nit: usually a space is placed between the KERN_ and the string to be
output. Same goes for all the printk()s added.
<snip>
> Index: linux-2.6.18/arch/ppc/platforms/pplus.c
> =================================> --- linux-2.6.18.orig/arch/ppc/platforms/pplus.c 2006-09-19 20:42:06.000000000 -0700
> +++ linux-2.6.18/arch/ppc/platforms/pplus.c 2006-09-27 10:02:48.000000000 -0700
> @@ -814,14 +814,49 @@
> static void __init pplus_init2(void)
> {
> #ifdef CONFIG_NVRAM
> - request_region(PREP_NVRAM_AS0, 0x8, "nvram");
> + if (request_region(PREP_NVRAM_AS0, 0x8, "nvram")) {
This should be a negated test like all the rest, right?
Thanks,
Nish
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2006-09-27 20:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-27 19:59 [KJ] [RFC] request_region() error handling fixes Badari Pulavarty
2006-09-27 20:48 ` Nishanth Aravamudan [this message]
2006-09-27 21:04 ` Badari Pulavarty
2006-09-27 21:22 ` Nishanth Aravamudan
2006-09-27 22:31 ` Jesper Juhl
2006-09-27 22:45 ` Dan Carpenter
2006-09-27 22:58 ` Jesper Juhl
2006-09-27 23:15 ` Badari Pulavarty
2006-09-28 4:34 ` Amol Lad
2006-09-28 15:04 ` Badari Pulavarty
2006-09-28 16:42 ` Domen Puncer
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=20060927204805.GJ7457@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.