From nobody Sun Jun 14 07:40:50 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 E5856425CC9; Fri, 1 May 2026 19:40:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777664432; cv=none; b=WJzZxPCbmF94wQbxQ//QtcdaJRmQo4468jCEBNq+peBLqSfrjywKOwguIzvEiLeK7R8EVr15iTGJBH59Xz1MfmFNdAZLeplgh/DLq6ASSPNSzbrFX5z42iyegjn6zU/qLBPlrDk/CB7IamSf8T+0D1AgEz+wMKG4yMTuQOipgqU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777664432; c=relaxed/simple; bh=7VGUhUxq2QaMvzgGPRYLZNrhnEeK3CI9ktNC8G68yY4=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=u5cgCYdJyPcD3+UmJcBxWEFzd66bOwJB9mKm9/tDkQbEwaW8ap2Q8RZ3ma1O3in4jDMreLdKgNjgcYKXIvNA4LJctHwlejl9O5C4rpMMh52U3kDSHKvjQOCN29ahUxfIYmD100aFvlyRFACnzFYLBSTopTQ2i3vz6uMT4r+/RkQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=JBv5MiT+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WUVSz5fl; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="JBv5MiT+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WUVSz5fl" Date: Fri, 01 May 2026 19:40:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777664426; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kcoPhyANesk7CBusy3tniIYh6eExwUhiF/KqGfcOePY=; b=JBv5MiT+1IrjVvYxdWmWjWfiJaVugRzBejZCD/tyXpZByNZEiyx3ixSkYLkFc1wlWMC9qN 4s8Wbk8IHXVnMvb9i1QCKKI2VZ0u1FNOXUEdmM8s8wKs9Qdnxxl1usEJdThodkQ62nKU7z UbdoztJQ89R9WbGG08bU+sA78OwWaiDGn9AxJccPTzKTden8cdH2yrPNYczAc3urRhXduS tvtRwdEhKDKZOeLDXeIRpVWNlJaqVcoInoqu2XZvWgpCOtivDaEeNBD5y1r3hs9pDaWFhY KeIVRAM29yUAUjHJ3p4+Un/gU46iabsfe+NnpidHnp6OUnRxV+d6qXbIaQPPHQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777664426; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kcoPhyANesk7CBusy3tniIYh6eExwUhiF/KqGfcOePY=; b=WUVSz5flIgnqWl3I4wcP463OAcqDyMKo12o9yUZF8i7nV22PEq1fMaSAKwsWQ9669AD5aQ 6w6q9CruvTpgMLDw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] power: supply: charger-manager: Switch to alarm_start_timer() Cc: Thomas Gleixner , Sebastian Reichel , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260408114952.536945376@kernel.org> References: <20260408114952.536945376@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177766442502.3521451.11335072268120269170.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/core branch of tip: Commit-ID: 9fa2e38ab749f3966d9141da3c2cb6ce3a9a8e35 Gitweb: https://git.kernel.org/tip/9fa2e38ab749f3966d9141da3c2cb6ce3= a9a8e35 Author: Thomas Gleixner AuthorDate: Wed, 08 Apr 2026 13:54:24 +02:00 Committer: Thomas Gleixner CommitterDate: Fri, 01 May 2026 21:36:13 +02:00 power: supply: charger-manager: Switch to alarm_start_timer() The existing alarm_start() interface is replaced with the new alarm_start_timer() mechanism, which does not longer queue an already expired timer and returns the state. Adjust the code to utilize this. No functional change intended. Signed-off-by: Thomas Gleixner Acked-by: Sebastian Reichel Link: https://patch.msgid.link/20260408114952.536945376@kernel.org --- drivers/power/supply/charger-manager.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/= charger-manager.c index c49e0e4..1b0239c 100644 --- a/drivers/power/supply/charger-manager.c +++ b/drivers/power/supply/charger-manager.c @@ -881,26 +881,22 @@ static bool cm_setup_timer(void) mutex_unlock(&cm_list_mtx); =20 if (timer_req && cm_timer) { - ktime_t now, add; - /* * Set alarm with the polling interval (wakeup_ms) * The alarm time should be NOW + CM_RTC_SMALL or later. */ - if (wakeup_ms =3D=3D UINT_MAX || - wakeup_ms < CM_RTC_SMALL * MSEC_PER_SEC) + if (wakeup_ms =3D=3D UINT_MAX || wakeup_ms < CM_RTC_SMALL * MSEC_PER_SEC) wakeup_ms =3D 2 * CM_RTC_SMALL * MSEC_PER_SEC; =20 pr_info("Charger Manager wakeup timer: %u ms\n", wakeup_ms); =20 - now =3D ktime_get_boottime(); - add =3D ktime_set(wakeup_ms / MSEC_PER_SEC, - (wakeup_ms % MSEC_PER_SEC) * NSEC_PER_MSEC); - alarm_start(cm_timer, ktime_add(now, add)); - cm_suspend_duration_ms =3D wakeup_ms; =20 - return true; + /* + * The timer should always be queued as the timeout is at least + * two seconds out. Handle it correctly nevertheless. + */ + return alarm_start_timer(cm_timer, ktime_add_ms(0, wakeup_ms), true); } return false; }