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 EF6441D5142; Wed, 19 Mar 2025 14:37:15 +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=1742395036; cv=none; b=b9+r0MwaTnN+xSWcxwr/H7gSmbB4Bxt4EzRDFklgY7+KdJVIsybuHdtAFCHEZ307bEw19xjt3hsmF8lEMiuA3aaEDzTKg2IQxdzM/4p2StxyyGSoK/9qx68Wum2di+yoSdg3x4VD910MsshazdmgYK4LMN0TpAk7eo9kbgNd4dE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742395036; c=relaxed/simple; bh=e5gOWpPwqQRAadWtxvbsU+HmaWvBUXJEs0vHohPNprs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oMAIRUrbhH+XahLzL6SKB2Di0wnfqSdkybxeBAZ0JUwS++0rpLs/Xmd4Q7GP0L2CCD0Q84jC12CNDEu06cvgOMKutrNBWiI78pfQKgr4cFJU+K8xM4pAQJdPVhJCxa+0iREhV9t0wvpgnX7wKwq9ZcEG17wPt5VniY2pSNMm4Ic= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DB/Qs1H2; 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="DB/Qs1H2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C437FC4CEE4; Wed, 19 Mar 2025 14:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1742395035; bh=e5gOWpPwqQRAadWtxvbsU+HmaWvBUXJEs0vHohPNprs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DB/Qs1H2v8z9Xi07jknXJW38Mv3ao+nNrN+0VTEVG8BHLhVt3molP0WhQ5XuJ2le9 rbJyI9qryuRvOLZnJDmhIaqhWe2KQgLdwcjrndn1nHMRxRo58yAciBenDvgKPKCF+w 54elr8CxoOOIjlGduZPbMfOvdw9mAS1Pe2cnrai4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andy Shevchenko , Thomas Gleixner , Sasha Levin Subject: [PATCH 6.12 058/231] hrtimers: Mark is_migration_base() with __always_inline Date: Wed, 19 Mar 2025 07:29:11 -0700 Message-ID: <20250319143028.257810843@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319143026.865956961@linuxfoundation.org> References: <20250319143026.865956961@linuxfoundation.org> User-Agent: quilt/0.68 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 27af31e44949fa85550176520ef7086a0d00fd7b ] When is_migration_base() is unused, it prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y: kernel/time/hrtimer.c:156:20: error: unused function 'is_migration_base' [-Werror,-Wunused-function] 156 | static inline bool is_migration_base(struct hrtimer_clock_base *base) | ^~~~~~~~~~~~~~~~~ Fix this by marking it with __always_inline. [ tglx: Use __always_inline instead of __maybe_unused and move it into the usage sites conditional ] Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250116160745.243358-1-andriy.shevchenko@linux.intel.com Signed-off-by: Sasha Levin --- kernel/time/hrtimer.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index d116c28564f26..db9c06bb23116 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -156,11 +156,6 @@ static struct hrtimer_cpu_base migration_cpu_base = { #define migration_base migration_cpu_base.clock_base[0] -static inline bool is_migration_base(struct hrtimer_clock_base *base) -{ - return base == &migration_base; -} - /* * We are using hashed locking: holding per_cpu(hrtimer_bases)[n].lock * means that all timers which are tied to this base via timer->base are @@ -312,11 +307,6 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base, #else /* CONFIG_SMP */ -static inline bool is_migration_base(struct hrtimer_clock_base *base) -{ - return false; -} - static inline struct hrtimer_clock_base * lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) __acquires(&timer->base->cpu_base->lock) @@ -1441,6 +1431,18 @@ static void hrtimer_sync_wait_running(struct hrtimer_cpu_base *cpu_base, } } +#ifdef CONFIG_SMP +static __always_inline bool is_migration_base(struct hrtimer_clock_base *base) +{ + return base == &migration_base; +} +#else +static __always_inline bool is_migration_base(struct hrtimer_clock_base *base) +{ + return false; +} +#endif + /* * This function is called on PREEMPT_RT kernels when the fast path * deletion of a timer failed because the timer callback function was -- 2.39.5