netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: stigge@antcom.de
Cc: alexander.h.duyck@intel.com, baruch@tkos.co.il,
	ian.campbell@citrix.com, arnd@arndb.de, netdev@vger.kernel.org,
	w.sang@pengutronix.de, kevin.wells@nxp.com, eilong@broadcom.com,
	jeffrey.t.kirsher@intel.com, joe@perches.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5] lpc32xx: Added ethernet driver
Date: Tue, 06 Mar 2012 16:20:17 -0500 (EST)	[thread overview]
Message-ID: <20120306.162017.761246743182346842.davem@davemloft.net> (raw)
In-Reply-To: <1331067664-9124-1-git-send-email-stigge@antcom.de>

From: Roland Stigge <stigge@antcom.de>
Date: Tue,  6 Mar 2012 22:01:04 +0100

> +#define RXSTATUS_STATUS_ERROR \
> +	(RXSTATUS_NODESC | RXSTATUS_OVERRUN | RXSTATUS_ALIGN | RXSTATUS_RANGE \
> +	 | RXSTATUS_LENGTH | RXSTATUS_SYMBOL | RXSTATUS_CRC)

Should be:

#define RXSTATUS_STATUS_ERROR \
	(RXSTATUS_NODESC | RXSTATUS_OVERRUN | RXSTATUS_ALIGN | RXSTATUS_RANGE | \
	 RXSTATUS_LENGTH | RXSTATUS_SYMBOL | RXSTATUS_CRC)

> +static int lpc_eth_hard_start_xmit(struct sk_buff *skb,
> +	struct net_device *ndev);

Should be:

static int lpc_eth_hard_start_xmit(struct sk_buff *skb,
				   struct net_device *ndev);

> +struct txrx_desc_t {
> +	u32 packet;
> +	u32 control;
> +};
> +struct rx_status_t {
> +	u32 statusinfo;
> +	u32 statushashcrc;
> +};

What is the endianness of these descriptors?  Based upon the answer to
that question use __be32 or __le32  instead of u32.

> +static void __lpc_eth_clock_enable(struct netdata_local *pldat,
> +	int enable)

Should be:

static void __lpc_eth_clock_enable(struct netdata_local *pldat,
				   int enable)

And you should also use "bool" for enable and pass in true/false
at the call sites.

> +	writel((LPC_MACINT_RXDONEINTEN | LPC_MACINT_TXDONEINTEN),
> +		LPC_ENET_INTENABLE(regbase));

Should be:

	writel((LPC_MACINT_RXDONEINTEN | LPC_MACINT_TXDONEINTEN),
	       LPC_ENET_INTENABLE(regbase));

> +	/* Setup base addresses in hardware to point to buffers and
> +	   descriptors */

Should be:

	/* Setup base addresses in hardware to point to buffers and
	 * descriptors.
	 */

> +	writel((ENET_TX_DESC - 1),
> +		LPC_ENET_TXDESCRIPTORNUMBER(pldat->net_base));

All of these writel() calls are improperly indented on the second and
any subsequent lines just like the one I pointed out above, fix them
all.

> +MODULE_LICENSE("GPL");
> +

Tailing empty line in this file, please remove.

  reply	other threads:[~2012-03-06 21:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06 21:01 [PATCH v5] lpc32xx: Added ethernet driver Roland Stigge
2012-03-06 21:20 ` David Miller [this message]
2012-03-06 21:34 ` Arnd Bergmann
2012-03-07 11:53   ` Roland Stigge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120306.162017.761246743182346842.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexander.h.duyck@intel.com \
    --cc=arnd@arndb.de \
    --cc=baruch@tkos.co.il \
    --cc=eilong@broadcom.com \
    --cc=ian.campbell@citrix.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=joe@perches.com \
    --cc=kevin.wells@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stigge@antcom.de \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).