[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190822.115243.1891232287056279825.davem@davemloft.net>
Date: Thu, 22 Aug 2019 11:52:43 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: hayeswang@...ltek.com
Cc: netdev@...r.kernel.org, nic_swsd@...ltek.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] r8152: saving the settings of EEE
From: Hayes Wang <hayeswang@...ltek.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.
Powered by blists - more mailing lists