[PATCH] misc: issei: hw_heci: fix dev_err format warnings

From: Randy Dunlap

Date: Thu Jul 30 2026 - 00:23:45 EST


Use "%u" instead of "%lu" to prevent dev_err format warnings:

In file included from ../drivers/misc/issei/hw_heci.c:7:
../drivers/misc/issei/hw_heci.c: In function ‘heci_write_hbuf’:
../drivers/misc/issei/hw_heci.c:374:37: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
374 | dev_err(&idev->dev, "Data size %zu not aligned to slot size %lu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/misc/issei/hw_heci.c: In function ‘heci_read_hbuf’:
../drivers/misc/issei/hw_heci.c:404:37: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
404 | dev_err(&idev->dev, "Data size %zu not aligned to slot size %lu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 8bf5e84998c3 ("issei: add heci hardware module")
Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
---
Cc: Vitaly Lubart <lubvital@xxxxxxxxx>
Cc: Alexander Usyskin <alexander.usyskin@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>

drivers/misc/issei/hw_heci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-next-20260729.orig/drivers/misc/issei/hw_heci.c
+++ linux-next-20260729/drivers/misc/issei/hw_heci.c
@@ -371,7 +371,7 @@ static int heci_write_hbuf(struct issei_
struct issei_heci_hw *hw = to_heci_hw(idev);

if (!IS_ALIGNED(data_len, CB_SLOT_SIZE)) {
- dev_err(&idev->dev, "Data size %zu not aligned to slot size %lu\n",
+ dev_err(&idev->dev, "Data size %zu not aligned to slot size %u\n",
data_len, CB_SLOT_SIZE);
return -EINVAL;
}
@@ -401,7 +401,7 @@ static int heci_read_hbuf(struct issei_d
u32 *reg_buf = data;

if (!IS_ALIGNED(data_len, CB_SLOT_SIZE)) {
- dev_err(&idev->dev, "Data size %zu not aligned to slot size %lu\n",
+ dev_err(&idev->dev, "Data size %zu not aligned to slot size %u\n",
data_len, CB_SLOT_SIZE);
return -EINVAL;
}