Skip to contentSkip to conversation

ptp: Fix error message on failed pin verification

PATCH Applied Karol Kolacinski 3 participants 3 messages Jun 4, 2024 – Jun 5, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ptp: Fix error message on failed pin verification

On failed verification of PTP clock pin, error message prints channel number instead of pin index after "pin", which is incorrect.

Fix error message by adding channel number to the message and printing pin number instead of channel number.

Fixes 6092315dfdec ("ptp: introduce programmable pins.")
Cc Richard Cochran <[email protected]>
---
 drivers/ptp/ptp_chardev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ptp/ptp_chardev.c +2 -1
index 7513018c9f9a..2067b0120d08 100644
@@ -85,7 +85,8 @@ int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin,
 	}
 
 	if (info->verify(info, pin, func, chan)) {
-		pr_err("driver cannot use function %u on pin %u\n", func, chan);
+		pr_err("driver cannot use function %u and channel %u on pin %u\n",
+		       func, chan, pin);
 		return -EOPNOTSUPP;
 	}
 

base-commit: 2ab79514109578fc4b6df90633d500cf281eb689

Signature · 1 line
2.43.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Karol Kolacinski

On failed verification of PTP clock pin, error message prints channel number instead of pin index after "pin", which is incorrect.

Fix error message by adding channel number to the message and printing pin number instead of channel number.

Fixes 6092315dfdec ("ptp: introduce programmable pins.")
Cc Richard Cochran <[email protected]>

Nice find!

#2 lore raw
In reply to Karol Kolacinski
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 11 lines · On Tue, 4 Jun 2024 14:05:27 +0200 you wrote:

On failed verification of PTP clock pin, error message prints channel number instead of pin index after "pin", which is incorrect.

Fix error message by adding channel number to the message and printing pin number instead of channel number.

Fixes 6092315dfdec ("ptp: introduce programmable pins.")
Cc Richard Cochran <[email protected]>

[...]

Here is the summary with links:
- [net] ptp: Fix error message on failed pin verification

    https://git.kernel.org/netdev/net/c/323a359f9b07

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html