From nobody Fri Dec 19 09:11:04 2025 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 C3A47237163; Tue, 18 Feb 2025 10:26:45 +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=1739874407; cv=none; b=X1PNXrAOLB7XODpFCk/IeId1vovGyTIdZT4Cw6XUuUF7su4Rolo/r+hCBaCFYKavYrq1Mp7wewdf7NG2rW0tmvQOe4NZO1lCHFQZ/BXwPF7ApjuBHimqOTMQnl6mZZDGwpdpA5A3ErzkM+V4+aOtRlg2LlWmQVoKgJkbJTh1KnA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739874407; c=relaxed/simple; bh=YcdHH9wy7gUPsqCgJ46EbEWGZgcdjcQpF440RGp3KqI=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=dE572Uuotp4u2hRYNu3Bb6taPdQ+e64EK35+gvc6fiGZchHLIP6mKt4fJa9locEmHUhSb5R3uuhI3dfyq4hiLy8mAEONgR9Z0t7XXdLkfZRmJGkIS9CoRjZOWVO2s055Mwvd3VsKJvXFijDOIUY4iOPauCilo1HkQDpsoIkUb+8= 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=bjFzDlOm; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=oMhZcKcU; 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="bjFzDlOm"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="oMhZcKcU" Date: Tue, 18 Feb 2025 10:26:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1739874404; 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=OYOQEXzM3yWGdjmqp8aRfQl88HV2JaQ2Hi/FtYG6Qo0=; b=bjFzDlOmrLy0hvUtutVVckK382E+tDtLQ9yac9QhxWBbprJxPy7pgKNwkjABAfWGq1E4+z 3lUmkSRvj8M2e/DJlYt0OkEgIp3DblQsnyr4APZmVDIYJi1+33KKMeEr4c0WQExJw6/Bsb PzwyScZO/9GIuql6ozQGUK0ZMlZl/tro0MO1UvfIGIGeV90YNpEZklPQ1jHG3eYjRmLYE2 H2gH8BT1x9OWLPHq5RTEBOsUjU1ZwB7HSW2iF0WpaFkKt9zkismoiRCTvcCMk/Jf9nwbLk ujJ8xmZYm9izVADxhZrMbikEjRrNisZwp4QJnyFUTJ5PMnMWLX5OCDVGf58TnQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1739874404; 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=OYOQEXzM3yWGdjmqp8aRfQl88HV2JaQ2Hi/FtYG6Qo0=; b=oMhZcKcU9e/JU9G2HgpxG7q+caRR/gakISQaJJUBATbfU/gGm/7nuqiRcpcXn6BEIMKHpv ntNo8cfpz8JUfgDg== From: "tip-bot2 for Nam Cao" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/cleanups] serial: 8250: Switch to use hrtimer_setup() Cc: Nam Cao , Thomas Gleixner , Zack Rusin , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: =?utf-8?q?=3C991926d130cc272df30d226760d5d74187991669=2E17387?= =?utf-8?q?46904=2Egit=2Enamcao=40linutronix=2Ede=3E?= References: =?utf-8?q?=3C991926d130cc272df30d226760d5d74187991669=2E173874?= =?utf-8?q?6904=2Egit=2Enamcao=40linutronix=2Ede=3E?= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <173987440343.10177.10544898710297369369.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/cleanups branch of tip: Commit-ID: 6bf9bb76b3af17f1fbfe76e8d70528e939511801 Gitweb: https://git.kernel.org/tip/6bf9bb76b3af17f1fbfe76e8d70528e93= 9511801 Author: Nam Cao AuthorDate: Wed, 05 Feb 2025 11:45:56 +01:00 Committer: Thomas Gleixner CommitterDate: Tue, 18 Feb 2025 11:19:02 +01:00 serial: 8250: Switch to use hrtimer_setup() hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Signed-off-by: Thomas Gleixner Acked-by: Zack Rusin Link: https://lore.kernel.org/all/991926d130cc272df30d226760d5d74187991669.= 1738746904.git.namcao@linutronix.de --- drivers/tty/serial/8250/8250_bcm7271.c | 3 +-- drivers/tty/serial/8250/8250_port.c | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/82= 50/8250_bcm7271.c index d0b1835..742004d 100644 --- a/drivers/tty/serial/8250/8250_bcm7271.c +++ b/drivers/tty/serial/8250/8250_bcm7271.c @@ -1056,8 +1056,7 @@ static int brcmuart_probe(struct platform_device *pde= v) } =20 /* setup HR timer */ - hrtimer_init(&priv->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); - priv->hrt.function =3D brcmuart_hrtimer_func; + hrtimer_setup(&priv->hrt, brcmuart_hrtimer_func, CLOCK_MONOTONIC, HRTIMER= _MODE_ABS); =20 up.port.shutdown =3D brcmuart_shutdown; up.port.startup =3D brcmuart_startup; diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/= 8250_port.c index 442967a..c57f448 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -566,12 +566,10 @@ static int serial8250_em485_init(struct uart_8250_por= t *p) if (!p->em485) return -ENOMEM; =20 - hrtimer_init(&p->em485->stop_tx_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - hrtimer_init(&p->em485->start_tx_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - p->em485->stop_tx_timer.function =3D &serial8250_em485_handle_stop_tx; - p->em485->start_tx_timer.function =3D &serial8250_em485_handle_start_tx; + hrtimer_setup(&p->em485->stop_tx_timer, &serial8250_em485_handle_stop_tx,= CLOCK_MONOTONIC, + HRTIMER_MODE_REL); + hrtimer_setup(&p->em485->start_tx_timer, &serial8250_em485_handle_start_t= x, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); p->em485->port =3D p; p->em485->active_timer =3D NULL; p->em485->tx_stopped =3D true;