Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751212AbWIUE0y (ORCPT ); Thu, 21 Sep 2006 00:26:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751211AbWIUE0y (ORCPT ); Thu, 21 Sep 2006 00:26:54 -0400 Received: from srv5.dvmed.net ([207.36.208.214]:45706 "EHLO mail.dvmed.net") by vger.kernel.org with ESMTP id S1750787AbWIUE0x (ORCPT ); Thu, 21 Sep 2006 00:26:53 -0400 Message-ID: <45121486.3070503@pobox.com> Date: Thu, 21 Sep 2006 00:26:46 -0400 From: Jeff Garzik User-Agent: Thunderbird 1.5.0.7 (X11/20060913) MIME-Version: 1.0 To: Zang Roy-r61911 CC: Roland Dreier , Andrew Morton , netdev , linux-kernel Subject: Re: [patch 3/3] Add tsi108 On Chip Ethernet device driver support References: <1157962200.10526.10.camel@localhost.localdomain> <1158051351.14448.97.camel@localhost.localdomain> <4506C789.4050404@pobox.com> <1158749825.7973.9.camel@localhost.localdomain> In-Reply-To: <1158749825.7973.9.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.1.3 on srv5.dvmed.net summary: Content analysis details: (-4.2 points, 5.0 required) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 996 Lines: 31 Zang Roy-r61911 wrote: > +#define TSI108_ETH_WRITE_REG(offset, val) \ > + writel(le32_to_cpu(val),data->regs + (offset)) > + > +#define TSI108_ETH_READ_REG(offset) \ > + le32_to_cpu(readl(data->regs + (offset))) > + > +#define TSI108_ETH_WRITE_PHYREG(offset, val) \ > + writel(le32_to_cpu(val), data->phyregs + (offset)) > + > +#define TSI108_ETH_READ_PHYREG(offset) \ > + le32_to_cpu(readl(data->phyregs + (offset))) NAK: 1) writel() and readl() are defined to be little endian. If your platform is different, then your platform should have its own foobus_writel() and foobus_readl(). 2) TSI108_ETH_WRITE_REG() is just way too long. TSI_READ(), TSI_WRITE(), TSI_READ_PHY() and TSI_WRITE_PHY() would be far more readable. More in next email. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/