From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Jarzmik Subject: Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround Date: Mon, 10 Oct 2016 08:30:34 +0200 Message-ID: <87zimc7m2d.fsf@belgarion.home> References: <1476045227-2970-1-git-send-email-robert.jarzmik@free.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: (Andy Shevchenko's message of "Mon, 10 Oct 2016 00:55:17 +0300") Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andy Shevchenko Cc: Rob Herring , Mark Rutland , Nicolas Pitre , Russell King - ARM Linux , Arnd Bergmann , netdev , devicetree , "linux-kernel@vger.kernel.org" List-Id: devicetree@vger.kernel.org Andy Shevchenko 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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html