netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: kumba@gentoo.org
Cc: netdev@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] net: meth: Some code cleanups for meth
Date: Sat, 17 Dec 2011 22:00:32 -0500 (EST)	[thread overview]
Message-ID: <20111217.220032.683061606470374131.davem@davemloft.net> (raw)
In-Reply-To: <4EED418E.40501@gentoo.org>

From: Joshua Kinard <kumba@gentoo.org>
Date: Sat, 17 Dec 2011 20:27:42 -0500

> -#define WAIT_FOR_PHY(___rval)					\
> -	while ((___rval = mace->eth.phy_data) & MDIO_BUSY) {	\
> -		udelay(25);					\
> +#define WAIT_FOR_PHY(___rval)                               \
> +	while ((___rval = mace->eth.phy_data) & MDIO_BUSY) {    \
> +		udelay(25);                                         \

I think using tabs at the end of the line to line up the "\" is much
better than what you're changing it to, that being spaces.

> -		priv->phy_addr=i;
> -		p2=mdio_read(priv,2);
> -		p3=mdio_read(priv,3);
> +
> +	for (i = 0; i < 32; i++){
> +		priv->phy_addr = i;
> +		p2 = mdio_read(priv,2);
> +		p3 = mdio_read(priv,3);

If you're going to put forth the effort to put spaces around the
"=" characters, fix up the arguments to mdio_read() as well, there
needs to be a space after the "," and right before the second
argument.

> +		if ((p2 != 0xffff) && (p2 != 0x0000)) {

There is no need for the new parenthesis you are adding here.  It
doesn't change things semantically, and it does not improve
readability, it just makes for more characters a human has to parse in
his mind.

> - * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet
> - * Copyright (C) 2001 O'Reilly & Associates
> + * Copyright (C) 2001-2003 Ilya Volynets
> + * Copyright (C) 2011 Joshua Kinard
>   *
> - * The source code in this file can be freely used, adapted,
> - * and redistributed in source or binary form, so long as an
> - * acknowledgment appears in derived source files.  The citation
> - * should list that the code comes from the book "Linux Device
> - * Drivers" by Alessandro Rubini and Jonathan Corbet, published
> - * by O'Reilly & Associates.   No warranty is attached;
> - * we cannot take responsibility for errors or fitness for use.
> + *	This program is free software; you can redistribute it and/or
> + *	modify it under the terms of the GNU General Public License
> + *	as published by the Free Software Foundation; either version
> + *	2 of the License, or (at your option) any later version.
>   */

I'm not sure at all that you have the ability to make this kind of
change to the copyright and attributions here.

There are probably a lot more problems with this patch, but I'm
exhausted look at this stuff as-is.

  reply	other threads:[~2011-12-18  3:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-18  1:27 [PATCH] net: meth: Some code cleanups for meth Joshua Kinard
2011-12-18  3:00 ` David Miller [this message]
2011-12-18  4:42   ` Joshua Kinard

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=20111217.220032.683061606470374131.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=kumba@gentoo.org \
    --cc=linux-mips@linux-mips.org \
    --cc=netdev@vger.kernel.org \
    /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).