diff mbox series

[net] ptp: Fix error message on failed pin verification

Message ID 20240604120555.16643-1-karol.kolacinski@intel.com (mailing list archive)
State Accepted
Commit 323a359f9b077f382f4483023d096a4d316fd135
Delegated to: Netdev Maintainers
Headers show
Series [net] ptp: Fix error message on failed pin verification | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 900 this patch: 900
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 2 of 2 maintainers
netdev/build_clang success Errors and warnings before: 904 this patch: 904
netdev/verify_signedoff success Signed-off-by tag matches author and committer
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: 904 this patch: 904
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
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
netdev/contest success net-next-2024-06-04--18-00 (tests: 1045)

Commit Message

Karol Kolacinski June 4, 2024, 12:05 p.m. UTC
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 <richardcochran@gmail.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
---
 drivers/ptp/ptp_chardev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


base-commit: 2ab79514109578fc4b6df90633d500cf281eb689

Comments

Richard Cochran June 4, 2024, 2:59 p.m. UTC | #1
On Tue, Jun 04, 2024 at 02:05:27PM +0200, Karol Kolacinski 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 <richardcochran@gmail.com>
> Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>

Nice find!

Acked-by: Richard Cochran <richardcochran@gmail.com>
patchwork-bot+netdevbpf@kernel.org June 5, 2024, 11:10 p.m. UTC | #2
Hello:

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

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 <richardcochran@gmail.com>
> Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
> 
> [...]

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!
diff mbox series

Patch

diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
index 7513018c9f9a..2067b0120d08 100644
--- a/drivers/ptp/ptp_chardev.c
+++ b/drivers/ptp/ptp_chardev.c
@@ -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;
 	}