From: "Figo.zhang" <figo1802@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@osdl.org>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vmalloc.c: fix double error checking
Date: Wed, 08 Jul 2009 08:40:06 +0800 [thread overview]
Message-ID: <1247013611.2597.22.camel@myhost> (raw)
In-Reply-To: <4A53E602.6030505@kernel.org>
On Wed, 2009-07-08 at 09:19 +0900, Tejun Heo wrote:
> Figo.zhang wrote:
> > it is no need for double error checking.
> >
> > Signed-off-by: Figo.zhang <figo1802@gmail.com>
> > - err = vmap_pud_range(pgd, addr, next, prot, pages, &nr);
> > - if (err)
> > - break;
> > + if (vmap_pud_range(pgd, addr, next, prot, pages, &nr))
> > + return -ENOMEM;
>
> Wouldn't it be better to keep the error return value?
see the vmap_pud_range(), if suceed return 0, if error return "-ENOMEM",
so it had better use clearly logic if error directly return "-EOMEM",
avoid double checking.
Best,
Figo.zhang
>
> Thanks.
>
> --
> tejun
next prev parent reply other threads:[~2009-07-08 0:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-07 16:13 [PATCH] vmalloc.c: fix double error checking Figo.zhang
2009-07-08 0:19 ` Tejun Heo
2009-07-08 0:40 ` Figo.zhang [this message]
2009-07-08 2:02 ` Tejun Heo
2009-07-08 2:11 ` [PATCH v2] " Figo.zhang
2009-07-08 2:16 ` Tejun Heo
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=1247013611.2597.22.camel@myhost \
--to=figo1802@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox