* [PATCH] drm/i915/pxp: use correct format string for size_t
@ 2023-06-01 21:36 Arnd Bergmann
2023-06-01 22:00 ` [Intel-gfx] " Teres Alexis, Alan Previn
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2023-06-01 21:36 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin
Cc: Arnd Bergmann, David Airlie, Daniel Vetter,
Daniele Ceraolo Spurio, Radhakrishna Sripada, Alan Previn,
intel-gfx, dri-devel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
While 'unsigned long' needs the %ld format string, size_t needs the %z
modifier:
drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c: In function 'gsccs_send_message':
include/drm/drm_print.h:456:39: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
456 | dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
Fixes: dc9ac125d81fa ("drm/i915/pxp: Add GSC-CS backend to send GSC fw messages")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c
index 8dc41de3f6f74..290ed5ac487de 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c
@@ -143,7 +143,7 @@ gsccs_send_message(struct intel_pxp *pxp,
reply_size = header->message_size - sizeof(*header);
if (reply_size > msg_out_size_max) {
- drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%ld)\n",
+ drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%zd)\n",
reply_size, msg_out_size_max);
reply_size = msg_out_size_max;
}
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/pxp: use correct format string for size_t
2023-06-01 21:36 [PATCH] drm/i915/pxp: use correct format string for size_t Arnd Bergmann
@ 2023-06-01 22:00 ` Teres Alexis, Alan Previn
2023-06-02 0:43 ` Andi Shyti
0 siblings, 1 reply; 3+ messages in thread
From: Teres Alexis, Alan Previn @ 2023-06-01 22:00 UTC (permalink / raw)
To: joonas.lahtinen@linux.intel.com, Vivi, Rodrigo, arnd@kernel.org,
tvrtko.ursulin@linux.intel.com, jani.nikula@linux.intel.com
Cc: dri-devel@lists.freedesktop.org, daniel@ffwll.ch,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
arnd@arndb.de, airlied@gmail.com
On Thu, 2023-06-01 at 23:36 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> While 'unsigned long' needs the %ld format string, size_t needs the %z
> modifier:
alan:snip
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c
> @@ -143,7 +143,7 @@ gsccs_send_message(struct intel_pxp *pxp,
>
> reply_size = header->message_size - sizeof(*header);
> if (reply_size > msg_out_size_max) {
> - drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%ld)\n",
> + drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%zd)\n",
> reply_size, msg_out_size_max);
> reply_size = msg_out_size_max;
> }
Thanks Arnd for catching this, although i believe Nathan sumbmitted a patch for the same fix yesterday and received an RB from Andi.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/pxp: use correct format string for size_t
2023-06-01 22:00 ` [Intel-gfx] " Teres Alexis, Alan Previn
@ 2023-06-02 0:43 ` Andi Shyti
0 siblings, 0 replies; 3+ messages in thread
From: Andi Shyti @ 2023-06-02 0:43 UTC (permalink / raw)
To: Teres Alexis, Alan Previn
Cc: joonas.lahtinen@linux.intel.com, Vivi, Rodrigo, arnd@kernel.org,
tvrtko.ursulin@linux.intel.com, jani.nikula@linux.intel.com,
arnd@arndb.de, intel-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
daniel@ffwll.ch, airlied@gmail.com
Hi Arnd,
On Thu, Jun 01, 2023 at 10:00:27PM +0000, Teres Alexis, Alan Previn wrote:
> On Thu, 2023-06-01 at 23:36 +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > While 'unsigned long' needs the %ld format string, size_t needs the %z
> > modifier:
>
> alan:snip
>
>
> > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c
> > @@ -143,7 +143,7 @@ gsccs_send_message(struct intel_pxp *pxp,
> >
> > reply_size = header->message_size - sizeof(*header);
> > if (reply_size > msg_out_size_max) {
> > - drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%ld)\n",
> > + drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%zd)\n",
> > reply_size, msg_out_size_max);
> > reply_size = msg_out_size_max;
> > }
> Thanks Arnd for catching this, although i believe Nathan sumbmitted a patch for the same fix yesterday and received an RB from Andi.
yes, the patch is here:
https://patchwork.freedesktop.org/patch/540272/?series=118593&rev=1
I'm waiting for full CI results to merge this.
Thanks,
Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-02 0:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-01 21:36 [PATCH] drm/i915/pxp: use correct format string for size_t Arnd Bergmann
2023-06-01 22:00 ` [Intel-gfx] " Teres Alexis, Alan Previn
2023-06-02 0:43 ` Andi Shyti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox