On Sat, 12 Jan 2008 18:18:02 +0100, Matteo Croce <technoboy85@xxxxxxxxx> wrote: > +static inline void gpio_set_value(unsigned gpio, int value) > +{ > + static void __iomem *gpio_out; > + unsigned tmp; > + > + if (!gpio_out) > + gpio_out = (void __iomem *) > + KSEG1ADDR(AR7_REGS_GPIO + AR7_GPIO_OUTPUT); > + > + tmp = readl(gpio_out) & ~(1 << gpio); > + if (value) > + tmp |= 1 << gpio; > + writel(tmp, gpio_out); > +} It seems the compiler can calculate gpio_out value at compile time. So I think caching it just make the function slower. --- Atsushi Nemoto