Messages in this thread | | | From | David Brownell <> | Subject | Re: [patch 2.6.20-rc1 4/6] PXA GPIO wrappers | Date | Thu, 21 Dec 2006 11:25:47 -0800 |
| |
On Thursday 21 December 2006 7:03 am, pHilipp Zabel wrote: > On 12/21/06, Nicolas Pitre <nico@cam.org> 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |