Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0198349CE0 for ; Thu, 25 Jun 2026 14:09:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782396549; cv=none; b=OGChw1PlPPPBmrKN9il3KRyX1HYVxi1Zi++niZvhWnxOWAcvp6dh88L13zigmpacKbSYml0j/cGUOxQQGRb1iQk57QYTIOkzuyHAY+903yZxdlkokBLgD020kty9bsqZMrbXWsWykHBzdurk9Yv4EEslZYEJQoPkN75xmk9mDEo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782396549; c=relaxed/simple; bh=u1GqsQUgM5S0xIMioqn4xoDFam1TWvwpYyQnq4ploWY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XO+HVi+C8szAfAom9HSg4j7fv8gxfzKdvWRdC/mT9Pgc6Ti7+TN166XqcMVmum/dRKBLflqhK9xnmgG0EsIHta1TnkvUS9TOb3CrZVB17tmYN/+1O7jxu/VXBGlDcPK3mAIs7ejVonT+rnNDvhTMBd2tW1vO6fI1xuj6OFcIrz8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=p24kGGRa; arc=none smtp.client-ip=209.85.215.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="p24kGGRa" Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-c8894387780so888576a12.2 for ; Thu, 25 Jun 2026 07:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782396547; x=1783001347; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=k+7ebsbEdoiZziTm7kV9pJ5v/IXxi8IWsEOqYVOWRzg=; b=p24kGGRaON2thm8UYOuIrkU58EjecMu2CfzjPRhykAZEbGWS/IQHPSbeVg+0hOYKvn zPpFaXG/AAHlrVVu5lkSqOHClRSHSinrOlU8fKfcAv9hXEJaLbeazF/WpygNJb3i7uDA 6hIksxfJOZDv3bjQ4t7AZM0E4g7FZCPb64ghHwnzHicEqqGORLJ92oJFY7cqS1JQb+mm /W8PhnQU5oyh+AVFsRTPpDzpocgmZc+TnXan6YlUO9ugr9SMcnGZesRxIrgZUBb7dgkj 5ZoJass1dKelF43MCJTjw4lnduYgKsbLSh5k1SjhIGKE0pIRqxwIDgI2VQMD3GhWB+s3 brIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782396547; x=1783001347; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=k+7ebsbEdoiZziTm7kV9pJ5v/IXxi8IWsEOqYVOWRzg=; b=SAJuSforGWQ7EAdmuh0D2sYKviNHtiC0gMFXQPILn9kdoUMJs5inaGzDapEMiK6H1J af0O6gOo0U+LJeBZTBoO5bnvI3dagu7Hr4iybKxe5yd/fTyAeHylVvpZ2YfdAZObUpon tiWxnuFoPtnqbxO+9Guec4qZv9sXxkq/TjPSSH529l3zuofEZGrCuRlobbK5mYa3ORMY /N7P2LvnixdWU3bmzGXYlbmGN+ZSRlnXXggA3NmGweuG0k5X9VYHJF4LDQDR23+wK+yj S6ZLjtXJYe1KmWl4gpGXS81mFVY6Ji6DtqYIMJND0d7R5/7IgXV+mgz/T7b8eXIhMg7B 3DlQ== X-Gm-Message-State: AOJu0YyUy9J28pZ9TobUlwQsL191wm3GnD07IstaY6JhQWno5rcz2/6O 51JMLxvvpG4I3arrVmxvbz80pwV4zHrzLdAqolqK12iETkEgQQQjOBn0 X-Gm-Gg: AfdE7clUFEwhFxL4jBhJ6VutIRAMZKegtUQ9iLHr0AC0KXVEUXltoJWM+Lo9rPttEBO LdXJTajRqpwCpw7KS3pVuVPE6vaODNE1MpgPiVNcMk2iRZb4LQV+Z002vl0g0B1Y8xCEIYgWKZW +GuJiPeHE5FeQ9flVK9yTfROBJ+22VZTUdY8c8d/1QltRHMFGAt+WHgzBq5dW6heL+LwrXQzigc B4s8hzvXIBeLPqHzqAo1g6JXbDHimof95sAdInj+PsHehdZL82qI2RMcUgOyCwZkM/OXzHdTQTV XbxvZAnyLnw+o4k05AK5ZLtvBflgoCbTwg8yi2TPRyY9LhnPBfLNKOxunzKL7bUIeQoJ1oWxgRU xSCVTFEUmI402q7uVrgwTHQUh3OJszaNE7zVwdgoIKqW0oBqMW12kq9l/uOkUuRz/M8EEf68t2W puj2qfk4DF/rsYiJQ5e16AqsU= X-Received: by 2002:a05:6a20:d52c:b0:398:9662:10ff with SMTP id adf61e73a8af0-3bd4ac04201mr3792249637.4.1782396547070; Thu, 25 Jun 2026 07:09:07 -0700 (PDT) Received: from osman.mioffice.cn ([43.224.245.178]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c92b96eb8d6sm1720222a12.6.2026.06.25.07.09.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 07:09:06 -0700 (PDT) From: Zhan Xusheng X-Google-Original-From: Zhan Xusheng To: Thomas Gleixner , Anna-Maria Behnsen , Frederic Weisbecker Cc: linux-kernel@vger.kernel.org, Zhan Xusheng Subject: [PATCH] hrtimer: Remove unused clock_base_next_timer_safe() Date: Thu, 25 Jun 2026 22:09:01 +0800 Message-ID: <20260625140901.929554-1-zhanxusheng@xiaomi.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit clock_base_next_timer_safe() was added by commit a64ad57e41c7 ("hrtimer: Simplify run_hrtimer_queues()") but has never had a caller; the queue iteration in __hrtimer_run_queues() uses clock_base_next_timer() instead. The two are functionally equivalent: struct hrtimer embeds its timerqueue node at offset 0, so container_of() of a NULL node yields NULL. Thus clock_base_next_timer() already returns NULL on an empty queue and the explicit NULL check in the _safe variant is redundant. Being a static __always_inline function it does not trigger -Wunused-function, so the dead code has gone unnoticed. Remove it. No functional change. Signed-off-by: Zhan Xusheng --- kernel/time/hrtimer.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 313dcea127fe..2a278ae550a1 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -2060,13 +2060,6 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base, struct hrtimer_cloc base->running = NULL; } -static __always_inline struct hrtimer *clock_base_next_timer_safe(struct hrtimer_clock_base *base) -{ - struct timerqueue_linked_node *next = timerqueue_linked_first(&base->active); - - return next ? hrtimer_from_timerqueue_node(next) : NULL; -} - static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_t now, unsigned long flags, unsigned int active_mask) { -- 2.43.0