Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3366465pxf; Mon, 22 Mar 2021 04:56:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRl/j6e0glcQte4iRL097x2SREdJeJWufkBgrKPsWhyWAgeyqQI0hhbE42WgAYliV9lkCZ X-Received: by 2002:a17:906:22d4:: with SMTP id q20mr19444277eja.54.1616414217478; Mon, 22 Mar 2021 04:56:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616414217; cv=none; d=google.com; s=arc-20160816; b=JYckyXIJIZRGlw8w+oZIPX2Fmq0wkfQZfXrO1K3nhL+r4zcKDhhXPmgMq0s6YLNILS UKVLmBW2dqiZr2Ez2YetMfIuqE0Tpxkbk/BfZpN5wmvYPeRcqNiL9ZSLIqLOwqT0Wlul /gpbAORomyB6fRagHHC/uF5fgAKDhJqXnFF5b0hcbOPyxoSTvHwWwQm3pzzfw57P2yer kR7T2uQhNplARUU4NbkGK3EQLf2OOM62aDzhKSkbgwFnotPe5mbzw1lpAvgp9k/Ozgmu W+22JGOBNDhe0iulFCBvMDrAgRnFpM/yP/xNBKAj3KJHtlDXa6OvRGoZwckI5uX4uxkU FtRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Sof77bKVE4TGYcPTj/98bPIUnZaj4Q0920jtL7B++kM=; b=N+Ht6PJXd2V6TnWjUMPlE2OTw4aeXeBwFe8zZpSFEmwqvbyG/ncAQ6GdJApl6yZB9p nMzVTf3JtIyeoB+CZfscXujiI/23pYTHgwYoetqwCzIw7R9fB8NihLXAi07GDbed6moK F21MExtRfun+KIVILopONVlVuyZEzEhoZDjqtI02E7x5MMZwz2jDZDQuubtp5lhltXkR dEg5+faStbD0Yq+Ue9wuLCEZ47jN9GF4Zwr23PcYzdICVZuHGlyKsYFhoBhuxzBdP/qx vLQy8Ry8wVfRl633OyPxlhY8psP6nSIE4z76IRvnc9J25D0RIxlgNOkM+qpXR40zhSOp iMog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e1myS2ra; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si9006635ejq.139.2021.03.22.04.56.34; Mon, 22 Mar 2021 04:56:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e1myS2ra; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230008AbhCVLzZ (ORCPT + 99 others); Mon, 22 Mar 2021 07:55:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:45440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbhCVLzF (ORCPT ); Mon, 22 Mar 2021 07:55:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B672C6198B; Mon, 22 Mar 2021 11:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616414104; bh=NQBKDv/xaUzATP3yqfPz6TIrtay/vvss0zT4f9fjrSI=; h=From:To:Cc:Subject:Date:From; b=e1myS2raWRh96kX7ZJKmiBHBzDIu2m8qv6Ix7gWSD9vrjhn7/vFY0poWWvjq0dmls Bk7F/1R7UOc3oaf9W+ldRUhOmIUO6c4oLAYCqlE+OYOq5iLrf6chM6jT3yGn4oUZ4D 68aT/Eg56zDIlJ3ZVSqMuu/AH0S0qpvWF//xs6wodR9wgKEE2FhqbFbsp5tx/qfuz4 vhvWBJca31stzUgCzR7csVRzFD/ELTuPOl1uTt+fSDO9kop2sHHKqQiAHSM9r50rZo 0IvOArywDi2AnNEd6XUlKdtCUTIodPsZJmGmyTVaxoxc5FA8cPB7Sjwpu4jgAaYfKv dHja6Dr5uYO1Q== From: Arnd Bergmann To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter Cc: Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Lee Jones , Chen Li , Tom Rix , Sonny Jiang , xinhui pan , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH] amdgpu: avoid incorrect %hu format string Date: Mon, 22 Mar 2021 12:54:42 +0100 Message-Id: <20210322115458.3961825-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann 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 --- 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; -- 2.29.2