Re: [PATCH] introduce is_valid_gpio() predicate and use it in gpiolib.c
From: David Brownell
Date: Sun Feb 10 2008 - 14:18:25 EST
I like this, but can't resist making the "Andrew Comment":
> --- a/include/asm-generic/gpio.h
> +++ b/include/asm-generic/gpio.h
> @@ -16,6 +16,8 @@
> #define ARCH_NR_GPIOS 256
> #endif
>
> +#define is_valid_gpio(gpio) ((unsigned int)(gpio) < ARCH_NR_GPIOS)
Please make this an inline C function. :)
> +
> struct seq_file;
>
> /**
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/