Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4324712pxf; Tue, 23 Mar 2021 08:06:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIXlSHcYOPzKG+a5NqSRhEf2VWrYjfLR9cZrb8nGEezNxGLhpBF3v0vasZSbZfkaMs6vYP X-Received: by 2002:aa7:c551:: with SMTP id s17mr5009557edr.291.1616511975218; Tue, 23 Mar 2021 08:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616511975; cv=none; d=google.com; s=arc-20160816; b=obywJ1kC87sBMr0H+9f/kzOxEyMyd874S7/WDI6gBkWNiMsU9hWbFGkpDAQOzxsn26 VWMMAG2Ln44j7GM5zRA/enl4tKzVgglIHf+M2bYedMYyZHn1zCe/IrNwhTvSmtkMopQy V8mLHE4pXCoM4DDJpbT13tatm+QusHb6YJ+QyXdSqMDgVvrq4D57YhGM9hW3iA7W/rbG vTLcdBnvheWnuG32dPYzOwr8ByNPMbLERCrRnZ432791/2YBJQzw+Z2EBpBhJDKLs7fP z8V9t0wC+MGo6rmXW7v1CI+ZhDhMSq7kJ8Yo1m//R48rxn9m3RDNlw2jx9NKmNc7os5n DkVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MVCoKkCqJZzN9wlMxcIT977e4kipSpX9b+GAtdQCUQ4=; b=crefkl02bNSC2wug4+xxvtHX3zr61dYGBeue1Q6fTep9lkEgRDy42WCX2UuInEU2Ja h0QWGfzmQvimJ5t6cEK0rBgJr3FRntnCwYCqCh5rpW52w6GhLJEYN4s3fDbSe1U2ApXB gTxP2ossp0iH07XVVvplz1F6YTJkJes8c2OCAEKQWjmOK8XiZ0Oo6gltVgY+FwXOkgzc au/cJ5RZtjkcQCghdA78RYVvA3HUVPQTOSMrR7wWOtFodkbgUaiJq+3wrlxJRr4jNfli qZPuJADcR89BeWW9iRqbxtyWQ3OG4FUc8oJPf9hMbC1OvdMFpO7Kbn1QMkHdbG2R+vXm VZeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ssWmDwgF; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si13951925edc.63.2021.03.23.08.05.52; Tue, 23 Mar 2021 08:06:15 -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=@gmail.com header.s=20161025 header.b=ssWmDwgF; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232481AbhCWPBV (ORCPT + 99 others); Tue, 23 Mar 2021 11:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232328AbhCWPBF (ORCPT ); Tue, 23 Mar 2021 11:01:05 -0400 Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CB1EC061574 for ; Tue, 23 Mar 2021 08:01:05 -0700 (PDT) Received: by mail-oo1-xc2e.google.com with SMTP id j10-20020a4ad18a0000b02901b677a0ba98so5004738oor.1 for ; Tue, 23 Mar 2021 08:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MVCoKkCqJZzN9wlMxcIT977e4kipSpX9b+GAtdQCUQ4=; b=ssWmDwgF/PsJRaCsBF+KVdRE49iM3WN148ZUTQosDfbZ+9Aj8/5N9+zEI3W87YDkpt hyjP7bptfqS0vNzYScVS0UnJjxGpfSZRQlrqEhqK02F8q2Tjf5ktx8eiEBBZ75eb1zfO A3sMDpeU9Y5SQqTBoMDM1VoSMXeTSLmCaIHylTJtjXGaGu/T1Ayn7EZoJ06IoB72JpN4 wBPPyuoijAsff35VAHRsM22AzRkfs41mHClT9h9XSRnwWrn21fVKQOh+oxAYKvm/ylS5 gqSUBSJo2ujq6UhwEe8jOYQMQsh/B0Nzz/1NNaqbiBJcWSPswwWFJeMDFa13VLFwQHno eOVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MVCoKkCqJZzN9wlMxcIT977e4kipSpX9b+GAtdQCUQ4=; b=UXzNYrFpwrlDJdotDswMWYmYBiILnrFDhG6xO9fJ907JcbC6SXiDRa/OrbC7e8FZsK fPL7FgXgPO7g8ZLVVnky4LpCP7DuiGhig1E2kDpzbHNJjy4RUFJ3EmKlRZiq9D771zMI 5piDzrzVpL1Hi1a8Z8lPUGDtFT2n64bHXpHTdprIqem+nG6KGFAJjaoqVKhctiP2zpx+ oGiW+sl4/O2WhA7thCDDxgUMO3MPa7v6DTWmdm4WYc+Knp2CKQT8tG2EHSUdesA/U+5L ZKPoMmC+/gprdXxPf+wF0qejhfZAnCoHDX2FsBOpqGPS1zoV2Jr8gnk65/SdDnsgxHzZ C5hw== X-Gm-Message-State: AOAM530I1ZPXyW2Ywn/zdtJqU9LhWqlGe42WYgtkmvWG+eKtXxcYLfe8 vnBuSiWtp6rsyz0CVy2BFhjqH/w9QMlB94kege8= X-Received: by 2002:a4a:4005:: with SMTP id n5mr4153901ooa.61.1616511664731; Tue, 23 Mar 2021 08:01:04 -0700 (PDT) MIME-Version: 1.0 References: <20210322115458.3961825-1-arnd@kernel.org> In-Reply-To: <20210322115458.3961825-1-arnd@kernel.org> From: Alex Deucher Date: Tue, 23 Mar 2021 11:00:53 -0400 Message-ID: Subject: Re: [PATCH] amdgpu: avoid incorrect %hu format string To: Arnd Bergmann Cc: Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Airlie , Daniel Vetter , Sonny Jiang , Arnd Bergmann , Tom Rix , Maling list - DRI developers , xinhui pan , Nick Desaulniers , LKML , amd-gfx list , Nathan Chancellor , clang-built-linux , Chen Li , Lee Jones Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Mon, Mar 22, 2021 at 7:55 AM Arnd Bergmann wrote: > > 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 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx