All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2] ptp: ptp_clockmatrix: fix is_single_shot
@ 2022-05-24 14:45 Min Li
  2022-05-26  5:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Min Li @ 2022-05-24 14:45 UTC (permalink / raw)
  To: richardcochran, lee.jones; +Cc: linux-kernel, netdev, Min Li

is_single_shot should return false for the power_of_2 mask

Fixes: b95fcd0e776f ("ptp: ptp_clockmatrix: Add PTP_CLK_REQ_EXTTS support")
Signed-off-by: Min Li <min.li.xe@renesas.com>
---
-Add Fixes tag

 drivers/ptp/ptp_clockmatrix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c
index cb258e1..c9d451b 100644
--- a/drivers/ptp/ptp_clockmatrix.c
+++ b/drivers/ptp/ptp_clockmatrix.c
@@ -267,7 +267,7 @@ static int arm_tod_read_trig_sel_refclk(struct idtcm_channel *channel, u8 ref)
 static bool is_single_shot(u8 mask)
 {
 	/* Treat single bit ToD masks as continuous trigger */
-	return mask <= 8 && is_power_of_2(mask);
+	return !(mask <= 8 && is_power_of_2(mask));
 }
 
 static int idtcm_extts_enable(struct idtcm_channel *channel,
-- 
2.7.4


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

* Re: [PATCH net v2] ptp: ptp_clockmatrix: fix is_single_shot
  2022-05-24 14:45 [PATCH net v2] ptp: ptp_clockmatrix: fix is_single_shot Min Li
@ 2022-05-26  5:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-26  5:00 UTC (permalink / raw)
  To: Min Li; +Cc: richardcochran, lee.jones, linux-kernel, netdev

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 24 May 2022 10:45:01 -0400 you wrote:
> is_single_shot should return false for the power_of_2 mask
> 
> Fixes: b95fcd0e776f ("ptp: ptp_clockmatrix: Add PTP_CLK_REQ_EXTTS support")
> Signed-off-by: Min Li <min.li.xe@renesas.com>
> ---
> -Add Fixes tag
> 
> [...]

Here is the summary with links:
  - [net,v2] ptp: ptp_clockmatrix: fix is_single_shot
    https://git.kernel.org/netdev/net/c/d0bbe0328fe5

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-05-26  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24 14:45 [PATCH net v2] ptp: ptp_clockmatrix: fix is_single_shot Min Li
2022-05-26  5:00 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.