From: "Christian König" <christian.koenig@amd.com>
To: Arnd Bergmann <arnd@kernel.org>,
Alex Deucher <alexander.deucher@amd.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: Arnd Bergmann <arnd@arndb.de>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Lee Jones <lee.jones@linaro.org>, Chen Li <chenli@uniontech.com>,
Tom Rix <trix@redhat.com>, Sonny Jiang <sonny.jiang@amd.com>,
xinhui pan <xinhui.pan@amd.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com
Subject: Re: [PATCH] amdgpu: avoid incorrect %hu format string
Date: Mon, 22 Mar 2021 12:58:22 +0100 [thread overview]
Message-ID: <385b8150-ab31-0a53-db09-e0dcdd1d7c25@amd.com> (raw)
In-Reply-To: <20210322115458.3961825-1-arnd@kernel.org>
Am 22.03.21 um 12:54 schrieb Arnd Bergmann:
> From: Arnd Bergmann <arnd@arndb.de>
>
> clang points out that the %hu format string does not match the type
> of the variables here:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:263:7: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
> version_major, version_minor);
> ^~~~~~~~~~~~~
> include/drm/drm_print.h:498:19: note: expanded from macro 'DRM_ERROR'
> __drm_err(fmt, ##__VA_ARGS__)
> ~~~ ^~~~~~~~~~~
>
> Change it to a regular %u, the same way a previous patch did for
> another instance of the same warning.
>
> Fixes: 0b437e64e0af ("drm/amdgpu: remove h from printk format specifier")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index e2ed4689118a..c6dbc0801604 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -259,7 +259,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
> if ((adev->asic_type == CHIP_POLARIS10 ||
> adev->asic_type == CHIP_POLARIS11) &&
> (adev->uvd.fw_version < FW_1_66_16))
> - DRM_ERROR("POLARIS10/11 UVD firmware version %hu.%hu is too old.\n",
> + DRM_ERROR("POLARIS10/11 UVD firmware version %u.%u is too old.\n",
> version_major, version_minor);
> } else {
> unsigned int enc_major, enc_minor, dec_minor;
next prev parent reply other threads:[~2021-03-22 11:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 11:54 Arnd Bergmann
2021-03-22 11:58 ` Christian König [this message]
2021-03-22 14:08 ` Tom Rix
2021-03-23 15:00 ` Alex Deucher
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=385b8150-ab31-0a53-db09-e0dcdd1d7c25@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=chenli@uniontech.com \
--cc=clang-built-linux@googlegroups.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=sonny.jiang@amd.com \
--cc=trix@redhat.com \
--cc=xinhui.pan@amd.com \
/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
all inboxes | Powered by JetHome®