diff mbox series

[v1] ptp: ocp: fix bug in unregistering the DPLL subsystem

Message ID 20231220081914.16779-1-maimon.sagi@gmail.com (mailing list archive)
State Accepted
Commit 97417cd79ce179a774b245a3f5535cc3fbbaee50
Delegated to: Netdev Maintainers
Headers show
Series [v1] ptp: ocp: fix bug in unregistering the DPLL subsystem | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1115 this patch: 1115
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang fail Errors and warnings before: 12 this patch: 12
netdev/verify_signedoff fail author Signed-off-by missing
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1142 this patch: 1142
netdev/checkpatch warning WARNING: line length of 104 exceeds 80 columns
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sagi Maimon Dec. 20, 2023, 8:19 a.m. UTC
When unregistering the DPLL subsystem the priv pointer is different then
the one used for registration which cause failure in unregistering.

Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
---
 drivers/ptp/ptp_ocp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jiri Pirko Dec. 20, 2023, 9:10 a.m. UTC | #1
Wed, Dec 20, 2023 at 09:19:14AM CET, maimon.sagi@gmail.com wrote:
>When unregistering the DPLL subsystem the priv pointer is different then
>the one used for registration which cause failure in unregistering.
>
>Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Vadim Fedorenko Dec. 20, 2023, 10:22 a.m. UTC | #2
On 20/12/2023 08:19, Sagi Maimon wrote:
> When unregistering the DPLL subsystem the priv pointer is different then
> the one used for registration which cause failure in unregistering.
> 
> Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
> ---
>   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 4021d3d325f9..e7defce8cf48 100644
> --- a/drivers/ptp/ptp_ocp.c
> +++ b/drivers/ptp/ptp_ocp.c
> @@ -4492,7 +4492,7 @@ ptp_ocp_remove(struct pci_dev *pdev)
>   	cancel_delayed_work_sync(&bp->sync_work);
>   	for (i = 0; i < OCP_SMA_NUM; i++) {
>   		if (bp->sma[i].dpll_pin) {
> -			dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, bp);
> +			dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, &bp->sma[i]);
>   			dpll_pin_put(bp->sma[i].dpll_pin);
>   		}
>   	}

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
patchwork-bot+netdevbpf@kernel.org Dec. 29, 2023, 8:40 a.m. UTC | #3
Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 20 Dec 2023 10:19:14 +0200 you wrote:
> When unregistering the DPLL subsystem the priv pointer is different then
> the one used for registration which cause failure in unregistering.
> 
> Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
> ---
>  drivers/ptp/ptp_ocp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [v1] ptp: ocp: fix bug in unregistering the DPLL subsystem
    https://git.kernel.org/netdev/net/c/97417cd79ce1

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index 4021d3d325f9..e7defce8cf48 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -4492,7 +4492,7 @@  ptp_ocp_remove(struct pci_dev *pdev)
 	cancel_delayed_work_sync(&bp->sync_work);
 	for (i = 0; i < OCP_SMA_NUM; i++) {
 		if (bp->sma[i].dpll_pin) {
-			dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, bp);
+			dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, &bp->sma[i]);
 			dpll_pin_put(bp->sma[i].dpll_pin);
 		}
 	}