From patchwork Thu Aug 29 15:58:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13783393 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 C8AADC83F16 for ; Thu, 29 Aug 2024 16:00:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2113D10E71C; Thu, 29 Aug 2024 16:00:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="GkqbmM/h"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id D329010E71C; Thu, 29 Aug 2024 16:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724947202; x=1756483202; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZVhy00hR+PCS3Oja2q7T0ClCf3oyBQZQu1h8s4wBumA=; b=GkqbmM/hwzgnmteF9FbKhF39TA1Hrca0DZ3IHMlLLR1vzAwjLjohhkh2 pJaHhKSd33YHYTyBmRCpLzazcJuFjVh7owQia1gQzGpFYIjzSuhGS6Rtn f+Xx7MzWFBS35M01fWjOj1kUhwsmqyZAd7EBpC3fFZ7WLwPHk8tP2zOJ7 qTpHrWusVYd7t34KLBA6FNMW6dtJ/4QlCIWJOzwTHTA2nqr5GsnohlE1U BikaoIqK44fjlyrYLjzXOafUCFo9DAZ+iI+/qwBukCdSYm9/NgstTjsO/ zG57R7okYDGMcX7RK3LHpoUCtn0Jui/PxspVJRCSMox4OsE5b7nzD0TYM Q==; X-CSE-ConnectionGUID: wtaHu8HdTP2vfrOQy1T5Hg== X-CSE-MsgGUID: Spd3IabDRKeJ0IYf1y4eug== X-IronPort-AV: E=McAfee;i="6700,10204,11179"; a="27313781" X-IronPort-AV: E=Sophos;i="6.10,186,1719903600"; d="scan'208";a="27313781" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2024 09:00:01 -0700 X-CSE-ConnectionGUID: TPDw9tJfSQ+wBECcZqVJLQ== X-CSE-MsgGUID: V5v7svFgR5GHF5c6OuY6DQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,186,1719903600"; d="scan'208";a="63455322" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa010.jf.intel.com with ESMTP; 29 Aug 2024 08:59:58 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B4F35143; Thu, 29 Aug 2024 18:59:56 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter Subject: [PATCH v1 1/2] drm/i915/fence: Mark debug_fence_init_onstack() with __maybe_unused Date: Thu, 29 Aug 2024 18:58:37 +0300 Message-ID: <20240829155950.1141978-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240829155950.1141978-1-andriy.shevchenko@linux.intel.com> References: <20240829155950.1141978-1-andriy.shevchenko@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" When debug_fence_init_onstack() unused, it prevents kernel builds with `make W=1` and CONFIG_WERROR=y: .../i915_sw_fence.c:97:20: error: unused function 'debug_fence_init_onstack' [-Werror,-Wunused-function] 97 | static inline void debug_fence_init_onstack(struct i915_sw_fence *fence) | ^~~~~~~~~~~~~~~~~~~~~~~~ Fix this by marking debug_fence_init_onstack() with __maybe_unused. Fixes: 214707fc2ce0 ("drm/i915/selftests: Wrap a timer into a i915_sw_fence") Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/i915_sw_fence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c index 8a9aad523eec..d4020ff3549a 100644 --- a/drivers/gpu/drm/i915/i915_sw_fence.c +++ b/drivers/gpu/drm/i915/i915_sw_fence.c @@ -51,7 +51,7 @@ static inline void debug_fence_init(struct i915_sw_fence *fence) debug_object_init(fence, &i915_sw_fence_debug_descr); } -static inline void debug_fence_init_onstack(struct i915_sw_fence *fence) +static inline __maybe_unused void debug_fence_init_onstack(struct i915_sw_fence *fence) { debug_object_init_on_stack(fence, &i915_sw_fence_debug_descr); } @@ -94,7 +94,7 @@ static inline void debug_fence_init(struct i915_sw_fence *fence) { } -static inline void debug_fence_init_onstack(struct i915_sw_fence *fence) +static inline __maybe_unused void debug_fence_init_onstack(struct i915_sw_fence *fence) { } From patchwork Thu Aug 29 15:58:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13783392 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 BF15CC83F2D for ; Thu, 29 Aug 2024 16:00:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12BA010E71B; Thu, 29 Aug 2024 16:00:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="MO/vLSM1"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id B64BE10E71B; Thu, 29 Aug 2024 16:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724947201; x=1756483201; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kIbeBcvklRZnAUyEaogr4BsfGsKIwHXOjt9dIl1120s=; b=MO/vLSM1Vg/cuxXQt9mmkEwZYQJNqqV63DrZeU/aI+zxp8VMSwPy2OVa te4YhR0RmQr0eTPh9O334Ai0mMN5VgFijq3LzAR12WwH8E3yzMdUgKQL0 Nt5x43NsW2R6UsrGxpiLhc6qJF5FyKu2z/JKDX7Bzv6t28a7ybOJntXDe fNh4QYOVTfnNgf/TFBJps5ygHV8ZTMvEOdo9fZ4KOWNdTZKvvDvuqgj01 hTBS1kmBqYEcQEw2bEH3SKwa/ppIhV7nPoGK9znp0lsNXAzdwRczS4QhE f541M8pRZfri6n2rVwGF01FjhV0czSXytXQjA0kMcutQEaN41N+IosEjE Q==; X-CSE-ConnectionGUID: UA/qxn23TZiaiinMhj1DZQ== X-CSE-MsgGUID: IzPVuKGESWufEmAp0QeWpA== X-IronPort-AV: E=McAfee;i="6700,10204,11179"; a="27313790" X-IronPort-AV: E=Sophos;i="6.10,186,1719903600"; d="scan'208";a="27313790" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2024 09:00:01 -0700 X-CSE-ConnectionGUID: U1FTIqQYQ8ujxx5ZZCRvEA== X-CSE-MsgGUID: YliLZ7OsQvaylZ8R7B+OmA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,186,1719903600"; d="scan'208";a="63455324" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa010.jf.intel.com with ESMTP; 29 Aug 2024 08:59:58 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C22D8956; Thu, 29 Aug 2024 18:59:56 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter Subject: [PATCH v1 2/2] drm/i915/fence: Mark debug_fence_free() with __maybe_unused Date: Thu, 29 Aug 2024 18:58:38 +0300 Message-ID: <20240829155950.1141978-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240829155950.1141978-1-andriy.shevchenko@linux.intel.com> References: <20240829155950.1141978-1-andriy.shevchenko@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" When debug_fence_free() unused, it prevents kernel builds with `make W=1` and CONFIG_WERROR=y: .../i915_sw_fence.c:118:20: error: unused function 'debug_fence_free' [-Werror,-Wunused-function] 118 | static inline void debug_fence_free(struct i915_sw_fence *fence) | ^~~~~~~~~~~~~~~~ Fix this by marking debug_fence_free() with __maybe_unused. Fixes: fc1584059d6c ("drm/i915: Integrate i915_sw_fence with debugobjects") Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/i915_sw_fence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c index d4020ff3549a..1d4cc91c0e40 100644 --- a/drivers/gpu/drm/i915/i915_sw_fence.c +++ b/drivers/gpu/drm/i915/i915_sw_fence.c @@ -77,7 +77,7 @@ static inline void debug_fence_destroy(struct i915_sw_fence *fence) debug_object_destroy(fence, &i915_sw_fence_debug_descr); } -static inline void debug_fence_free(struct i915_sw_fence *fence) +static inline __maybe_unused void debug_fence_free(struct i915_sw_fence *fence) { debug_object_free(fence, &i915_sw_fence_debug_descr); smp_wmb(); /* flush the change in state before reallocation */ @@ -115,7 +115,7 @@ static inline void debug_fence_destroy(struct i915_sw_fence *fence) { } -static inline void debug_fence_free(struct i915_sw_fence *fence) +static inline __maybe_unused void debug_fence_free(struct i915_sw_fence *fence) { }