net: fec: Refactor: rename `adapter` to `fep`
Subsystems (3)
PATCH 1/1 net: fec: Refactor: rename `adapter` to `fep`
Commit 01b825f reverted a style fix, which renamed struct fec_enet_private *adapter to fep to match the rest of the driver. This commit factors out that style fix.
--- drivers/net/ethernet/freescale/fec_ptp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/ethernet/freescale/fec_ptp.c +8 -8
@@ -443,21 +443,21 @@ static int fec_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)*/ static int fec_ptp_gettime (struct ptp_clock_info *ptp,struct timespec64 *ts) { -struct fec_enet_private *adapter = +struct fec_enet_private *fep = container_of(ptp, struct fec_enet_private, ptp_caps);u64 ns;unsigned long flags; -mutex_lock (&adapter->ptp_clk_mutex); +mutex_lock (&fep->ptp_clk_mutex);/* Check the ptp clock */ -if (!adapter->ptp_clk_on) { -mutex_unlock (&adapter->ptp_clk_mutex); +if (!fep->ptp_clk_on) { +mutex_unlock (&fep->ptp_clk_mutex);return -EINVAL ; } -spin_lock_irqsave (&adapter->tmreg_lock, flags); - ns =timecounter_read (&adapter->tc); -spin_unlock_irqrestore (&adapter->tmreg_lock, flags); -mutex_unlock (&adapter->ptp_clk_mutex); +spin_lock_irqsave (&fep->tmreg_lock, flags); + ns =timecounter_read (&fep->tc); +spin_unlock_irqrestore (&fep->tmreg_lock, flags); +mutex_unlock (&fep->ptp_clk_mutex); *ts =ns_to_timespec64 (ns);
Signature · 1 line
2.25.1
Jakub Kicinski
maintainerQuoted 4 lines · On Thu, 22 Dec 2022 10:49:52 +0100 Csókás Bence wrote:
Commit 01b825f reverted a style fix, which renamed
struct fec_enet_private *adaptertofepto match the rest of the driver. This commit factors out that style fix.
# Form letter - net-next is closed
We have already submitted the networking pull request to Linus for v6.2 and therefore net-next is closed for new drivers, features, code refactoring and optimizations. We are currently accepting bug fixes only.
Please repost when net-next reopens after Jan 2nd.
RFC patches sent for review only are obviously welcome at any time.
PATCH 1/1 net: fec: Refactor: rename `adapter` to `fep`
In reply to Csókás BenceCommit 01b825f reverted a style fix, which renamed struct fec_enet_private *adapter to fep to match the rest of the driver. This commit factors out that style fix.
---
drivers/net/ethernet/freescale/fec_ptp.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/ethernet/freescale/fec_ptp.c +0 -0
@@ -443,21 +443,21 @@ static int fec_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
*/
static int fec_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) {
- struct fec_enet_private *adapter =
+ struct fec_enet_private *fep =
container_of(ptp, struct fec_enet_private, ptp_caps); u64 ns;
unsigned long flags;
- mutex_lock(&adapter->ptp_clk_mutex);
+ mutex_lock(&fep->ptp_clk_mutex);
/* Check the ptp clock */
- if (!adapter->ptp_clk_on) {
- mutex_unlock(&adapter->ptp_clk_mutex);
+ if (!fep->ptp_clk_on) {
+ mutex_unlock(&fep->ptp_clk_mutex);
return -EINVAL;
}
- spin_lock_irqsave(&adapter->tmreg_lock, flags);
- ns = timecounter_read(&adapter->tc);
- spin_unlock_irqrestore(&adapter->tmreg_lock, flags);
- mutex_unlock(&adapter->ptp_clk_mutex);
+ spin_lock_irqsave(&fep->tmreg_lock, flags);
+ ns = timecounter_read(&fep->tc);
+ spin_unlock_irqrestore(&fep->tmreg_lock, flags);
+ mutex_unlock(&fep->ptp_clk_mutex);
*ts = ns_to_timespec64(ns);
Signature · 1 line
2.25.1
Paolo Abeni
maintainerHello,
Quoted 6 lines · Csókás Bence
Commit 01b825f reverted a style fix, which renamed
struct fec_enet_private *adaptertofepto match the rest of the driver. This commit factors out that style fix.Signed-off-by Csókás Bence <[email protected]>
The patch does not apply cleanly to net-next (nor net, FWIS).
When referencing an existing commit you should use the:
<12 char hash> ("<commit tile>")
format.
More importantly, this kind of refactors are useful if you are going to touch the relevant code with fixes or new feature in the same series, otherwise they mainly produces later backport conflicts.
I'm not going to accept this kind of change, sorry.
Paolo