mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: hayeswang@realtek.com
Cc: netdev@vger.kernel.org, nic_swsd@realtek.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] r8152: saving the settings of EEE
Date: Thu, 22 Aug 2019 11:52:43 -0700 (PDT)	[thread overview]
Message-ID: <20190822.115243.1891232287056279825.davem@davemloft.net> (raw)
In-Reply-To: <1394712342-15778-304-Taiwan-albertk@realtek.com>

From: Hayes Wang <hayeswang@realtek.com>
Date: Thu, 22 Aug 2019 16:07:18 +0800

> +	if (tp->eee_en) {
> +		r8152_eee_en(tp, true);
> +		r8152_mmd_write(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, tp->eee_adv);
> +	} else {
> +		r8152_eee_en(tp, false);
> +		r8152_mmd_write(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, 0);
> +	}

I see this same exact code sequence at least 4 times in your patch, please
make a helper function.

  reply	other threads:[~2019-08-22 18:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22  8:07 Hayes Wang
2019-08-22 18:52 ` David Miller [this message]
2019-08-23  7:04 ` [PATCH net-next v2 0/2] Save EEE Hayes Wang
2019-08-23  7:04   ` [PATCH net-next v2 1/2] r8152: saving the settings of EEE Hayes Wang
2019-08-23  7:04   ` [PATCH net-next v2 2/2] r8152: add a helper function about setting EEE Hayes Wang
2019-08-23  7:18 ` [PATCH net-next v3 0/2] r8152: save EEE Hayes Wang
2019-08-23  7:19   ` [PATCH net-next v3 1/2] r8152: saving the settings of EEE Hayes Wang
2019-08-23  7:19   ` [PATCH net-next v3 2/2] r8152: add a helper function about setting EEE Hayes Wang
2019-08-23  7:33 ` [PATCH net-next v4 0/2] r8152: save EEE Hayes Wang
2019-08-23  7:33   ` [PATCH net-next v4 1/2] r8152: saving the settings of EEE Hayes Wang
2019-08-23  7:33   ` [PATCH net-next v4 2/2] r8152: add a helper function about setting EEE Hayes Wang
2019-08-23 14:37   ` [PATCH net-next v4 0/2] r8152: save EEE Andrew Lunn
2019-08-26  2:25     ` Hayes Wang
2019-08-23 21:31   ` David Miller

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=20190822.115243.1891232287056279825.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=hayeswang@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    /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

all inboxes | Powered by JetHome®