Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround
From: Robert Jarzmik
Date: Mon Oct 10 2016 - 02:39:16 EST
Andy Shevchenko <andy.shevchenko@xxxxxxxxx> writes:
>> +#define SMC_outw(lp, v, a, r) \
>> + _SMC_outw_align4((v), (a), (r), \
>> + IS_BUILTIN(CONFIG_ARCH_PXA) && ((r) & 2) && \
>> + lp->half_word_align4)
> Hmm... Isn't enough to have just (r) & 2 && lp->half_word_align4 ?
It wouldn't be equivalent to what we had before.
The point of the previous code was to compile out as much as possible of this
test. Therefore, at compilation time for omap1 boards, the compiler would
evaluate the test to 0, and never leave the workaround code compiled.
So it would be enough, but worse performance wise and not equivalent for non-pxa
boards, hence this test.