From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754266AbcJOVMG (ORCPT ); Sat, 15 Oct 2016 17:12:06 -0400 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:43214 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753478AbcJOVMC (ORCPT ); Sat, 15 Oct 2016 17:12:02 -0400 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Sat, 15 Oct 2016 23:11:59 +0200 X-ME-IP: 109.220.223.51 From: Robert Jarzmik To: "David S. Miller" Cc: Rob Herring , Mark Rutland , Nicolas Pitre , Russell King - ARM Linux , Arnd Bergmann , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround References: <1476559670-25056-1-git-send-email-robert.jarzmik@free.fr> <1476559670-25056-2-git-send-email-robert.jarzmik@free.fr> X-URL: http://belgarath.falguerolles.org/ Date: Sat, 15 Oct 2016 23:11:56 +0200 In-Reply-To: <1476559670-25056-2-git-send-email-robert.jarzmik@free.fr> (Robert Jarzmik's message of "Sat, 15 Oct 2016 21:27:48 +0200") Message-ID: <87shrx5nc3.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry David, I just noticed you weren't in the "To:" of this serie, but I won't forget you for the v3 I need to release anyway (https://lkml.org/lkml/2016/10/15/104). Robert Jarzmik writes: > + lp->half_word_align4 = > + machine_is_mainstone() || machine_is_stargate2() || > + machine_is_pxa_idp(); Bah this one is not good enough. First, machine_is_*() is not defined if CONFIG_ARM=n, and this part is not under a #ifdef CONFIG_ARM. Moreover, I think it is a good occasion to go further, and : - enhance smc91x_platdata and add a pxa_u16_align4 boolean - transform this statement into : lp->half_word_align4 = lp->cfg.pxa_u16_align4 This will remove the machine_*() calls from the smc91x driver, which looks a good move, doesn't it ? Cheers. -- Robert