From: David Woodhouse <dwmw2@infradead.org>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: linux-mtd@lists.infradead.org,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mtd: misplaced parenthesis in find_boot_record()
Date: Fri, 26 Feb 2010 13:08:40 +0000 [thread overview]
Message-ID: <1267189720.30247.10867.camel@macbook.infradead.org> (raw)
In-Reply-To: <4B79C344.60908@gmail.com>
On Mon, 2010-02-15 at 22:57 +0100, Roel Kluin wrote:
> The parenthesis was misplaced, upon error a one was shown.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c
> index 32e82ae..a269c62 100644
> --- a/drivers/mtd/inftlmount.c
> +++ b/drivers/mtd/inftlmount.c
> @@ -102,7 +102,7 @@ static int find_boot_record(struct INFTLrecord *inftl)
> /* To be safer with BIOS, also use erase mark as discriminant */
> if ((ret = inftl_read_oob(mtd, block * inftl->EraseSize +
> SECTORSIZE + 8, 8, &retlen,
> - (char *)&h1) < 0)) {
> + (char *)&h1)) < 0) {
Ick.
This code is broken because it's fugly. You can see the causality just
by looking at it.
Why on earth would you fix the bug but not fix the fugliness which
caused it?
ret = inftl_read_oob(...);
if (ret < 0) {
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
prev parent reply other threads:[~2010-02-26 13:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-15 21:57 Roel Kluin
2010-02-15 22:01 ` Roel Kluin
2010-02-16 9:09 ` Artem Bityutskiy
2010-02-26 13:08 ` David Woodhouse [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=1267189720.30247.10867.camel@macbook.infradead.org \
--to=dwmw2@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=roel.kluin@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
all inboxes | Powered by JetHome®