From patchwork Mon Mar 22 11:54:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406106 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3498000jai; Mon, 22 Mar 2021 04:55:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvf05VP1ZuY4zqMJk4hnpC9YLKPH6vMy6jFMfZRTS7I7vVEbssib7Om35anCDw7MSG6e9N X-Received: by 2002:a17:90a:9f43:: with SMTP id q3mr13149253pjv.50.1616414112526; Mon, 22 Mar 2021 04:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616414112; cv=none; d=google.com; s=arc-20160816; b=TrUjMxqq7LEIv8jZnvzS1DbGDXxOlm/GK7pRa3yvhEUK6acEr4NgDh4gHzYi+4ZPDu 6OqJooMOeoHhkNto7p1JiqCCfUgp7K4RaikA0K/rVAzqGvCDztz3SPHVo1KbRZCIVSCi dkVH9rAGjZ7kaNWuoNe4qrdVGVFmYLQXWwxV0BuhgGerDLz1D48GcTGwNN/JCNPioO4I WWQhC7Rprx8ZHmTnM8p6duB8Z8RMClelduUlzlVTjuuV1gbfWT7nnMdcziwAPIhyDlyl IeLmkjK1p/dM5tUSdRklMvUcapKIE9epMCTMkFSXqEQti6EgFL9aWMjC88YLFTmmnFnY 3b1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=yfS0fXUnQaqhtpf7hAAyKVKtDEPwQaDavl9cn24HwIE=; b=yNumU9wM728j+06OWIANTF1vcKEbac6qqnHTeorNEbQr9Xg8ft6H/naShucVGsRXlw kbiajWGG5j35L2qJJP2P1by8OG8m40PnxyQQIaIclGyLuryiyFLffUB7enNaZ5rvAUTv YFZW0yDdUIiG0G+T9JuQv20pbymffhdFq2FNisQiE9ejyINM3PZ+H4PmRp05uASFusGG x9209xfEbxs4KXkRUwV6qcSX0Nu+wNzEZTF6Xpfj1aAgUKpr2+a93bTe8mSPC4hKBibN AjITlPpW/SithSthLY6xHvscbSHXMRVFlZJnip7FH3aVxdQB4QnFYAMK8ps5wz+5G+25 KmFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=e1myS2ra; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id t22si14184454pgv.74.2021.03.22.04.55.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Mar 2021 04:55:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=e1myS2ra; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C04789E50; Mon, 22 Mar 2021 11:55:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9AF5989E1D; Mon, 22 Mar 2021 11:55:06 +0000 (UTC) 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_K=C3=B6n?= =?utf-8?q?ig?= , David Airlie , Daniel Vetter 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sonny Jiang , Arnd Bergmann , Tom Rix , dri-devel@lists.freedesktop.org, xinhui pan , Nick Desaulniers , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Nathan Chancellor , clang-built-linux@googlegroups.com, Chen Li , Lee Jones Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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(-) -- 2.29.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Reviewed-by: Christian König Reviewed-by: Tom Rix 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;