From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Jiasheng Jiang <jiashengjiangcool@gmail.com>,
Jonathan Lemon <jonathan.lemon@gmail.com>
Cc: Richard Cochran <richardcochran@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Jiri Pirko <jiri@resnulli.us>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ptp: ocp: Fix typo using index 1 instead of i in SMA initialization loop
Date: Tue, 21 Oct 2025 20:47:43 +0100 [thread overview]
Message-ID: <951141f8-f26b-4d0e-bf54-5c7f4e0b99af@linux.dev> (raw)
In-Reply-To: <20251021182456.9729-1-jiashengjiangcool@gmail.com>
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>
next prev parent reply other threads:[~2025-10-21 19:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2025-10-23 3:46 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=951141f8-f26b-4d0e-bf54-5c7f4e0b99af@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=andrew+netdev@lunn.ch \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiashengjiangcool@gmail.com \
--cc=jiri@resnulli.us \
--cc=jonathan.lemon@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox