public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: FW: [PATCH] cris: remove redundant tests on unsigned
       [not found] <4BEA3FF3CAA35E408EA55C7BE2E61D053B0952BE56@xmail3.se.axis.com>
@ 2009-06-23  8:00 ` Jesper Nilsson
  0 siblings, 0 replies; only message in thread
From: Jesper Nilsson @ 2009-06-23  8:00 UTC (permalink / raw)
  To: roel.kluin, Mikael Starvik, Andrew Morton; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-23  8:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4BEA3FF3CAA35E408EA55C7BE2E61D053B0952BE56@xmail3.se.axis.com>
2009-06-23  8:00 ` FW: [PATCH] cris: remove redundant tests on unsigned Jesper Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox