From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E31F7C43618 for ; Mon, 3 May 2021 16:57:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8C8A611C9 for ; Mon, 3 May 2021 16:57:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233500AbhECQ6k (ORCPT ); Mon, 3 May 2021 12:58:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:33096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234560AbhECQu2 (ORCPT ); Mon, 3 May 2021 12:50:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CA05B61244; Mon, 3 May 2021 16:40:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620060058; bh=RuguGrEi2naplWY6aytjF5jxaCLPOSg2TBV/f+Jxa3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GtevQr2UOQSGms6BbkWIucvn8J3WPMQvcEbdqCwLKG7FlcUIEpPWSXizEvf/RvmJ3 HzKtTY89Rnr8NtMtNDhAzl+w//7bKK7ZwSFwZXeXhjqRtBlmsjMNrFEyPI3po1JmNU VFC4nZNT0wUXSZyqEGrSEVXeBZEmqxiCWwvlitdEfypbGx1AsWAVQVGSpZDGTiASpY Q1FGQ+JghjHbwaaCI4nLeN+66FvuxMj9wKJlkoyY4bqQmjxafujrxAmxcWn9HLZGKV fuU3brjDOH+CmYa5pbF1ADjNRs9kKrRa6zkLVOhkNVCDtKaN6BXfqTVOO9+6/SdhgE Ncu0P4RuvFZMg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , =?UTF-8?q?Christian=20K=C3=B6nig?= , Tom Rix , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 5.4 50/57] amdgpu: avoid incorrect %hu format string Date: Mon, 3 May 2021 12:39:34 -0400 Message-Id: <20210503163941.2853291-50-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210503163941.2853291-1-sashal@kernel.org> References: <20210503163941.2853291-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 7d98d416c2cc1c1f7d9508e887de4630e521d797 ] 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. Reviewed-by: Christian König Reviewed-by: Tom Rix Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- 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 b2c364b8695f..cfa8324b9f51 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c @@ -231,7 +231,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; -- 2.30.2