Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ptp: ocp: Make debugfs variables the correct bitwidth

An earlier patch mistakenly changed these variables from u32 to u16,
leading to unintended truncation. Restore the original logic.

Fixes: a509a7c61e3b ("ptp: ocp: Add support for selectable SMA directions.")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Link: https://lore.kernel.org/r/20220316165347.599154-1-jonathan.lemon@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Jonathan Lemon and committed by
Jakub Kicinski
2b341f75 7b6e6235

+2 -1
+2 -1
drivers/ptp/ptp_ocp.c
··· 2983 2983 { 2984 2984 struct device *dev = s->private; 2985 2985 struct ptp_system_timestamp sts; 2986 - u16 sma_val[4][2], ctrl, val; 2987 2986 struct ts_reg __iomem *ts_reg; 2988 2987 struct timespec64 ts; 2989 2988 struct ptp_ocp *bp; 2989 + u16 sma_val[4][2]; 2990 2990 char *src, *buf; 2991 + u32 ctrl, val; 2991 2992 bool on, map; 2992 2993 int i; 2993 2994