public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Mao Wenan <maowenan@huawei.com>
Cc: kernel-janitors@vger.kernel.org, netdev@vger.kernel.org,
	john.fastabend@gmail.com, hawk@kernel.org,
	jakub.kicinski@netronome.com, daniel@iogearbox.net,
	ast@kernel.org, Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH v3] net: ns83820: code cleanup for ns83820_probe_phy()
Date: Tue, 19 Feb 2019 10:04:15 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1902191004030.8574@hadrien> (raw)
In-Reply-To: <20190219090635.134457-1-maowenan@huawei.com>



On Tue, 19 Feb 2019, Mao Wenan wrote:

> This patch is to do code cleanup for ns83820_probe_phy().
> It deletes unused variable 'first' and commented out code.
>
> Signed-off-by: Mao Wenan <maowenan@huawei.com>

Acked-by: Julia Lawall <julia.lawall@lip6.fr>


> ---
>  v2->v3: delte unused variable 'first'; change subject from
>  "net: ns83820: drop pointless static qualifier in ns83820_probe_phy()" to
>  "net: ns83820: code cleanup for ns83820_probe_phy()".
>  drivers/net/ethernet/natsemi/ns83820.c | 18 ------------------
>  1 file changed, 18 deletions(-)
>
> diff --git a/drivers/net/ethernet/natsemi/ns83820.c b/drivers/net/ethernet/natsemi/ns83820.c
> index 958fced4dacf..955d34a6f0d8 100644
> --- a/drivers/net/ethernet/natsemi/ns83820.c
> +++ b/drivers/net/ethernet/natsemi/ns83820.c
> @@ -1869,34 +1869,16 @@ static unsigned ns83820_mii_write_reg(struct ns83820 *dev, unsigned phy, unsigne
>  static void ns83820_probe_phy(struct net_device *ndev)
>  {
>  	struct ns83820 *dev = PRIV(ndev);
> -	static int first;
>  	int i;
>  #define MII_PHYIDR1	0x02
>  #define MII_PHYIDR2	0x03
>
> -#if 0
> -	if (!first) {
> -		unsigned tmp;
> -		ns83820_mii_read_reg(dev, 1, 0x09);
> -		ns83820_mii_write_reg(dev, 1, 0x10, 0x0d3e);
> -
> -		tmp = ns83820_mii_read_reg(dev, 1, 0x00);
> -		ns83820_mii_write_reg(dev, 1, 0x00, tmp | 0x8000);
> -		udelay(1300);
> -		ns83820_mii_read_reg(dev, 1, 0x09);
> -	}
> -#endif
> -	first = 1;
> -
>  	for (i=1; i<2; i++) {
>  		int j;
>  		unsigned a, b;
>  		a = ns83820_mii_read_reg(dev, i, MII_PHYIDR1);
>  		b = ns83820_mii_read_reg(dev, i, MII_PHYIDR2);
>
> -		//printk("%s: phy %d: 0x%04x 0x%04x\n",
> -		//	ndev->name, i, a, b);
> -
>  		for (j=0; j<0x16; j+=4) {
>  			dprintk("%s: [0x%02x] %04x %04x %04x %04x\n",
>  				ndev->name, j,
> --
> 2.20.1
>
>

  reply	other threads:[~2019-02-19  9:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19  9:06 [PATCH v3] net: ns83820: code cleanup for ns83820_probe_phy() Mao Wenan
2019-02-19  9:04 ` Julia Lawall [this message]
2019-02-19 12:40 ` walter harms
2019-02-19 21:25 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2019-02-19 12:42 Walter Harms
2019-02-19 12:52 ` maowenan
2019-02-19 14:23 ` Dan Carpenter
2019-02-19 17:46 ` Andrew Lunn

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=alpine.DEB.2.21.1902191004030.8574@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=hawk@kernel.org \
    --cc=jakub.kicinski@netronome.com \
    --cc=john.fastabend@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=maowenan@huawei.com \
    --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