From: Jesper Nilsson <Jesper.Nilsson@axis.com>
To: roel.kluin@gmail.com, Mikael Starvik <mikael.starvik@axis.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: FW: [PATCH] cris: remove redundant tests on unsigned
Date: Tue, 23 Jun 2009 10:00:33 +0200 [thread overview]
Message-ID: <20090623080033.GX12383@axis.com> (raw)
In-Reply-To: <4BEA3FF3CAA35E408EA55C7BE2E61D053B0952BE56@xmail3.se.axis.com>
Hi,
Looks good, I'll pull it into my CRIS tree.
Thanks!
/Jesper
On Mon, Jun 22, 2009 at 03:11:05PM +0200, Mikael Starvik wrote:
> -----Original Message-----
> From: Roel Kluin [mailto:roel.kluin@gmail.com]
> Sent: den 22 juni 2009 17:07
> To: Mikael Starvik
> Cc: dev-etrax; Andrew Morton
> Subject: [PATCH] cris: remove redundant tests on unsigned
>
> Since dmanr is unsigned, negatives are wrapped and caught by the other test.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/arch/cris/arch-v10/kernel/dma.c b/arch/cris/arch-v10/kernel/dma.c
> index 929e686..d31504b 100644
> --- a/arch/cris/arch-v10/kernel/dma.c
> +++ b/arch/cris/arch-v10/kernel/dma.c
> @@ -24,7 +24,7 @@ int cris_request_dma(unsigned int dmanr, const char * device_id,
> unsigned long int gens;
> int fail = -EINVAL;
>
> - if ((dmanr < 0) || (dmanr >= MAX_DMA_CHANNELS)) {
> + if (dmanr >= MAX_DMA_CHANNELS) {
> printk(KERN_CRIT "cris_request_dma: invalid DMA channel %u\n", dmanr);
> return -EINVAL;
> }
> @@ -213,7 +213,7 @@ int cris_request_dma(unsigned int dmanr, const char * device_id,
> void cris_free_dma(unsigned int dmanr, const char * device_id)
> {
> unsigned long flags;
> - if ((dmanr < 0) || (dmanr >= MAX_DMA_CHANNELS)) {
> + if (dmanr >= MAX_DMA_CHANNELS) {
> printk(KERN_CRIT "cris_free_dma: invalid DMA channel %u\n", dmanr);
> return;
> }
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
parent reply other threads:[~2009-06-23 8:00 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <4BEA3FF3CAA35E408EA55C7BE2E61D053B0952BE56@xmail3.se.axis.com>]
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=20090623080033.GX12383@axis.com \
--to=jesper.nilsson@axis.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikael.starvik@axis.com \
--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