Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH] soc: qcom: cmd-db: fix minor version decoding in debugfs output
@ 2026-03-29 19:11 Alok Tiwari
  2026-03-30  5:35 ` Sneh Mankad
  0 siblings, 1 reply; 5+ messages in thread
From: Alok Tiwari @ 2026-03-29 19:11 UTC (permalink / raw)
  To: andersson, konradybcio, linux-arm-msm; +Cc: alok.a.tiwarilinux, alok.a.tiwari

cmd-db encodes the version as major in the high byte and minor in the low
byte. cmd_db_debugfs_dump() prints the full 16 bit value as the minor
version, resulting in incorrect output.

Extract minor from the low byte using (version & 0xff).

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
 drivers/soc/qcom/cmd-db.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/qcom/cmd-db.c b/drivers/soc/qcom/cmd-db.c
index 84a75d8c4b70..eed7013c7676 100644
--- a/drivers/soc/qcom/cmd-db.c
+++ b/drivers/soc/qcom/cmd-db.c
@@ -301,7 +301,7 @@ static int cmd_db_debugfs_dump(struct seq_file *seq, void *p)
 
 		version = le16_to_cpu(rsc->version);
 		major = version >> 8;
-		minor = version;
+		minor = version & 0xff;
 
 		seq_printf(seq, "Slave %s (v%u.%u)\n", name, major, minor);
 		seq_puts(seq, "-------------------------\n");
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-30 13:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-29 19:11 [PATCH] soc: qcom: cmd-db: fix minor version decoding in debugfs output Alok Tiwari
2026-03-30  5:35 ` Sneh Mankad
2026-03-30  6:03   ` ALOK TIWARI
2026-03-30 11:12     ` Dmitry Baryshkov
2026-03-30 13:18     ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox