linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ptp: fix PTP PPS source's lookup cookie set
@ 2021-07-08  5:08 Dario Binacchi
  2021-07-08  7:14 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Dario Binacchi @ 2021-07-08  5:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dario Binacchi, David S. Miller, Jonathan Lemon, Richard Cochran, netdev

The setting took place before the PTP PPS source was registered, so
ptp->pps_source was NULL.

Fixes: 8602e40fc813 ("ptp: Set lookup cookie when creating a PTP PPS source.")
Signed-off-by: Dario Binacchi <dariobin@libero.it>
---

 drivers/ptp/ptp_clock.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index a23a37a4d5dc..457129c07221 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -218,7 +218,6 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
 			pr_err("failed to create ptp aux_worker %d\n", err);
 			goto kworker_err;
 		}
-		ptp->pps_source->lookup_cookie = ptp;
 	}
 
 	err = ptp_populate_pin_groups(ptp);
@@ -238,6 +237,8 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
 			pr_err("failed to register pps source\n");
 			goto no_pps;
 		}
+
+		ptp->pps_source->lookup_cookie = ptp;
 	}
 
 	/* Initialize a new device of our class in our clock structure. */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ptp: fix PTP PPS source's lookup cookie set
  2021-07-08  5:08 [PATCH] ptp: fix PTP PPS source's lookup cookie set Dario Binacchi
@ 2021-07-08  7:14 ` David Miller
  2021-07-08  7:24   ` dariobin
  2021-07-08 18:02   ` Jonathan Lemon
  0 siblings, 2 replies; 4+ messages in thread
From: David Miller @ 2021-07-08  7:14 UTC (permalink / raw)
  To: dariobin; +Cc: linux-kernel, jonathan.lemon, richardcochran, netdev

this pastch does not apply to the current net tree, that is why I keep marking it "Not Applicable"
in patchwork.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ptp: fix PTP PPS source's lookup cookie set
  2021-07-08  7:14 ` David Miller
@ 2021-07-08  7:24   ` dariobin
  2021-07-08 18:02   ` Jonathan Lemon
  1 sibling, 0 replies; 4+ messages in thread
From: dariobin @ 2021-07-08  7:24 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, jonathan.lemon, richardcochran, netdev

Hi David,

> Il 08/07/2021 09:14 David Miller <davem@davemloft.net> ha scritto:
> 
>  
> this pastch does not apply to the current net tree, that is why I keep marking it "Not Applicable"
> in patchwork.

I applied and tested the patch this morning on the mainline kernel. What am I missing?
Should I wait for the merge windows to end?

Thanks and regards,
Dario

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ptp: fix PTP PPS source's lookup cookie set
  2021-07-08  7:14 ` David Miller
  2021-07-08  7:24   ` dariobin
@ 2021-07-08 18:02   ` Jonathan Lemon
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Lemon @ 2021-07-08 18:02 UTC (permalink / raw)
  To: David Miller; +Cc: dariobin, linux-kernel, richardcochran, netdev

On Thu, Jul 08, 2021 at 12:14:04AM -0700, David Miller wrote:
> this pastch does not apply to the current net tree, that is why I keep marking it "Not Applicable"
> in patchwork.

I'll send a patch against -net in a minue.  The earlier ones
were against -net-next, I didn't realize the window closed.
-- 
Jonathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-08 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08  5:08 [PATCH] ptp: fix PTP PPS source's lookup cookie set Dario Binacchi
2021-07-08  7:14 ` David Miller
2021-07-08  7:24   ` dariobin
2021-07-08 18:02   ` Jonathan Lemon

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).