summaryrefslogtreecommitdiff
path: root/drivers/ptp
diff options
context:
space:
mode:
authorJonathan Lemon <jonathan.lemon@gmail.com>2022-03-16 19:53:47 +0300
committerJakub Kicinski <kuba@kernel.org>2022-03-18 03:38:37 +0300
commit2b341f7532d4f6c8b84206daad202a745962b844 (patch)
tree7e9fba204aa823cd6c46f283f22aaeb1608f983f /drivers/ptp
parent7b6e6235b6641284b28f6a2bbd6b823a2081bd5c (diff)
downloadlinux-2b341f7532d4f6c8b84206daad202a745962b844.tar.xz
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>
Diffstat (limited to 'drivers/ptp')
-rw-r--r--drivers/ptp/ptp_ocp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index d8cefc89a588..d64a1ce5f5bc 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -2983,11 +2983,12 @@ ptp_ocp_summary_show(struct seq_file *s, void *data)
{
struct device *dev = s->private;
struct ptp_system_timestamp sts;
- u16 sma_val[4][2], ctrl, val;
struct ts_reg __iomem *ts_reg;
struct timespec64 ts;
struct ptp_ocp *bp;
+ u16 sma_val[4][2];
char *src, *buf;
+ u32 ctrl, val;
bool on, map;
int i;