[OpenWrt-Devel] [PATCH 4/6] dma: pl08x: Add support for Faraday Technology FTDMAC020

Linus Walleij linus.walleij at linaro.org
Sat May 20 13:56:34 EDT 2017

On Sun, May 14, 2017 at 2:34 PM, Vinod Koul <vinod.koul at intel.com> wrote:
> On Sat, Apr 08, 2017 at 02:04:55PM +0200, Linus Walleij wrote:
>> +#define FTDMAC020_CH_CSR_FIFOTH_MSK          (0x7 << 24)
> IIUC we can have a GENMASK(27, 25), won't that be a bit better here and
> other places?

I will send an additional patch at the end of the series switching *all*
of these to use GENMASK() so we keep it to one technical step
per patch, OK?

>> +#define FTDMAC020_CH_CSR_FIFOTH_SHIFT                (24)
> and you may use ffs(FTDMAC020_CH_CSR_FIFOTH_MSK) or keep a shift define

I'm more convenient with the shift at least here.

ffs(DEFINE) makes me thin ffs() is a function invoked all the
time even if I know very well the compiler will mangle it into
a constant... just confusing for my perception.

Linus Walleij
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list