From patchwork Mon Jun 17 18:42:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 13701273 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6A05C27C79 for ; Mon, 17 Jun 2024 18:43:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F10310E4B9; Mon, 17 Jun 2024 18:43:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="FRhbV00O"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 792F910E4B9; Mon, 17 Jun 2024 18:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718649789; x=1750185789; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yuygjAhYKn4Hc233ao6B5BgQp2ulQztEsYf2DIp6rkw=; b=FRhbV00OeW0weK9zjud/nNg/5vlYTqHp6aCwXG1QB/SDzkOG516fb6lN W7vDI9rTjQ6McZza8GG4Q2evY7593ohtleFYNqEHH8BQJLPiPyy3osjhL wnaInLifvIBo/WcwZDzh4vTWOAw3SV6ksY6g79ntjG0JXAD7W0stlOhtD Ce0Cpfwe2YLkSgiDM4xuycXLbYnu7ExewITcu8vSZK4YWr7WsKCNk4Sov krIf3Z1qWd4WVLXZB7OlqFDBrY2nWqwMlcc56PJ7tQ8b49QzeOLAKToCy KYz3sjeRjdiltInx7Owrpzm8nii2Ec34Ufgl/WVAfRsKkgF96PR+rgo3J g==; X-CSE-ConnectionGUID: L3f/FA7pT4OM+q+TYzknwA== X-CSE-MsgGUID: /2+r1clgSoWR1kHg3VS0ww== X-IronPort-AV: E=McAfee;i="6700,10204,11106"; a="15726690" X-IronPort-AV: E=Sophos;i="6.08,245,1712646000"; d="scan'208";a="15726690" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2024 11:43:08 -0700 X-CSE-ConnectionGUID: PlO+AN+mQEyyctBsmS4W9w== X-CSE-MsgGUID: pp+5bcpURqyvR0pfvLIUSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,245,1712646000"; d="scan'208";a="41213641" Received: from fdefranc-mobl3.ger.corp.intel.com (HELO intel.com) ([10.245.246.127]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2024 11:43:06 -0700 From: Andi Shyti To: intel-gfx , dri-devel Cc: Andi Shyti , Jonathan Cavitt , Lucas De Marchi Subject: [PATCH v2 2/2] drm/i915/gem: Use the correct format specifier for resource_size_t Date: Mon, 17 Jun 2024 20:42:43 +0200 Message-ID: <20240617184243.330231-3-andi.shyti@linux.intel.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240617184243.330231-1-andi.shyti@linux.intel.com> References: <20240617184243.330231-1-andi.shyti@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Commit 05da7d9f717b ("drm/i915/gem: Downgrade stolen lmem setup warning") adds a debug message where the "lmem_size" and "dsm_base" variables are printed using the %lli identifier. However, these variables are defined as resource_size_t, which are unsigned long for 32-bit machines and unsigned long long for 64-bit machines. The documentation (core-api/printk-formats.rst) recommends using the %pa specifier for printing addresses and sizes of resources. Replace %lli with %pa. This patch also mutes the following sparse warning when compiling with: make W=1 ARCH=i386 drivers/gpu/drm/i915 >> drivers/gpu/drm/i915/gem/i915_gem_stolen.c:941:5: error: format '%lli' expects argument of type 'long long int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Werror=format=] Signed-off-by: Andi Shyti Cc: Jonathan Cavitt Reviewed-by: Lucas De Marchi --- Cc: Lucas De Marchi drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c index 9ca73936dc5e..d29005980806 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c @@ -938,8 +938,8 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, u16 type, dsm_base = intel_uncore_read64(uncore, GEN6_DSMBASE) & GEN11_BDSM_MASK; if (lmem_size < dsm_base) { drm_dbg(&i915->drm, - "Disabling stolen memory support due to OOB placement: lmem_size = %lli vs dsm_base = %lli\n", - lmem_size, dsm_base); + "Disabling stolen memory support due to OOB placement: lmem_size = %pa vs dsm_base = %pa\n", + &lmem_size, &dsm_base); return NULL; } dsm_size = ALIGN_DOWN(lmem_size - dsm_base, SZ_1M);