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 2DED681ADA; Tue, 3 Dec 2024 15:43:19 +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=1733240599; cv=none; b=q1ckk5OE8reT7YB5qM8hdB1mrH3BopIjC5Mf60+R/bIeXudRiYaA/wLLAUizUxiFEwBTs9Zq1U9JJHPlj7LtM1hWwbKCs9PDE0QT1jclAz48FYmSbIR4d54RM+cNVu0iLB6jiV8D62PUsIhgMra6XUUpzi9LthpYehAxd2AUrdc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733240599; c=relaxed/simple; bh=/5Y0Po6YBZqQtrCTHmbVxnnzAgL1rYu6SQgh2yREQ8U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BRSkATWP1oumNzFYBm6VXiYKf+vwE9h4Es0wPhTqFVrFMjVeZLbR71xKLHiXhAbAQGV0TygXW2dxL4Fwc1DVeIU6MajikGtg2NuOnvvQ+djs1kpKaattlvE3jGfhEycj3LU+O8gEwo7nz37FLgLKkSTRbIao6IK0RH2xtNbhZXQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Rr2KJIV5; 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="Rr2KJIV5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9936C4CECF; Tue, 3 Dec 2024 15:43:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1733240599; bh=/5Y0Po6YBZqQtrCTHmbVxnnzAgL1rYu6SQgh2yREQ8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rr2KJIV5OCe48+0BwGoLTzg8qp1mCVdlJG8KssJ6WX6KeYmvh1IULLlpdAdwVjpl6 sgD+2M1yt79Dlhj6gT/s5iJ/onm1bDSK9sqQ9xjVU7bOjZPElYWFGWglYft4sV+yFV 613KOn0rtMFWorFJ7M1U7CKUQPqUL+gi8g8NIb8M= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andy Shevchenko , Jani Nikula , Sasha Levin Subject: [PATCH 6.12 183/826] drm/mm: Mark drm_mm_interval_tree*() functions with __maybe_unused Date: Tue, 3 Dec 2024 15:38:30 +0100 Message-ID: <20241203144750.879846411@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241203144743.428732212@linuxfoundation.org> References: <20241203144743.428732212@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andy Shevchenko [ Upstream commit 53bd7c1c0077db533472ae32799157758302ef48 ] The INTERVAL_TREE_DEFINE() uncoditionally provides a bunch of helper functions which in some cases may be not used. This, in particular, prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y: .../drm/drm_mm.c:152:1: error: unused function 'drm_mm_interval_tree_insert' [-Werror,-Wunused-function] 152 | INTERVAL_TREE_DEFINE(struct drm_mm_node, rb, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 153 | u64, __subtree_last, | ~~~~~~~~~~~~~~~~~~~~ 154 | START, LAST, static inline, drm_mm_interval_tree) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by marking drm_mm_interval_tree*() functions with __maybe_unused. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Fixes: 202b52b7fbf7 ("drm: Track drm_mm nodes with an interval tree") Signed-off-by: Andy Shevchenko Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240829154640.1120050-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jani Nikula Signed-off-by: Sasha Levin --- drivers/gpu/drm/drm_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index 5ace481c19011..1ed68d3cd80ba 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c @@ -151,7 +151,7 @@ static void show_leaks(struct drm_mm *mm) { } INTERVAL_TREE_DEFINE(struct drm_mm_node, rb, u64, __subtree_last, - START, LAST, static inline, drm_mm_interval_tree) + START, LAST, static inline __maybe_unused, drm_mm_interval_tree) struct drm_mm_node * __drm_mm_interval_first(const struct drm_mm *mm, u64 start, u64 last) -- 2.43.0