From: Artem Bityutskiy <dedekind1@gmail.com>
To: Xi Wang <xi.wang@gmail.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>,
linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] pmc551: fix signedness bug in init_pmc551()
Date: Mon, 09 Jan 2012 23:05:59 +0200 [thread overview]
Message-ID: <1326143161.4463.2.camel@koala> (raw)
In-Reply-To: <1325019256-5171-1-git-send-email-xi.wang@gmail.com>
On Tue, 2011-12-27 at 15:54 -0500, Xi Wang wrote:
> Since "length" is a u32, the error handling below didn't work when
> fixup_pmc551() returns -ENODEV.
>
> if ((length = fixup_pmc551(PCI_Device)) <= 0)
>
> This patch changes fixup_pmc551() by separating the error handling
> and the size.
>
> Signed-off-by: Xi Wang <xi.wang@gmail.com>
> ---
> drivers/mtd/devices/pmc551.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
You can just change the type to int without introducing a separate
argument. I think the length cannot be too large anyway. E.g., because
it is compared to "asize" which is int.
Artem.
next prev parent reply other threads:[~2012-01-09 21:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-27 20:54 [PATCH] pmc551: fix signedness bug in init_pmc551() Xi Wang
2012-01-09 21:05 ` Artem Bityutskiy [this message]
2012-01-09 21:36 ` Xi Wang
2012-01-09 21:58 ` Xi Wang
2012-01-14 14:29 ` Artem Bityutskiy
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=1326143161.4463.2.camel@koala \
--to=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=lucas.demarchi@profusion.mobi \
--cc=xi.wang@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 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.