From patchwork Wed Dec 15 14:05:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 524279 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp372383imb; Wed, 15 Dec 2021 06:06:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqOuk8jVj5vpnH2Zs4luOJw8z+w+n4hbPTXYk3OWTDx0Xo3T87irWURMyMNHE8OYoM06gi X-Received: by 2002:a17:90b:344a:: with SMTP id lj10mr11865667pjb.153.1639577162884; Wed, 15 Dec 2021 06:06:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639577162; cv=none; d=google.com; s=arc-20160816; b=l//1C/icQ/3GMBcbE3nJzwoefTqKtZQ5zlfiPmd826QiJJOq83vP5PBZKxi2KFfaaG 8JT6FJyhx3RHgI5vaTBgr7RVhzUXyujRbUdODlnr8gXspF9leOJeMbPE9JlAHMoDK0/E 6Vh3D772ag+SE8wYjUP1WWf7602tp7TZ8fK6kP88m2jxd6cqGoEBFQZcuwB3GrCsQjSb rOzUNqacQl6/oi/EY0VwO37NM7YftFIq8aBoDx2ibVmgm3goah8IQyZEse8RdNqCX62X 85b4D8i1nb1yRqbYramzk1ioiggoldLS3Ujc++2NEHADwwa9DY8Pmfay3EoucQI91xaA t1lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :delivered-to; bh=Q78Lhbsw4N1QZ3hX51Ax7erAEDPuBPHWO5IcJ21mRlM=; b=b6E22/neTr18EpMETFSmha+6UTCcRHAC6uoECYLRLFzwU0L9UKLmJkG9T4QaeAtorK RXmJ661Zs6o0EprxolMtMaDQb8D+Lu3nJC+B53h8qU5GkjY5YEV9LqoJbPerZiCHEHab hrLCkn0F63hQdXpB2gZQe3NFQKvJNs6ajPt9BpNRVs1tsi1jhSLXJiJ/1YW4e5Dl8AKH +ZtEz94KyFN7WeGPrgF4zs22ZAr3djpzqw8iuzE4i2h6vsnyKfYrAQ1jp9048/BRjRPC RO2gGXVMpSv16QMpvREKloeAAMiMkse1j/MhNvcN6fE+Wi9ROaZKh/MGeaRb9/kOrjPh dCrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=HiTkbhY7; 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 k71si1900485pgc.223.2021.12.15.06.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 06:06:02 -0800 (PST) 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=fail header.i=@kernel.org header.s=k20201202 header.b=HiTkbhY7; 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 60F6510ECFF; Wed, 15 Dec 2021 14:06:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6BE5610ECF8 for ; Wed, 15 Dec 2021 14:06:00 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 056FD618D3; Wed, 15 Dec 2021 14:05:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 959A7C34604; Wed, 15 Dec 2021 14:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639577157; bh=1NuavhntQUo/VcwMMfGjnpaSHV6QBbtUfg21sOkWXoM=; h=From:To:Cc:Subject:Date:From; b=HiTkbhY7CsTUo50jbkpMqVTBPIqvuxsXgNd1VD6uOEB3qthX27PgoUzer/QZ9dy5r g0gzDcoUF+T4WpOwOpKPYCCXuzRbqyyzTCjVWp8bquSrTxHRG6HVNYoo2uqg2jP9lb g4tFnIgmw2PYrIWFHtIn7e92c5CGex02DmglizF08OK0HbLKRBN284Nkg6cQranbiU uvSIFkp+qmQ59VuiAoTOiIGX9W+5mEfsBLkQ67ImufLJYk58sxBcfxbG9atzkVj0tM +W8itCY4AaVhHM6Z+P3MP1XmM8Hus3ZLT3HvDui84JgkQTuw4ei2ZDRV7UNV3mKSjQ nOa2kGPo/x1lQ== From: Arnd Bergmann To: VMware Graphics , Zack Rusin , David Airlie , Daniel Vetter , Martin Krastev Subject: [PATCH] drm/vmwgfx: fix size_t format string Date: Wed, 15 Dec 2021 15:05:40 +0100 Message-Id: <20211215140552.581719-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: dri-devel@lists.freedesktop.org, Arnd Bergmann , linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann On architectures with size_t different from 'unsigned long', gcc prints this warning: drivers/gpu/drm/vmwgfx/vmwgfx_gem.c: In function 'vmw_bo_print_info': drivers/gpu/drm/vmwgfx/vmwgfx_gem.c:230:40: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] 230 | seq_printf(m, "\t\t0x%08x: %12ld bytes %s, type = %s", | ~~~~^ | | | long int | %12d 231 | id, bo->base.base.size, placement, type); | ~~~~~~~~~~~~~~~~~~ | | | size_t {aka unsigned int} Use the correct %zd modifier. Fixes: 8afa13a0583f ("drm/vmwgfx: Implement DRIVER_GEM") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/vmwgfx/vmwgfx_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c index c016c434b6cb..3d4d703b20a8 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c @@ -227,7 +227,7 @@ static void vmw_bo_print_info(int id, struct vmw_buffer_object *bo, struct seq_f break; } - seq_printf(m, "\t\t0x%08x: %12ld bytes %s, type = %s", + seq_printf(m, "\t\t0x%08x: %12zd bytes %s, type = %s", id, bo->base.base.size, placement, type); seq_printf(m, ", priority = %u, pin_count = %u, GEM refs = %d, TTM refs = %d", bo->base.priority,