* [PATCH net] ptp: ptp_clockmatrix: fix is_single_shot
@ 2022-05-19 19:20 Min Li
2022-05-19 23:46 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Min Li @ 2022-05-19 19:20 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
Signed-off-by: Min Li <min.li.xe@renesas.com>
---
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] ptp: ptp_clockmatrix: fix is_single_shot
2022-05-19 19:20 [PATCH net] ptp: ptp_clockmatrix: fix is_single_shot Min Li
@ 2022-05-19 23:46 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2022-05-19 23:46 UTC (permalink / raw)
To: Min Li; +Cc: richardcochran, lee.jones, linux-kernel, netdev
On Thu, 19 May 2022 15:20:59 -0400 Min Li wrote:
> Subject: [PATCH net] ptp: ptp_clockmatrix: fix is_single_shot
I put your patches in net-next, because I could not understand
whether they were a bug fix or a feature. Please resend this
with [PATCH net-next]
> is_single_shot should return false for the power_of_2 mask
>
> Signed-off-by: Min Li <min.li.xe@renesas.com>
And since this clearly is a bug fix it'll need a Fixes: tag.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-19 23:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-19 19:20 [PATCH net] ptp: ptp_clockmatrix: fix is_single_shot Min Li
2022-05-19 23:46 ` Jakub Kicinski
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).