Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround

Robert Jarzmik
2016-10-10T06:39:13Z

Andy Shevchenko <andy.shevchenko@gmail.com> 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.

Cheers.

--
Robert