Hi Axel,

On Fri, Mar 21, 2014 at 6:24 AM, Axel Lin <[email protected]> wrote:
> -       val = __raw_readl(hw->regs + USI_CNT);
> +       val = __raw_readl(hw->regs + USI_CNT) & ~TXNUM;
>
> -       if (!txnum)
> -               val &= ~TXNUM;
> -       else
> +       if (txnum)
>                 val |= txnum << 0x08;

I think it's easier to read if you keep the masking and setting together,
and remove the conditional, e.g.

        val = __raw_readl(hw->regs + USI_CNT);
        val = (val & ~TXNUM) | (txnum << 0x08);
        __raw_writel(val, hw->regs + USI_CNT);

Just my personal thoughts, too.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to