From: Luca Tettamanti <kronos.it@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [drm:drm-next 169/234] drivers/gpu/drm/radeon/radeon_acpi.c:128:3: warning: format '%lu' expects
Date: Wed, 03 Oct 2012 13:03:15 +0000 [thread overview]
Message-ID: <20121003130315.GA27943@growl> (raw)
In-Reply-To: <20121003011822.GD8750@localhost>
[-- Attachment #1: Type: text/plain, Size: 446 bytes --]
On Wed, Oct 03, 2012 at 09:18:22AM +0800, Fengguang Wu wrote:
> All warnings:
>
> drivers/gpu/drm/radeon/radeon_acpi.c: In function 'radeon_atif_verify_interface':
> drivers/gpu/drm/radeon/radeon_acpi.c:128:3: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t' [-Wformat]
Yup, %lu is wrong on 32bit. There's also another occurence in that file,
attached patch agains drm-next fixes both.
Luca
[-- Attachment #2: 0001-drm-radeon-use-zu-for-formatting-size_t.patch --]
[-- Type: text/plain, Size: 1190 bytes --]
From d0c3d0f858d3f2cdae2bbf63aac0303d4c14aa9a Mon Sep 17 00:00:00 2001
From: Luca Tettamanti <kronos.it@gmail.com>
Date: Wed, 3 Oct 2012 15:00:19 +0200
Subject: [PATCH] drm/radeon: use %zu for formatting size_t
Fixes compiler warnings on 32bit.
Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
---
drivers/gpu/drm/radeon/radeon_acpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c
index c3976eb..faf1ed5 100644
--- a/drivers/gpu/drm/radeon/radeon_acpi.c
+++ b/drivers/gpu/drm/radeon/radeon_acpi.c
@@ -203,7 +203,7 @@ static int radeon_atif_verify_interface(acpi_handle handle,
size = *(u16 *) info->buffer.pointer;
if (size < 12) {
- DRM_INFO("ATIF buffer is too small: %lu\n", size);
+ DRM_INFO("ATIF buffer is too small: %zu\n", size);
err = -EINVAL;
goto out;
}
@@ -487,7 +487,7 @@ static int radeon_atcs_verify_interface(acpi_handle handle,
size = *(u16 *) info->buffer.pointer;
if (size < 8) {
- DRM_INFO("ATCS buffer is too small: %lu\n", size);
+ DRM_INFO("ATCS buffer is too small: %zu\n", size);
err = -EINVAL;
goto out;
}
--
1.7.10.4
next prev parent reply other threads:[~2012-10-03 13:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 1:18 [drm:drm-next 169/234] drivers/gpu/drm/radeon/radeon_acpi.c:128:3: warning: format '%lu' expects arg Fengguang Wu
2012-10-03 13:03 ` Luca Tettamanti [this message]
2012-10-03 13:35 ` [drm:drm-next 169/234] drivers/gpu/drm/radeon/radeon_acpi.c:128:3: warning: format '%lu' expects Deucher, Alexander
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=20121003130315.GA27943@growl \
--to=kronos.it@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
/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