On Thursday 21 December 2006 7:03 am, pHilipp Zabel wrote:
> On 12/21/06, Nicolas Pitre <[EMAIL PROTECTED]> wrote:

> +static inline void __gpio_set_value(unsigned gpio, int value)
> +{
> +     if (value)
> +             GPSR(gpio) = GPIO_bit(gpio);
> +     else
> +             GPCR(gpio) = GPIO_bit(gpio);
> +}
> +
> +#define gpio_set_value(gpio,value)           \
> +     (__builtin_constant_p(gpio) ?           \

Should that be testing for _both_ gpio and value being constant?
I tend to think it should (assuming nonconstant 'variable' means
this costs more than a function call) ...

> +      __gpio_set_value(gpio, value) :        \
> +      pxa_gpio_set_value(gpio, value))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to