From: Arnd Bergmann <arnd@kernel.org>
To: Aun-Ali Zaidi <admin@kodeit.net>,
Aditya Garg <gargaditya08@live.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Atharva Tiwari <evepolonium@gmail.com>,
Kerem Karabay <kekrby@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm/tiny: fix printk format string for 32-bit
Date: Tue, 4 Mar 2025 15:27:02 +0100 [thread overview]
Message-ID: <20250304142711.621330-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
A size_t must be printed with the %z modifier instead of %l:
In file included from include/linux/device.h:15,
from include/linux/usb.h:19,
from drivers/gpu/drm/tiny/appletbdrm.c:19:
drivers/gpu/drm/tiny/appletbdrm.c: In function 'appletbdrm_send_request':
include/drm/drm_print.h:589:54: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
drivers/gpu/drm/tiny/appletbdrm.c:170:17: note: in expansion of macro 'drm_err'
170 | drm_err(drm, "Actual size (%d) doesn't match expected size (%lu)\n",
| ^~~~~~~
drivers/gpu/drm/tiny/appletbdrm.c: In function 'appletbdrm_read_response':
include/drm/drm_print.h:589:54: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
drivers/gpu/drm/tiny/appletbdrm.c:211:17: note: in expansion of macro 'drm_err'
211 | drm_err(drm, "Actual size (%d) doesn't match expected size (%lu)\n",
| ^~~~~~~
Fixes: 0670c2f56e45 ("drm/tiny: add driver for Apple Touch Bars in x86 Macs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/tiny/appletbdrm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tiny/appletbdrm.c b/drivers/gpu/drm/tiny/appletbdrm.c
index f5d177e234e4..394c8f9bd41a 100644
--- a/drivers/gpu/drm/tiny/appletbdrm.c
+++ b/drivers/gpu/drm/tiny/appletbdrm.c
@@ -167,7 +167,7 @@ static int appletbdrm_send_request(struct appletbdrm_device *adev,
}
if (actual_size != size) {
- drm_err(drm, "Actual size (%d) doesn't match expected size (%lu)\n",
+ drm_err(drm, "Actual size (%d) doesn't match expected size (%zu)\n",
actual_size, size);
return -EIO;
}
@@ -208,7 +208,7 @@ static int appletbdrm_read_response(struct appletbdrm_device *adev,
}
if (actual_size != size) {
- drm_err(drm, "Actual size (%d) doesn't match expected size (%lu)\n",
+ drm_err(drm, "Actual size (%d) doesn't match expected size (%zu)\n",
actual_size, size);
return -EBADMSG;
}
--
2.39.5
next reply other threads:[~2025-03-04 14:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 14:27 Arnd Bergmann [this message]
2025-03-04 14:46 ` [PATCH] drm/tiny: fix printk format string for 32-bit Aditya Garg
2025-03-04 15:10 ` Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250304142711.621330-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=admin@kodeit.net \
--cc=airlied@gmail.com \
--cc=arnd@arndb.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=evepolonium@gmail.com \
--cc=gargaditya08@live.com \
--cc=kekrby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.