From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A332144D1A; Tue, 10 Sep 2024 10:47:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725965249; cv=none; b=WudAbq+IWvZbzzMgidUKvgREy3uECG3Ub9rE8B+ZKvWyAdKBs7W0wv29c7+Z4YUIxy70lZkKa5+gSqLfoJTYVEqjZ0jEUsnS99esM9tuGTvE0xLh6HMmK9B9NneFOH78EAtVUWRcPyu9CvgpOwRXy+BBWLgNzbdTzf8dD/inBjU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725965249; c=relaxed/simple; bh=IMpyHqWk+pId3qgZdHWUYdZcEmIodC1/i1OaqEYN1E8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tO9Y7VEr4GeKoHDGJF7bbdfCPT6RUiVIkSieoc2Q2k/5rwhi9cP54AxBIRUgn/yQ9jxmoXzl0+Elf2twq7Kt8IXmfmuGDPueyNSobKb+eIB/5+wyGjCXxF1wjBGyzPQBK3c7FPgPxJ5DMnxDG7P7dtladdRcSSLrZYxwFoefA7g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BxMDP1Yr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BxMDP1Yr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B708CC4CEC3; Tue, 10 Sep 2024 10:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725965249; bh=IMpyHqWk+pId3qgZdHWUYdZcEmIodC1/i1OaqEYN1E8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BxMDP1YrrNZiLnm3G+5UlLblr4BOxnqkmCyOOc8rcVnT3fTD7aV3vUGIY4PKUvaYa dkIkw8UPo+5lx3VSqv1UMBNbsBPjuY4it/3GcTZ3KwxmxJVN8Nm+XCFJvkx8xuF+JN x8TB6/OvesjCcze68kcgI2ROfzfMFiq+DlutOlCM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andy Shevchenko , Jani Nikula , Joonas Lahtinen , Sasha Levin Subject: [PATCH 5.10 180/186] drm/i915/fence: Mark debug_fence_init_onstack() with __maybe_unused Date: Tue, 10 Sep 2024 11:34:35 +0200 Message-ID: <20240910092602.043351424@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240910092554.645718780@linuxfoundation.org> References: <20240910092554.645718780@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andy Shevchenko [ Upstream commit fcd9e8afd546f6ced378d078345a89bf346d065e ] When debug_fence_init_onstack() is unused (CONFIG_DRM_I915_SELFTEST=n), it prevents kernel builds with clang, `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. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Fixes: 214707fc2ce0 ("drm/i915/selftests: Wrap a timer into a i915_sw_fence") Signed-off-by: Andy Shevchenko Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240829155950.1141978-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jani Nikula (cherry picked from commit 5bf472058ffb43baf6a4cdfe1d7f58c4c194c688) Signed-off-by: Joonas Lahtinen Signed-off-by: Sasha Levin --- 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 038d4c6884c5..1c4498c29f25 100644 --- a/drivers/gpu/drm/i915/i915_sw_fence.c +++ b/drivers/gpu/drm/i915/i915_sw_fence.c @@ -44,7 +44,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); } @@ -87,7 +87,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) { } -- 2.43.0