public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ptp: ocp: Fix typo using index 1 instead of i in SMA initialization loop
@ 2025-10-21 18:24 Jiasheng Jiang
  2025-10-21 19:47 ` Vadim Fedorenko
  2025-10-23  3:46 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jiasheng Jiang @ 2025-10-21 18:24 UTC (permalink / raw)
  To: Jonathan Lemon, Vadim Fedorenko
  Cc: Richard Cochran, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Arkadiusz Kubalewski, Jiri Pirko,
	netdev, linux-kernel, Jiasheng Jiang

In ptp_ocp_sma_fb_init(), the code mistakenly used bp->sma[1]
instead of bp->sma[i] inside a for-loop, which caused only SMA[1]
to have its DIRECTION_CAN_CHANGE capability cleared. This led to
inconsistent capability flags across SMA pins.

Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
---
 drivers/ptp/ptp_ocp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index 794ec6e71990..a5c363252986 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -2548,7 +2548,7 @@ ptp_ocp_sma_fb_init(struct ptp_ocp *bp)
 		for (i = 0; i < OCP_SMA_NUM; i++) {
 			bp->sma[i].fixed_fcn = true;
 			bp->sma[i].fixed_dir = true;
-			bp->sma[1].dpll_prop.capabilities &=
+			bp->sma[i].dpll_prop.capabilities &=
 				~DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE;
 		}
 		return;
-- 
2.25.1


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

* Re: [PATCH] ptp: ocp: Fix typo using index 1 instead of i in SMA initialization loop
  2025-10-21 18:24 [PATCH] ptp: ocp: Fix typo using index 1 instead of i in SMA initialization loop Jiasheng Jiang
@ 2025-10-21 19:47 ` Vadim Fedorenko
  2025-10-23  3:46 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Vadim Fedorenko @ 2025-10-21 19:47 UTC (permalink / raw)
  To: Jiasheng Jiang, Jonathan Lemon
  Cc: Richard Cochran, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Arkadiusz Kubalewski, Jiri Pirko,
	netdev, linux-kernel

On 21/10/2025 19:24, Jiasheng Jiang wrote:
> In ptp_ocp_sma_fb_init(), the code mistakenly used bp->sma[1]
> instead of bp->sma[i] inside a for-loop, which caused only SMA[1]
> to have its DIRECTION_CAN_CHANGE capability cleared. This led to
> inconsistent capability flags across SMA pins.
> 
> Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
> Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
> ---
>   drivers/ptp/ptp_ocp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
> index 794ec6e71990..a5c363252986 100644
> --- a/drivers/ptp/ptp_ocp.c
> +++ b/drivers/ptp/ptp_ocp.c
> @@ -2548,7 +2548,7 @@ ptp_ocp_sma_fb_init(struct ptp_ocp *bp)
>   		for (i = 0; i < OCP_SMA_NUM; i++) {
>   			bp->sma[i].fixed_fcn = true;
>   			bp->sma[i].fixed_dir = true;
> -			bp->sma[1].dpll_prop.capabilities &=
> +			bp->sma[i].dpll_prop.capabilities &=
>   				~DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE;
>   		}
>   		return;

Thanks!

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>

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

* Re: [PATCH] ptp: ocp: Fix typo using index 1 instead of i in SMA initialization loop
  2025-10-21 18:24 [PATCH] ptp: ocp: Fix typo using index 1 instead of i in SMA initialization loop Jiasheng Jiang
  2025-10-21 19:47 ` Vadim Fedorenko
@ 2025-10-23  3:46 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-10-23  3:46 UTC (permalink / raw)
  To: Jiasheng Jiang
  Cc: jonathan.lemon, vadim.fedorenko, richardcochran, andrew+netdev,
	davem, edumazet, kuba, pabeni, arkadiusz.kubalewski, jiri, netdev,
	linux-kernel

Hello:

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

On Tue, 21 Oct 2025 18:24:56 +0000 you wrote:
> In ptp_ocp_sma_fb_init(), the code mistakenly used bp->sma[1]
> instead of bp->sma[i] inside a for-loop, which caused only SMA[1]
> to have its DIRECTION_CAN_CHANGE capability cleared. This led to
> inconsistent capability flags across SMA pins.
> 
> Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
> Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
> 
> [...]

Here is the summary with links:
  - ptp: ocp: Fix typo using index 1 instead of i in SMA initialization loop
    https://git.kernel.org/netdev/net/c/a767957e7a83

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] 3+ messages in thread

end of thread, other threads:[~2025-10-23  3:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-21 18:24 [PATCH] ptp: ocp: Fix typo using index 1 instead of i in SMA initialization loop Jiasheng Jiang
2025-10-21 19:47 ` Vadim Fedorenko
2025-10-23  3:46 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox