From: Jani Nikula <jani.nikula@linux.intel.com>
To: Aditya Garg <gargaditya08@live.com>,
Nathan Chancellor <nathan@kernel.org>
Cc: Aun-Ali Zaidi <admin@kodeit.net>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Atharva Tiwari <evepolonium@gmail.com>,
Kerem Karabay <kekrby@gmail.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"patches@lists.linux.dev" <patches@lists.linux.dev>,
Nathan Chancellor <nathan@kernel.org>
Subject: Re: [PATCH] drm/appletbdrm: Fix format specifier for size_t variables
Date: Tue, 04 Mar 2025 17:22:38 +0200 [thread overview]
Message-ID: <877c54zupt.fsf@intel.com> (raw)
In-Reply-To: <PN3PR01MB959766B5334E2D3B953ADE0EB8C82@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
On Tue, 04 Mar 2025, Aditya Garg <gargaditya08@live.com> wrote:
>> On 4 Mar 2025, at 6:49 PM, Nathan Chancellor <nathan@kernel.org> wrote:
>>
>> When building for a 32-bit platform, there are some warnings (or errors
>> with CONFIG_WERROR=y) due to an incorrect specifier for 'size_t'
>> variables, which is typedef'd as 'unsigned int' for these architectures:
>>
>> drivers/gpu/drm/tiny/appletbdrm.c:171:17: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
>> 170 | drm_err(drm, "Actual size (%d) doesn't match expected size (%lu)\n",
>> | ~~~
>> | %zu
>> 171 | actual_size, size);
>> | ^~~~
>> ...
>> drivers/gpu/drm/tiny/appletbdrm.c:212:17: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
>> 211 | drm_err(drm, "Actual size (%d) doesn't match expected size (%lu)\n",
>> | ~~~
>> | %zu
>> 212 | actual_size, size);
>> | ^~~~
>>
>> Use '%zu' as suggested, clearing up the warnings.
>>
>> Fixes: 0670c2f56e45 ("drm/tiny: add driver for Apple Touch Bars in x86 Macs")
>> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
>> ---
>> drivers/gpu/drm/tiny/appletbdrm.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> This went into my spam for some reason, but looks like Jani already informed you about my Ack :)
Thanks for the patch and ack, pushed to drm-misc-next.
BR,
Jani.
--
Jani Nikula, Intel
prev parent reply other threads:[~2025-03-04 15:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 13:19 [PATCH] drm/appletbdrm: Fix format specifier for size_t variables Nathan Chancellor
2025-03-04 14:09 ` Jani Nikula
2025-03-04 14:20 ` Aditya Garg
2025-03-04 15:22 ` Jani Nikula [this message]
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=877c54zupt.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=admin@kodeit.net \
--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=nathan@kernel.org \
--cc=patches@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox