mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] media: mceusb: don't push static constants on stack for %*ph
@ 2024-10-28 15:59 Sean Young
  2024-10-28 15:59 ` [PATCH 2/2] media: imon: " Sean Young
  0 siblings, 1 reply; 2+ messages in thread
From: Sean Young @ 2024-10-28 15:59 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel

There is no need to pass constants via stack. The width may be explicitly
specified in the format.

Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/mceusb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index cd7af4d88b7f7..d5ea3868d5a3c 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -658,8 +658,8 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, u8 *buf, int buf_len,
 			if (len == 2)
 				dev_dbg(dev, "Get hw/sw rev?");
 			else
-				dev_dbg(dev, "hw/sw rev %*ph",
-					4, &buf[offset + 2]);
+				dev_dbg(dev, "hw/sw rev %4ph",
+					&buf[offset + 2]);
 			break;
 		case MCE_CMD_RESUME:
 			dev_dbg(dev, "Device resume requested");
-- 
2.47.0


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

* [PATCH 2/2] media: imon: don't push static constants on stack for %*ph
  2024-10-28 15:59 [PATCH 1/2] media: mceusb: don't push static constants on stack for %*ph Sean Young
@ 2024-10-28 15:59 ` Sean Young
  0 siblings, 0 replies; 2+ messages in thread
From: Sean Young @ 2024-10-28 15:59 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel

There is no need to pass constants via stack. The width may be explicitly
specified in the format.

Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/imon_raw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/rc/imon_raw.c b/drivers/media/rc/imon_raw.c
index b02ded52f19e6..3a526dea6532c 100644
--- a/drivers/media/rc/imon_raw.c
+++ b/drivers/media/rc/imon_raw.c
@@ -37,7 +37,7 @@ static void imon_ir_data(struct imon *imon)
 	if (packet_no == 0xff)
 		return;
 
-	dev_dbg(imon->dev, "data: %*ph", 8, imon->ir_buf);
+	dev_dbg(imon->dev, "data: %8ph", imon->ir_buf);
 
 	/*
 	 * Only the first 5 bytes contain IR data. Right shift so we move
-- 
2.47.0


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

end of thread, other threads:[~2024-10-28 15:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-28 15:59 [PATCH 1/2] media: mceusb: don't push static constants on stack for %*ph Sean Young
2024-10-28 15:59 ` [PATCH 2/2] media: imon: " Sean Young

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

all inboxes | Powered by JetHome®