* [PATCH resubmit] net: fec: Refactor: rename `adapter` to `fep`
@ 2023-06-05 9:44 Csókás Bence
2023-06-05 9:51 ` Marc Kleine-Budde
2023-06-05 18:27 ` Maciej Fijalkowski
0 siblings, 2 replies; 8+ messages in thread
From: Csókás Bence @ 2023-06-05 9:44 UTC (permalink / raw)
To: netdev
Cc: Richard Cochran, David S. Miller, Jakub Kicinski, qiangqing.zhang,
Andrew Lunn, kernel, Csókás Bence
Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
---
drivers/net/ethernet/freescale/fec_ptp.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index ab86bb8562ef..afc658d2c271 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -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);
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH resubmit] net: fec: Refactor: rename `adapter` to `fep`
2023-06-05 9:44 [PATCH resubmit] net: fec: Refactor: rename `adapter` to `fep` Csókás Bence
@ 2023-06-05 9:51 ` Marc Kleine-Budde
2023-06-05 12:35 ` Csókás Bence
2023-06-05 18:27 ` Maciej Fijalkowski
1 sibling, 1 reply; 8+ messages in thread
From: Marc Kleine-Budde @ 2023-06-05 9:51 UTC (permalink / raw)
To: Csókás Bence
Cc: netdev, Andrew Lunn, Richard Cochran, qiangqing.zhang, kernel,
Jakub Kicinski, David S. Miller
[-- Attachment #1: Type: text/plain, Size: 440 bytes --]
On 05.06.2023 11:44:03, Csókás Bence wrote:
> Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
You probably want to add a patch description.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH resubmit] net: fec: Refactor: rename `adapter` to `fep`
2023-06-05 9:51 ` Marc Kleine-Budde
@ 2023-06-05 12:35 ` Csókás Bence
2023-06-05 12:43 ` Marc Kleine-Budde
2023-06-05 12:51 ` Ahmad Fatoum
0 siblings, 2 replies; 8+ messages in thread
From: Csókás Bence @ 2023-06-05 12:35 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: netdev, Andrew Lunn, Richard Cochran, kernel, Jakub Kicinski,
David S. Miller
On 2023. 06. 05. 11:51, Marc Kleine-Budde wrote:
> On 05.06.2023 11:44:03, Csókás Bence wrote:
>> Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
>
> You probably want to add a patch description.
Is it necessary for such a trivial refactor commit? I thought the commit
msg already said it all. What else do you think I should include still?
Would something like this be sufficient?
"Rename local `struct fec_enet_private *adapter` to `fep` in
`fec_ptp_gettime()` to match the rest of the driver"
>
> regards,
> Marc
>
Thanks,
Bence
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH resubmit] net: fec: Refactor: rename `adapter` to `fep`
2023-06-05 12:35 ` Csókás Bence
@ 2023-06-05 12:43 ` Marc Kleine-Budde
2023-06-05 12:51 ` Ahmad Fatoum
1 sibling, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2023-06-05 12:43 UTC (permalink / raw)
To: Csókás Bence
Cc: netdev, Andrew Lunn, Richard Cochran, kernel, Jakub Kicinski,
David S. Miller
[-- Attachment #1: Type: text/plain, Size: 940 bytes --]
On 05.06.2023 14:35:33, Csókás Bence wrote:
> On 2023. 06. 05. 11:51, Marc Kleine-Budde wrote:
> > On 05.06.2023 11:44:03, Csókás Bence wrote:
> > > Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
> >
> > You probably want to add a patch description.
>
> Is it necessary for such a trivial refactor commit?
This is considered good practice.
> I thought the commit msg
> already said it all. What else do you think I should include still?
>
> Would something like this be sufficient?
> "Rename local `struct fec_enet_private *adapter` to `fep` in
> `fec_ptp_gettime()` to match the rest of the driver"
Looks good to me.
Thanks,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH resubmit] net: fec: Refactor: rename `adapter` to `fep`
2023-06-05 12:35 ` Csókás Bence
2023-06-05 12:43 ` Marc Kleine-Budde
@ 2023-06-05 12:51 ` Ahmad Fatoum
1 sibling, 0 replies; 8+ messages in thread
From: Ahmad Fatoum @ 2023-06-05 12:51 UTC (permalink / raw)
To: Csókás Bence, Marc Kleine-Budde
Cc: Andrew Lunn, netdev, Richard Cochran, kernel, Jakub Kicinski,
David S. Miller
On 05.06.23 14:35, Csókás Bence wrote:
> On 2023. 06. 05. 11:51, Marc Kleine-Budde wrote:
>> On 05.06.2023 11:44:03, Csókás Bence wrote:
>>> Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
>>
>> You probably want to add a patch description.
>
> Is it necessary for such a trivial refactor commit? I thought the commit msg already said it all. What else do you think I should include still?
>
>
> Would something like this be sufficient?
> "Rename local `struct fec_enet_private *adapter` to `fep` in `fec_ptp_gettime()` to match the rest of the driver"
The "to match the rest of the driver" is the interesting part.
I see what the commit is doing, but the title alone doesn't tell
me why you'd want to change it.
Cheers,
Ahmad
>
>>
>> regards,
>> Marc
>>
>
> Thanks,
> Bence
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH resubmit] net: fec: Refactor: rename `adapter` to `fep`
2023-06-05 9:44 [PATCH resubmit] net: fec: Refactor: rename `adapter` to `fep` Csókás Bence
2023-06-05 9:51 ` Marc Kleine-Budde
@ 2023-06-05 18:27 ` Maciej Fijalkowski
1 sibling, 0 replies; 8+ messages in thread
From: Maciej Fijalkowski @ 2023-06-05 18:27 UTC (permalink / raw)
To: Csókás Bence
Cc: netdev, Richard Cochran, David S. Miller, Jakub Kicinski,
qiangqing.zhang, Andrew Lunn, kernel
On Mon, Jun 05, 2023 at 11:44:03AM +0200, Csókás Bence wrote:
please provide a motivation behind this rename in the commit message.
> Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
> ---
> drivers/net/ethernet/freescale/fec_ptp.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
> index ab86bb8562ef..afc658d2c271 100644
> --- a/drivers/net/ethernet/freescale/fec_ptp.c
> +++ b/drivers/net/ethernet/freescale/fec_ptp.c
> @@ -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);
>
> --
> 2.25.1
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH resubmit] net: fec: Refactor: rename `adapter` to `fep`
@ 2023-07-04 11:40 Csókás Bence
2023-07-04 19:38 ` Simon Horman
0 siblings, 1 reply; 8+ messages in thread
From: Csókás Bence @ 2023-07-04 11:40 UTC (permalink / raw)
To: netdev
Cc: Richard Cochran, David S. Miller, Jakub Kicinski, Ahmad Fatoum,
Maciej Fijalkowski, Andrew Lunn, kernel, Csókás Bence
Rename local `struct fec_enet_private *adapter` to `fep` in `fec_ptp_gettime()` to match the rest of the driver
Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
---
drivers/net/ethernet/freescale/fec_ptp.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index ab86bb8562ef..afc658d2c271 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -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);
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH resubmit] net: fec: Refactor: rename `adapter` to `fep`
2023-07-04 11:40 Csókás Bence
@ 2023-07-04 19:38 ` Simon Horman
0 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2023-07-04 19:38 UTC (permalink / raw)
To: Csókás Bence
Cc: netdev, Richard Cochran, David S. Miller, Jakub Kicinski,
Ahmad Fatoum, Maciej Fijalkowski, Andrew Lunn, kernel
On Tue, Jul 04, 2023 at 01:40:59PM +0200, Csókás Bence wrote:
> Rename local `struct fec_enet_private *adapter` to `fep` in `fec_ptp_gettime()` to match the rest of the driver
>
> Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
Hi Csókás,
I'm assuming this is targeted at 'net-next', as opposed to 'net',
which is for fixes (I'm never sure with documentation). In any case,
the target tree should be included in the subject.
Subject: [PATCH net-next resubmit] ...
If it is for net-next, then please repost when net-next reopens after July 10th.
Link: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
--
pw-bot: deferred
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-07-04 19:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-05 9:44 [PATCH resubmit] net: fec: Refactor: rename `adapter` to `fep` Csókás Bence
2023-06-05 9:51 ` Marc Kleine-Budde
2023-06-05 12:35 ` Csókás Bence
2023-06-05 12:43 ` Marc Kleine-Budde
2023-06-05 12:51 ` Ahmad Fatoum
2023-06-05 18:27 ` Maciej Fijalkowski
-- strict thread matches above, loose matches on Subject: below --
2023-07-04 11:40 Csókás Bence
2023-07-04 19:38 ` Simon Horman
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).