[PATCH] media: lnbh25: use %*ph for I2C write dump
From: Vivek BalachandharTN
Date: Mon Dec 01 2025 - 23:36:56 EST
Replace the hand-rolled %02x formatting of the I2C write buffer in the
lnbh25 driver with the %*ph format specifier. %*ph is the preferred
helper for printing a buffer in hexadecimal and makes the debug output
clearer and more consistent.
Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@xxxxxxxxx>
---
drivers/media/dvb-frontends/lnbh25.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/media/dvb-frontends/lnbh25.c b/drivers/media/dvb-frontends/lnbh25.c
index 41bec050642b..629445ea16d6 100644
--- a/drivers/media/dvb-frontends/lnbh25.c
+++ b/drivers/media/dvb-frontends/lnbh25.c
@@ -110,9 +110,10 @@ static int lnbh25_set_voltage(struct dvb_frontend *fe,
}
priv->config[1] = data1_reg;
dev_dbg(&priv->i2c->dev,
- "%s(): %s, I2C 0x%x write [ %02x %02x %02x ]\n",
+ "%s(): %s, I2C 0x%x write [ %*ph ]\n",
__func__, vsel, priv->i2c_address,
- priv->config[0], priv->config[1], priv->config[2]);
+ 3, priv->config);
+
ret = i2c_transfer(priv->i2c, &msg, 1);
if (ret >= 0 && ret != 1)
ret = -EIO;
--
2.34.1