From nobody Sun Dec 14 21:31:08 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 6AE9C22AE65 for ; Wed, 5 Feb 2025 10:46:54 +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=1738752415; cv=none; b=BXE6DatrnuTh3JHC9PBgedKMwd2jMkJDNb5U+9BMxyLgK/4Ady5AE33CnMJphYBE5tBoUABYcH8zDtJMiN4rloJU+xzz0Wuotdc6CvkEexpvs1TsZQMq4SA9BVK8OK/sDXdU+dSitS+lQ1vN4/bhVy9S1McR2lFguXVwRjrOxIA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752415; c=relaxed/simple; bh=2QkopcxSVsihhtL+HI5REQhGAsAQRxi1I9Mk4/idtPE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OsorQ+77DHoQtcXJIJz7MVYxyQSe41ZgZI5DnUgmghxWNv6LK/qYvgT3UPvxjOsbLvs3qFJ6A3qgCRfW5IQ1ORxi+DVFmrUm2GyivvgqDG12HTiol8t7wGEO83CpnTdt/2UpWASbuqor0Yef+M02p35l2XC/0qVF5/2LlhyOh6Y= 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=SO5WQ+WH; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=FpEOMyxE; 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="SO5WQ+WH"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="FpEOMyxE" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lu2DSWa2V+5romI/1bVWHgy7xKCyeyZi3VXJ8hhJM+g=; b=SO5WQ+WHWIblCQ+LegA0z15y+sohwtjDJT3JtJ6RpwUJ8wuvNreUa3jHNB+2aMVNMx1Bx8 mMvqVye29m9tKLkGrfskX6wg6F2F8DQdJXltYzSt7bhAMnjSDBaJLyesDBqT+qf4ZgioOS y0UyYHQfZRc35tV+oMRBs8XBHJldU0dZ1VNNKFd3ZHec6fZjOKGtO1iRnB0RAWUuklEUH0 FdL0CeeqHzDt9MRHP/4DqZjm5bpPppQ2WgxMLHBI9CFePPxCuPCrcWPFhcH/ITa5eg6LG9 IfbB3kdo+z9txyeO8yEHfXh59HzfIcUXr4LfGV6TtLSl1m3ZxY+2epNIJ0OFlg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lu2DSWa2V+5romI/1bVWHgy7xKCyeyZi3VXJ8hhJM+g=; b=FpEOMyxEC+PzkN4EBpmEQrmsZnWgbISCq8vfTj7fABVWQN3fizUmWfHvkjs/pMD5E/0zze IZAgQOLnEgZf9qCA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 01/45] USB: chipidea: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:45:49 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/usb/chipidea/otg_fsm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index c17516c29b63..a093544482d5 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c @@ -424,8 +424,7 @@ static enum hrtimer_restart ci_otg_hrtimer_func(struct = hrtimer *t) /* Initialize timers */ static int ci_otg_init_timers(struct ci_hdrc *ci) { - hrtimer_init(&ci->otg_fsm_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); - ci->otg_fsm_hrtimer.function =3D ci_otg_hrtimer_func; + hrtimer_setup(&ci->otg_fsm_hrtimer, ci_otg_hrtimer_func, CLOCK_MONOTONIC,= HRTIMER_MODE_ABS); =20 return 0; } --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 E462122B8A7 for ; Wed, 5 Feb 2025 10:46:54 +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=1738752416; cv=none; b=guHagR2fvvW54Vzze1J5FZDpqT8OtwhOq+rVL09OmkokrCDOnlZDwTVCh7BgM6e9yAcaNot4zZnSPj92rnKCOBFTQSNyTxYQcvC9xRKLpTiOrob54QoiHH0xC+9V3GVLfQDoAJx+cIDjVj5g2uUajyK9Iimg5rlp2S0EwvLbPAo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752416; c=relaxed/simple; bh=4wFcTX3wMnVDoO3GkNbuopZ53RpcdlNMKNXdbqe9f88=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lI2rJWQIw11kXaIgkjxcehVHxHe5xbdBImSZveilvfnIn2s9wHUoQ2RrkD5pktjL4DegpVAlg21rkk5jRIl4rkgcRIhs3LSjM2FuiaHw2TJaKAjn2qgAZXaLLGlA/193Hv5bkh5wVEXFTgA9TspXEwdDTXMeFGTX9JlYkty1tto= 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=cUbkwa8o; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=3F+gZPbw; 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="cUbkwa8o"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3F+gZPbw" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9sPbT35dj6zGty1qMvXfnsZKqYf1bYS/WfOmBMbiefg=; b=cUbkwa8o4zpk+XxyHb0w5ZMCk9h1zDutyziPwVrMIpBu4jf2yzBmOY4L6NA+X7qkcnB3PC rIk02dWXqKgeKzkfHtCalhx7vukohDcnbjMF6SXRWnBuxZkTkV7fmpKDs+wtxyH/rj9gqY vLev/uTdU6GGQo5sS1Lbg2wMNPEOvSns7ordcNf/q/2mZ/6DsvooUZKr2kmCitj9jnS3xD X/oEkQDeI3x7uGiluR10jev0CYPz/DQvVB3XMVFablyEHwHYXbkxy8z8c37t+Ni6YqvQ5p tglnV1i6Pwh+5H++MWzlD7yohMXL4vZl9mkFVv0DG7PdR7y0bUVh0ORTWRrcww== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9sPbT35dj6zGty1qMvXfnsZKqYf1bYS/WfOmBMbiefg=; b=3F+gZPbwgf0Xk/ApN+OoXVUUd80Mzhg9qu4I/DHm2gx7zS8Fk9iZuX8aizfmHeOegx3WZk n1g/t8Epnur+tmDQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 02/45] usb: dwc2: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:45:50 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/usb/dwc2/hcd_queue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/hcd_queue.c b/drivers/usb/dwc2/hcd_queue.c index 238c6fd50e75..2a542a99ec44 100644 --- a/drivers/usb/dwc2/hcd_queue.c +++ b/drivers/usb/dwc2/hcd_queue.c @@ -1459,8 +1459,7 @@ static void dwc2_qh_init(struct dwc2_hsotg *hsotg, st= ruct dwc2_qh *qh, /* Initialize QH */ qh->hsotg =3D hsotg; timer_setup(&qh->unreserve_timer, dwc2_unreserve_timer_fn, 0); - hrtimer_init(&qh->wait_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - qh->wait_timer.function =3D &dwc2_wait_timer_fn; + hrtimer_setup(&qh->wait_timer, &dwc2_wait_timer_fn, CLOCK_MONOTONIC, HRTI= MER_MODE_REL); qh->ep_type =3D ep_type; qh->ep_is_in =3D ep_is_in; =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 5874F22B8A8 for ; Wed, 5 Feb 2025 10:46:55 +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=1738752416; cv=none; b=U5/faYAUpTih3GsOON6jlE7u2RD4OuD5AcIBfhymKc+BcEfQYY/JjTjGNoJuLgqtNDujA3801A2BxfTsELFUV3E8au/528qFVF9H6AbFA4rrEK4nBSU5K5RgNt80N4ztFpoc4cygO7/G370hGmo5qQRp0IMvXTFf7p+b8JOkiAY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752416; c=relaxed/simple; bh=7buoS2hvIQvhff3Yp7U/dZPhS6NZLTiuCtbPcmWLPno=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dU+NEGHIlojl78T/wPrp7m50iLbsVoGj+x0Bpk+2Q54wwribxZjSBDs1cB6s4om1dOxJIHsy1QZUNGqSFxxRqNUMQfNfC/kUuCNGuJvonzMGE0RP6paQUCTe8txwd2/Zv0+9Ub4VM9mva5Ify2QZDZHhqtlqfFqwyAuiMxmbJ48= 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=rHePW1K2; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=B4MVSsPz; 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="rHePW1K2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="B4MVSsPz" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KCwDGj+PQtMTAr1XdhZYO4qPeYwNQzR+uHCDb1zQIdo=; b=rHePW1K2jxZMN6PM+4jt9l+U/jKEBb6iZbmGXFBvmerHvZW28mYv0tjycsMuXQJJ1UHSUK 8BWAWTzSdfoGqikN4wI7JmrqsAfMSNuAz+rV9FT9rsRZCJXRSRC1NJAkBjUhBkJoobzK5i 2oK3L8ql05CnEyt8KrNuj8cZKd1V0m3XSDSo8/RuYkbsy2xWXUBVcslc80juWsETNy0nCO GQj0mB+/v+660ZddqRGRTrXuEdTqoLqcSY/+eW+Rs8Z+pNn9QcUJn4ezjS5feJFC7RlFnc idS8siMFzGYUIvl0Zy+KGm6sFd5zxPPKtMwwdgj47w1cHyUWp7MyosulbfbhoQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KCwDGj+PQtMTAr1XdhZYO4qPeYwNQzR+uHCDb1zQIdo=; b=B4MVSsPz0/rEL6TgVw5LG8DoFoG2XCUbiMSy1Bu+hEQ9vwgRFbN+QJitf6rbopnBVHM/oV HLl92z3McsoIuFBQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 03/45] usb: fotg210-hcd: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:45:51 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/usb/fotg210/fotg210-hcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/fotg210/fotg210-hcd.c b/drivers/usb/fotg210/fotg21= 0-hcd.c index 3d404d19a205..64c4965a160f 100644 --- a/drivers/usb/fotg210/fotg210-hcd.c +++ b/drivers/usb/fotg210/fotg210-hcd.c @@ -4901,8 +4901,7 @@ static int hcd_fotg210_init(struct usb_hcd *hcd) */ fotg210->need_io_watchdog =3D 1; =20 - hrtimer_init(&fotg210->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); - fotg210->hrtimer.function =3D fotg210_hrtimer_func; + hrtimer_setup(&fotg210->hrtimer, fotg210_hrtimer_func, CLOCK_MONOTONIC, H= RTIMER_MODE_ABS); fotg210->next_hrtimer_event =3D FOTG210_HRTIMER_NO_EVENT; =20 hcc_params =3D fotg210_readl(fotg210, &fotg210->caps->hcc_params); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 510C022B8A6 for ; Wed, 5 Feb 2025 10:46:55 +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=1738752416; cv=none; b=TEJ19CPIMVPiBNz/RxA+yQzjvZVwNs09S0sf57UM6DhY4boSMZ4GyGnnQXV0X5SNLXvNrzU7Q7A6uHTTIKLEDNGFIOH214vy/iFWv0GbVn6pVeJSvJTShNMIJhp71O8vX7P2rOz+hkOut0FdhswUw6el59eGRZsQKthzDznD9+E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752416; c=relaxed/simple; bh=bs++FyLNlKakLTGUh+bpO8uwb0P5xda1dqZA5sAT1iQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OUfzgSdjp+fAjWXeljDdj7ejow02rjVwFK759D/dGBupoyYquQADLG8eD07ZbVWBYBPa8rsI7FJEjRRMCM+Z0+95ZF274kFR/2ElChr6x3i33/VJnU2ZyXE4CgaEzeH9gKR+Dg9Qvj4qY2wiVNY5Cl8l0ounwdxCBGkAD5altpQ= 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=MToZjmxN; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=mRE0TV+a; 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="MToZjmxN"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mRE0TV+a" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=anQ2OqdKjLDOPXKqxWLFKMkw70YcLhDTGu45hmos12E=; b=MToZjmxNjNZ7zAS3obKpBfKbiyarccpNpjHoi+0wvgukjj6qQb0q6ds7BzSHLlceMr1zAO 6P6c+lzvulU13UrVM7xIHS+uvvpKoWZ7cY782Z+MNXITaCRHqKlg78y85VnoNvNxeEhziS 3lIzRCVNdkAxfbUKKraLWG5DiNrH/qM5nuxb/6T7/fWfUed84x5HWq6FjMKVnBd0rHmQWm 8j6jHarF05QFOd6/T0vNg4iyV/45qDNl/0VN2JeElDXFvTTZkGRUnEJOH5j1gNgFIBhYRW hkx396QkORL3/O/aeOaQ/M9VzvTokgbobQz5AJvf+jkSQprDLn+Qb4I8Fb8Nlg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=anQ2OqdKjLDOPXKqxWLFKMkw70YcLhDTGu45hmos12E=; b=mRE0TV+aWQUoDSebj4L0yEQlogVCxgH4ORQGMBiV7KRPdggfNT4DrRWwa+qu1do/bEKm6q +OWIOnr+JqpQBYDw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 04/45] usb: gadget: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:45:52 +0100 Message-Id: <7239d6211ffb0dff6351d0549d065277f2562793.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/usb/gadget/function/f_ncm.c | 3 +-- drivers/usb/gadget/udc/dummy_hcd.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/funct= ion/f_ncm.c index f60576a65ca6..58b0dd575af3 100644 --- a/drivers/usb/gadget/function/f_ncm.c +++ b/drivers/usb/gadget/function/f_ncm.c @@ -1559,8 +1559,7 @@ static int ncm_bind(struct usb_configuration *c, stru= ct usb_function *f) ncm->port.open =3D ncm_open; ncm->port.close =3D ncm_close; =20 - hrtimer_init(&ncm->task_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT); - ncm->task_timer.function =3D ncm_tx_timeout; + hrtimer_setup(&ncm->task_timer, ncm_tx_timeout, CLOCK_MONOTONIC, HRTIMER_= MODE_REL_SOFT); =20 DBG(cdev, "CDC Network: IN/%s OUT/%s NOTIFY/%s\n", ncm->port.in_ep->name, ncm->port.out_ep->name, diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/du= mmy_hcd.c index bda08c5ba7c0..4f1b5db51dda 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c @@ -2479,8 +2479,7 @@ static DEVICE_ATTR_RO(urbs); =20 static int dummy_start_ss(struct dummy_hcd *dum_hcd) { - hrtimer_init(&dum_hcd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT); - dum_hcd->timer.function =3D dummy_timer; + hrtimer_setup(&dum_hcd->timer, dummy_timer, CLOCK_MONOTONIC, HRTIMER_MODE= _REL_SOFT); dum_hcd->rh_state =3D DUMMY_RH_RUNNING; dum_hcd->stream_en_ep =3D 0; INIT_LIST_HEAD(&dum_hcd->urbp_list); @@ -2509,8 +2508,7 @@ static int dummy_start(struct usb_hcd *hcd) return dummy_start_ss(dum_hcd); =20 spin_lock_init(&dum_hcd->dum->lock); - hrtimer_init(&dum_hcd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT); - dum_hcd->timer.function =3D dummy_timer; + hrtimer_setup(&dum_hcd->timer, dummy_timer, CLOCK_MONOTONIC, HRTIMER_MODE= _REL_SOFT); dum_hcd->rh_state =3D DUMMY_RH_RUNNING; =20 INIT_LIST_HEAD(&dum_hcd->urbp_list); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 8F8BF22C352 for ; Wed, 5 Feb 2025 10:46:57 +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=1738752419; cv=none; b=SVDLdAlDyNERIJcKiEYXzdrJDqx64CG3vWCr9jPe55L3942r+ifNQTcbj2sbzVhXlhy+s9D1ABD/LlOPLH7mEPiO/h5qtIVOSgcs+gfKMmzMPzrO7zBUhetI7ERWvGKGRi6a411mc3rblRKe5KSem864+jcyhtkmBBCxGueRLqw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752419; c=relaxed/simple; bh=MdE5Oc0zQkfPEaggbeZfhJJ0D1rSui76rgQV4fDPqHQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fv9yRLkejJLlUZdxPcgh9+MIywnAbHthoIiM3A3Y7I7ZM9S7PStXqr4xl+ftjZLzDXCrv8lid9ZjNEY0Lm1eiHvc/6Jndy98W4caNhoJ2dm3OXa14oS6HcUnL3PRWUK8cPbA9QcNn4c+kTOSXdosMvovQRJr5/7s705BbHiHqNY= 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=oakE9sDj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=zq6TlPPG; 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="oakE9sDj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zq6TlPPG" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aymLzRvTqHP52Femiu3bof1zUOr5zJIqIQJDmVQ6QkM=; b=oakE9sDj90y/JJI0p0YEMyiG4vQipCBr5uUGrSfKI8hlMaH8T2GsbGGlbGqxB+IbrFXU74 78R7CecczeL8s6KbKvwSHclx85oJU3FQ62OOFkatKsdkPF4DPvGIBLLaPJywtABgW6Mkkv yiFw9NsHpIAPTNwRTf4Ji302U7XqTJW83RZCx8piaBfGJefScVxvzqB46fvc3dAXdtIqXv F+y94OTSjNhNMae7EaBP80fUWkUaQGxBaGsNWI/q9LHjPu884fEXolyoKgtV+2Nrg5Dx7r uBYxG3jvlVQct4bdcTO06w0Zqy4RSKitEqPvqWwGcBp8x/RkEWDBpETDvIWLUQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aymLzRvTqHP52Femiu3bof1zUOr5zJIqIQJDmVQ6QkM=; b=zq6TlPPGElu/1SP+aKvnfFtP5hbXQQS56GfFQLjrWsrgImC73cGfwlu+MB+vSiR22My7yN BKrKVM3ZZX9gXKCg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 05/45] usb: ehci: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:45:53 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/usb/host/ehci-hcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 6de79ac5e6a4..6d1d190c914d 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -466,8 +466,7 @@ static int ehci_init(struct usb_hcd *hcd) */ ehci->need_io_watchdog =3D 1; =20 - hrtimer_init(&ehci->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); - ehci->hrtimer.function =3D ehci_hrtimer_func; + hrtimer_setup(&ehci->hrtimer, ehci_hrtimer_func, CLOCK_MONOTONIC, HRTIMER= _MODE_ABS); ehci->next_hrtimer_event =3D EHCI_HRTIMER_NO_EVENT; =20 hcc_params =3D ehci_readl(ehci, &ehci->caps->hcc_params); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 8F85F22C328 for ; Wed, 5 Feb 2025 10:46:57 +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=1738752419; cv=none; b=BdpcjW7f40BR1dtvFYO864eND9vkF5bkwMpwsQP6tAQotup05VzfBA07Tv+24UPWV9crDVjWT2sEQbRPG9ecMs1rzo+VCnc3tiTXHZzCiXt96YngPHnSihp7zxVXfY5Zb2Q7/AkYvj7yAGYigbt9yCrIq70QlXMIxZad3xD6ILI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752419; c=relaxed/simple; bh=Rg9GfJh77Bm7aQMkxsWnJDVGul1724SU4heYtJAJUDQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=syqRYrVSEC72LF/rfDNjZ4Ssxh7jBzqedHEhReEfs9+ScNQwd5z3snpV3mFO7ad1LA4lEMv2lnVJvMbpWKjiI99hCsDoRa5fNamSbWOS1ypBwVWDKqRkh2ddZB1LThNI42lebbK0W7c7WZt0KaiHdHImr7EotpQCOhalbwsTJdM= 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=SMilxc0g; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=n0wjuQrC; 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="SMilxc0g"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="n0wjuQrC" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lvf3qRQO08DkoSLT62NozBkSWJH+iwOHnaBM/cWiAXA=; b=SMilxc0gkEn4D900IrDtHKDFVzRVRaJY63jN7NNRn4/FB7FbvETnD1xT1dx7002+i/ul4Z 369ukzCLdThXOkDm4GXbhY2lIxDwwMPO2uwpnsLWtryLD+zZYofG2BHCQFgBbk6n7cqkL7 19277dqUzTUzMRGt05qPGV3C8vSW/EhGO2Y5RF5bhVijb+aRlxKDnChi0ezZGZtEatZPib 4el1l7LFVE2VqLe33a5JwtXHXlAH3/jxB1n0vNtR3LfjKdRIrVCBcH+PR7RcaAWF+7WMpt WU2HRkG2PqCg2vj2WFhsOe8KNtNTRlE7V1arr8xW5h7Nm3BhtW/VGB+A0FUR1A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lvf3qRQO08DkoSLT62NozBkSWJH+iwOHnaBM/cWiAXA=; b=n0wjuQrCZgRdQ0zScQStVzJ3+6Z6JnVIi7Ah4GBJy/28pNJV9SvBKw7pnoPD768rmljecf 5TgDHR0/CxsvzqAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 06/45] usb: musb: cppi41: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:45:54 +0100 Message-Id: <80d59a56c76c76ace982417e4dc8ddd37a5441d7.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/usb/musb/musb_cppi41.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c index 9589243e8951..4cde3abb7006 100644 --- a/drivers/usb/musb/musb_cppi41.c +++ b/drivers/usb/musb/musb_cppi41.c @@ -760,8 +760,8 @@ cppi41_dma_controller_create(struct musb *musb, void __= iomem *base) if (!controller) goto kzalloc_fail; =20 - hrtimer_init(&controller->early_tx, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - controller->early_tx.function =3D cppi41_recheck_tx_req; + hrtimer_setup(&controller->early_tx, cppi41_recheck_tx_req, CLOCK_MONOTON= IC, + HRTIMER_MODE_REL); INIT_LIST_HEAD(&controller->early_tx_list); =20 controller->controller.channel_alloc =3D cppi41_dma_channel_allocate; --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 EE28822CBC7 for ; Wed, 5 Feb 2025 10:46:57 +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=1738752419; cv=none; b=sQQtxnqBhesMUfuixrvF9cQp8VGqguLpttfqhaMOmztpDGRN5yvl4QLEwHuLQc0Q9ztzKDeewwQado0pJFXuK+bim82ynP/CmwQmVb/HJmyzq34plJwCehMmltQdpThpSGVvmdmbl6gxCdeRq7MiXsZCVybUosKa59FZXnptknI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752419; c=relaxed/simple; bh=iGrPhhoAmhPQDdVgEDOvn7z16eITKBaj8o51XTSb/cM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nODqJzU6V1LlS59Ss5W/zBGGEXlr7j+/ggS4oTUjyLvn8NaW4+PL8Exns4hqlX+HOtIxM+BobmovK4wzrDr5t27DZ+1oeDsgQj2SpjqzeA12COlpn6fXtfHaENbB+jjeZNOfKHgUhFQGd3j/nxnVpebwZqVv/PSu0ui6AWkui34= 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=JrR/Cf/J; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=8S3e1+sO; 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="JrR/Cf/J"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="8S3e1+sO" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m8tmDpiTulXdtJ4633D0bCX9FXcWcVx4uSb+Z50myDk=; b=JrR/Cf/JfnQof4OQuDwVYUtHpyp0BbktbvVZTYkk1l35JmtpttIgJo48HIrRqAJfwQACjB hSwRdKMEImw/E5CaloQtJU7NvF7jSG5nsE2AGq2gQCK4PU7hoUe2vtGc+QOurct8GmN79P nlloDn/SsMVo72F4TFYgl7vC88rpFsxEQJ960vAuiLJO72MeuqdG3VRE+XUj5NxtsD3Axb TrkHP3W4cpx0FNwBShBwo/efnY9fZz2Z+He3r/EFfvM4gD9TyosL2460tQjHH8OplKwGDH cd9Gxywr9aVN3SuFcKZX6iISiiKGDAjxS6b4PzgVe6TWU2wwfUSFm9NV3lP2+g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m8tmDpiTulXdtJ4633D0bCX9FXcWcVx4uSb+Z50myDk=; b=8S3e1+sOeNmU5ffO+OhVdQjUG0lBQbBgRK6Q41FQEY5Q1p6pXgH35xOwTXx+FzumEUSafC N8R4O9w7JIGAkoDg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 07/45] usb: typec: tcpm: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:45:55 +0100 Message-Id: <7fd2a1f72b3833e1fb36f56f2b28a08c1e64f47e.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/usb/typec/tcpm/tcpm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 47be450d2be3..ebe076f01675 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -7722,14 +7722,14 @@ struct tcpm_port *tcpm_register_port(struct device = *dev, struct tcpc_dev *tcpc) kthread_init_work(&port->event_work, tcpm_pd_event_handler); kthread_init_work(&port->enable_frs, tcpm_enable_frs_work); kthread_init_work(&port->send_discover_work, tcpm_send_discover_work); - hrtimer_init(&port->state_machine_timer, CLOCK_MONOTONIC, HRTIMER_MODE_RE= L); - port->state_machine_timer.function =3D state_machine_timer_handler; - hrtimer_init(&port->vdm_state_machine_timer, CLOCK_MONOTONIC, HRTIMER_MOD= E_REL); - port->vdm_state_machine_timer.function =3D vdm_state_machine_timer_handle= r; - hrtimer_init(&port->enable_frs_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - port->enable_frs_timer.function =3D enable_frs_timer_handler; - hrtimer_init(&port->send_discover_timer, CLOCK_MONOTONIC, HRTIMER_MODE_RE= L); - port->send_discover_timer.function =3D send_discover_timer_handler; + hrtimer_setup(&port->state_machine_timer, state_machine_timer_handler, CL= OCK_MONOTONIC, + HRTIMER_MODE_REL); + hrtimer_setup(&port->vdm_state_machine_timer, vdm_state_machine_timer_han= dler, + CLOCK_MONOTONIC, HRTIMER_MODE_REL); + hrtimer_setup(&port->enable_frs_timer, enable_frs_timer_handler, CLOCK_MO= NOTONIC, + HRTIMER_MODE_REL); + hrtimer_setup(&port->send_discover_timer, send_discover_timer_handler, CL= OCK_MONOTONIC, + HRTIMER_MODE_REL); =20 spin_lock_init(&port->pd_event_lock); =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 EE22022CBC6 for ; Wed, 5 Feb 2025 10:46:57 +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=1738752419; cv=none; b=qDwZH66+1nTxYfDuSv1JKNcB5bOeElO3z20tobN14dBab1DkIhtxzUjPLjPq1Frx0KFVL3nXA9skZsoWjJT8nyx11UTDpkKMRoVQREQFgnPd3Xzef/VMmpffvvmtrAcRNOWsYe2rjLRSfOS7gLghj9p4RNfWlANS4wzkWRMa4dg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752419; c=relaxed/simple; bh=Gz7FyKLYBhEbY6Bm+fcua7MxGEsX4WEg7YqKiHPnk98=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=S4o4lxYL3K+JcLdXIx8zAGOJb+O66fUI6bv5dDjItRVEBdeGqm/lwlOpMGQbDRA0LLwJyLLSKIzc0GNI5RgqsdEf0YzE0RDHXachV00dInsao/yic4DrupKgo96PxAZjBYBmGB2Jrpfo7jL0LHyOaSQ2M/J7lrAXLDXP0BGpaxM= 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=AoccFSk9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=kIPLhBEz; 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="AoccFSk9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="kIPLhBEz" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0BDcLu8h+UPyhwanniDJTRX1mpZRlCtCxxfcTZmc8fY=; b=AoccFSk9fk2xDe8IoU42wENOXbTuCtesJKPdcSTm4BMQzpO/iwVqBHppEuNhJJrhQFIww7 V7H///DxiuiaUwR4nOsv9cUrjXCi9K05wdkyt5uf2WAssh3InU5OQVYIcRw8tkmt1clkOo lC17y5yqdFYIBf7T84X+jg/WzZuoX5MqvYs+G/leOXB00BhRCU1n884nixHQQwUqL3ahpu hlw2P+qtPwh5Qv9vwi2MUwuawvySxhUVwWmr0uiZwPG1l+v+QqyjjsG/LJ9wbeNq9PDNu+ 2MnMugqJe6qy9fn8RZAHPI9/QBkugUD/9Ss1ctMt7a9s9zYMAEHQZgEakVRjAA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0BDcLu8h+UPyhwanniDJTRX1mpZRlCtCxxfcTZmc8fY=; b=kIPLhBEzCDui5hb0buAQwkqCvhQ+cfzPgS4FZjxjMSbCwTTKos+HrREtqMXhfiQq2BHQHI uGxY7Ye4y+vvqcCA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 08/45] serial: 8250: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:45:56 +0100 Message-Id: <991926d130cc272df30d226760d5d74187991669.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- 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 d0b18358859e..742004d63c6f 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 d7976a21cca9..253bf5c756de 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; --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 559B022CBD9 for ; Wed, 5 Feb 2025 10:46:58 +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=1738752420; cv=none; b=RxNwrRyaNmHOMuYM/kiJGkpg5S6RSsWflgAPWaF7smxpyqrG/in0WkOB1nQSCLFay8HtJDSZQ6hyP3u5TZFbeiDksCwvQk5zNfNxp/47qbtuAJ1GWNX/IVi68TsaFGIV1KP3HlNQfmR9kUMIIIWgcElI1cAs4IYIjjXJ76+LvZI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752420; c=relaxed/simple; bh=erx5xAWDlD4b8HLZ50YbxNbkvzsNscu0QSeHZJaA3x0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=p440zZkHuZnGggR9ehvNj/CVrdyTZMxO3veLXqdfCHVUfi42Nd4xzyGVCz1FrZDeeF/pRPrNzI/TUOeg1QUFtyLmHbRrV0+g9ycWr5eRGSMKRjshLcsr75lbG8mKwPlaT4+77AE3f+PMibp/o4C2xu9sxYF7CX7Pr9VCXphU4OI= 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=TamDG5MB; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=9uQY8NXc; 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="TamDG5MB"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="9uQY8NXc" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BmTo87BGjQSdJn5pPW+/LOkuzGYnx4VhJELMXUw9vl0=; b=TamDG5MBT4FidypA7QAlsskPi6tRixzVJL8nRyp9mOZFeAmuj7DvrKpUEZnpgesS3exqSA /RPMd3aNpT34kyk5ftMUCfyn8IWeJr4A73VB/sDIpPVGpNC2GjwuU/cZVQdEFuK5UaVFsm bQY2s9DoV2ftpLiwDQ72w9/sCdNS9NGpR4FABnJnt+eRf8hjBKtY3gYMA0fWW7hBfFDYOx ba1D1x3oU4o1rSQjXBO6EPpo0q6HQt1gADUrMHN8DMfukG5oghoB12DMe1XqwJzWxPrekB dxLoHPDj61AxDcWrsv6U4I09qO0V9VytOhaI80SbwD0INiRUCfEDEqK62QXKXg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BmTo87BGjQSdJn5pPW+/LOkuzGYnx4VhJELMXUw9vl0=; b=9uQY8NXcvbOI+GL0/Fm2MUJzz51pMemplj1tAgjPsuFxEM/Q3WwH38qg5lu6+BkEOrIsxg DP50aRaz9C47RYAg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH v2 09/45] serial: amba-pl011: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:45:57 +0100 Message-Id: <78e8c0d1b38998eab983fad265751ed13c2b9009.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Cc: Greg Kroah-Hartman --- drivers/tty/serial/amba-pl011.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl01= 1.c index 04212c823a91..98f178bdbcbe 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -2867,11 +2867,10 @@ static int pl011_probe(struct amba_device *dev, con= st struct amba_id *id) return -EINVAL; } } - - hrtimer_init(&uap->trigger_start_tx, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - hrtimer_init(&uap->trigger_stop_tx, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - uap->trigger_start_tx.function =3D pl011_trigger_start_tx; - uap->trigger_stop_tx.function =3D pl011_trigger_stop_tx; + hrtimer_setup(&uap->trigger_start_tx, pl011_trigger_start_tx, CLOCK_MONOT= ONIC, + HRTIMER_MODE_REL); + hrtimer_setup(&uap->trigger_stop_tx, pl011_trigger_stop_tx, CLOCK_MONOTON= IC, + HRTIMER_MODE_REL); =20 ret =3D pl011_setup_port(&dev->dev, uap, &dev->res, portnr); if (ret) --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 A59BF22CBE0 for ; Wed, 5 Feb 2025 10:46:58 +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=1738752420; cv=none; b=tsxwiiY2fYpxpLF4bI6P82e20Vfln5gLm/ZkeUAOKLac19Ta8SyeAC+hGhxCNvvTL9+ydOl0gQJIYkLWN4AMMo8Rbj+rr5JejGi+edTC3q1WsdrgydbbSmOsUwVsIXlz4PoRNrqvn/60K/cTTVHGXszRcNvSYBG3OCa+nKrIckk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752420; c=relaxed/simple; bh=/FMHj0S/buempIOXnQve8ss0tqAVXn+brCtqINFTVTc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pO1Lw9O0Q6QVFF0oRSX24DYKzF28Gv/11jcYRcKe4fHPVNUgJKCB3vhkcKrqfVc+CwF6cTEnZIInnOQgH4NyAkRVSOHMYPZZoW++6qlzV+sAXbvlK3CQU9lIdcS1qpbWwrV3tHO1Z9+vHZKmLtYrqztqQ7xCthpZDwF+uQWYmyw= 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=MegklClc; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=3H9I5KlL; 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="MegklClc"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3H9I5KlL" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mToA3wuzFvp+0xfyhnCc9PQrX3ZEdj4Q6dcAc7yZqPQ=; b=MegklClcFUCn22pd31FqL+KZldHZERk3sRsCZsdOjR0UCREfxz9EYwkC34qSOzhgMYswCE eFDqoanpmhGIt4osyRgkbQpVCjGp5agid0uC4NM45ii6OfEdJFZUIziyQTIVtPFC30mOSr cJCqjDf5qRyx58G1QFF2wS8wbGilXDi7itXdkaupjF4+ypxYungz7E7jXvnIY51mcWWw28 jiigo/qH3joXZZJUnEuJcmPwPlW6B9maHZLCatTzg4iP/mx9Jlqz5hbA4xlwMqfEWZDNah m0sss1fsKU7b3zGGtPSLUHs+tmQgu0/jM/O9h67auCzL0i8j7V51onOh36vGxA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mToA3wuzFvp+0xfyhnCc9PQrX3ZEdj4Q6dcAc7yZqPQ=; b=3H9I5KlLct5vHxc4kIgMiDX6IGguKYCc2TF1SWnp8YTOc1i87rSTodJXb7kghuUn7q46Lx e4YYxwHM65YGJlBg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 10/45] serial: imx: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:45:58 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/tty/serial/imx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 9c59ec128bb4..9a1afe409b98 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -2582,10 +2582,10 @@ static int imx_uart_probe(struct platform_device *p= dev) imx_uart_writel(sport, ucr3, UCR3); } =20 - hrtimer_init(&sport->trigger_start_tx, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - hrtimer_init(&sport->trigger_stop_tx, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - sport->trigger_start_tx.function =3D imx_trigger_start_tx; - sport->trigger_stop_tx.function =3D imx_trigger_stop_tx; + hrtimer_setup(&sport->trigger_start_tx, imx_trigger_start_tx, CLOCK_MONOT= ONIC, + HRTIMER_MODE_REL); + hrtimer_setup(&sport->trigger_stop_tx, imx_trigger_stop_tx, CLOCK_MONOTON= IC, + HRTIMER_MODE_REL); =20 /* * Allocate the IRQ(s) i.MX1 has three interrupts whereas later --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 558DE22CBD8 for ; Wed, 5 Feb 2025 10:46:58 +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=1738752420; cv=none; b=DJH4hqSM7NMw+wnODfKVzJvRF/h+BStqsVzRdJo3y2FdV8JM/TSfAkk9dLuOK+NRkzD6xCqpwTnT/7Re7+DgLqYrSn4OH+EnSwQf93CH7sOhuCwDEhNRt1tm/s1zHi4/QnfiOEvyBBYdH77RyGgjY5QknphwPXy7oo1KhQ/mNY8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752420; c=relaxed/simple; bh=Vy6Rsev/QMn8DRiiVr7pziovYcOCdMou1+YHVrIMG58=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=elZR6vddz/5+NqlRL0ae9kf6lpoY63QIjU9iXD51TkekD4iJ1j1c6uD3lKdZJZZFJ1AQPRIG3ho4TglsgNaTrPxYAgJJjnQJu/p0gwdI9TuF9VlntRICQLd/j6e+D1OM2+7BbRAAM5JzPSxTPPAX8s11dWLgf1goPg3qClgrPNk= 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=4eRoUe7V; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=UncooJiC; 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="4eRoUe7V"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="UncooJiC" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mZkOLTG5yvAUe+G33zkzjKGm4+r+tPlAbm66+s9eFE0=; b=4eRoUe7VYpMEQuvJd6BxqDlJaEBhDj+NjAwGGNvVHGrY+hE0SaWXWLXqx9Nr8oiCQPfP6+ 3LnRNW60w//qvTv5NoxGgbhm8MZiecvROX/ZhiT/iuYQW4Daud8pPF7G6wFsJc/+iYSmNV qVOjV3CHbDjVaALu1OQFPajnhSUXbcuXPgJF6pNjLvv0WzBGfANDoRK/WECDS6/KkqGmnz FhSoEzt8KmgPj224hxLsyqyxkldyv5bxcaPMmlGFvkuBHFUB0aFXxRdWpFlFJkB8xWIGNy ZUgk+nT6HksttEaK+3DPHHpV5z0B00cjOIeAbFYKh+W/XKRAuVvdPIkKQZ+Grg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mZkOLTG5yvAUe+G33zkzjKGm4+r+tPlAbm66+s9eFE0=; b=UncooJiC+v7d/t5tSNVr6cW27S64ZugOHA+NKrTq69kbLd+gI0K8K10QNiU1sXgHaG5OCw B8LmcJ/3nSBfmbBA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 11/45] serial: sh-sci: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:45:59 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/tty/serial/sh-sci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index b1ea48f38248..b72c3bc19bfa 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1702,8 +1702,7 @@ static void sci_request_dma(struct uart_port *port) dma +=3D s->buf_len_rx; } =20 - hrtimer_init(&s->rx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - s->rx_timer.function =3D sci_dma_rx_timer_fn; + hrtimer_setup(&s->rx_timer, sci_dma_rx_timer_fn, CLOCK_MONOTONIC, HRTIME= R_MODE_REL); =20 s->chan_rx_saved =3D s->chan_rx =3D chan; =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 A5A9922CBE2 for ; Wed, 5 Feb 2025 10:46:58 +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=1738752420; cv=none; b=QQYI+Gi1Vl8msJdyz6gr8OF/RE/lvzleJRHRv4qeBYa88kQandrygfsQOUh8mHR6vE/rMbFMmUapNzAg3voC2Xd1aRxfe3xKm6NMbruEGUsL6Gx11caTtqq/OnwwxWcaOXCxxKPfHdNZOjiWBfqEJaRH1VuzVLB3Fj/+x0aOkiA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752420; c=relaxed/simple; bh=Q4a7ZQ/VZUrPUfFQFAShzrAtCZcbXulEd3aHeO5DW+E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WgREhyRjMkz9yq5I31cKWF3mkvWNoJTmMimlB2V5uow2HP6jUGpUQWOsQRgQzl4sMw2ONlu0uYa1xEWCwBlA24XnX3FVUvxfHFYB3D3qyRN4VfMQbVih5856zgiiAM4UAfPtqKIaQPimfIQcJIvgv2SzEkvF0JulFZcRv9hhIYQ= 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=BGT6oNEH; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=duonQ1YM; 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="BGT6oNEH"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="duonQ1YM" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fBC+KcBMAxMWG2xDcNIn1aNh9m0E4jNVlX7Ii7D1Hm8=; b=BGT6oNEHkIoyp5op0wdXmnXlAWMBQO9KdXd88kXRCpnpnPOHi5J2r4SEtLme1IWbt3jjSY Un2zfewOduyVuweinJqtSFNl/C4QDU1MtKvf/022y+B8ElCETs9zOxwsYkQzdi7epydNNN M5SSZthMQ3U569+inZsIq/G27JnqkxAaNUDZ4suUG0M0qeylSqo5SnN7QU9M5ooiW27Tk/ J0x5YFIw0VAxTJ9Cucx/hU0iuIfnGhUeWXxBR5LywUc8ggo+hj305TXGfmeqQLrwctU4bT 9nI0jHorx6KtqrHcOffkuEuKdkNY5WBImWW/Rb+raUWzRmVbNGCqnFWfloHQiw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fBC+KcBMAxMWG2xDcNIn1aNh9m0E4jNVlX7Ii7D1Hm8=; b=duonQ1YMks7+TrLaU/oDQA/hY0ujvlKXpB1lOt98eZJrpS2A7Aswiw3Tat/Bggu+qC/pLC 17xBnV1166TN9LBQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 12/45] serial: xilinx_uartps: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:00 +0100 Message-Id: <4a028a23126b3350a5e243dcb49e1ef1b2a4b740.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/tty/serial/xilinx_uartps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx= _uartps.c index 92ec51870d1d..efb124a19c01 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1626,8 +1626,8 @@ static int cdns_rs485_config(struct uart_port *port, = struct ktermios *termios, writel(val, port->membase + CDNS_UART_MODEMCR); =20 /* Timer setup */ - hrtimer_init(&cdns_uart->tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - cdns_uart->tx_timer.function =3D &cdns_rs485_tx_callback; + hrtimer_setup(&cdns_uart->tx_timer, &cdns_rs485_tx_callback, CLOCK_MONOT= ONIC, + HRTIMER_MODE_REL); =20 /* Disable transmitter and make Rx setup*/ cdns_uart_stop_tx(port); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 8DE4B22DF8B for ; Wed, 5 Feb 2025 10:47:00 +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=1738752422; cv=none; b=YRmS+qyxqKQTbaHcWOQbKubecEKaVm8u/qlVPh1FfaRRtHGdx+tt5r/IS1yZJ8wt5ZCTlVPpE22IRJesGeNNWZ1VbV3K7rJX9jcgoZBacuyUR6pqhByHQP7B7jHF8zKFvgtp9fo0kkMf6evGwg0WbhEx3bVzg2i0DmUtAXpQBZs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752422; c=relaxed/simple; bh=RTIcDntORnBFrbDoWVtysJhweCd9AWB6YdVlqPE5F74=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kzTwRUJdeh8mraPjdlpFHDRzfTNw5qCkfeMN6LdIbWkVCfBZvdRBrCOiZdPaXHkKG5i+P8AXaFukQpXm3ndfj1Ih1ITL7gOrnVmgIGNZy8bYBuF4lgmaL3E3BpE2TsrFX8WdZw62v2Mi2Ug4u8V6lnULKueEV8WfEbFvGc7/U38= 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=sndaKmj7; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xi4PryLz; 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="sndaKmj7"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xi4PryLz" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/u2BuUTSqZdVlNontfYSEOv3vBWRyRQQTr0mOU7iSOc=; b=sndaKmj76O6kopgISQg4rdRQWqKlg8IzIg5BkfpkBSOuWk3J2AyxmrQyYN2thNyonJf35J dAJTLvG3vX1Tk0HK8PF3+3yFAq8kocVKtETgOqeCZoFF9xdUteBNqWfAGf4FVusq2s+wgz AUdAIc7v+dg5A8GX/ZPrJ8I7v9ekf6WwTfKzZsqmZm5anBuSjg7v93vyFxA0UpUQDuUntG s2zDvNtoRhGu3PMt2R1A9nM7crzhi9z1Z+yt7+lucPzAvXZncFX/DEjf+PiH5Ybwvtqp+5 lf9zVIvW8iOCNlANTOcdQ6+hPYMM/ehRJijsIheG8PoDXDg8H52TWW1LS/eiQA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/u2BuUTSqZdVlNontfYSEOv3vBWRyRQQTr0mOU7iSOc=; b=xi4PryLzXyQoli5D06kvqqKbpKC1XFA0oNI3kEVbEvLFVQd0ITG22DaNxROqRJD8K40rkG udm4jqSh46EVlVCg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , "Martin K. Petersen" Subject: [PATCH v2 13/45] scsi: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:01 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: "Martin K. Petersen" --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 4 +--- drivers/scsi/lpfc/lpfc_init.c | 7 +++---- drivers/scsi/scsi_debug.c | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvsc= si_tgt/ibmvscsi_tgt.c index 16d085d56e9d..9e42230e42b8 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c @@ -2922,9 +2922,7 @@ static long ibmvscsis_alloctimer(struct scsi_info *vs= csi) struct timer_cb *p_timer; =20 p_timer =3D &vscsi->rsp_q_timer; - hrtimer_init(&p_timer->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - - p_timer->timer.function =3D ibmvscsis_service_wait_q; + hrtimer_setup(&p_timer->timer, ibmvscsis_service_wait_q, CLOCK_MONOTONIC,= HRTIMER_MODE_REL); p_timer->started =3D false; p_timer->timer_pops =3D 0; =20 diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index bcadf11414c8..d1ac1d1cec3c 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -7952,11 +7952,10 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *ph= ba) timer_setup(&phba->fcf.redisc_wait, lpfc_sli4_fcf_redisc_wait_tmo, 0); =20 /* CMF congestion timer */ - hrtimer_init(&phba->cmf_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - phba->cmf_timer.function =3D lpfc_cmf_timer; + hrtimer_setup(&phba->cmf_timer, lpfc_cmf_timer, CLOCK_MONOTONIC, HRTIMER_= MODE_REL); /* CMF 1 minute stats collection timer */ - hrtimer_init(&phba->cmf_stats_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - phba->cmf_stats_timer.function =3D lpfc_cmf_stats_timer; + hrtimer_setup(&phba->cmf_stats_timer, lpfc_cmf_stats_timer, CLOCK_MONOTON= IC, + HRTIMER_MODE_REL); =20 /* * Control structure for handling external multi-buffer mailbox diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 5ceaa4665e5d..fe5c30bb2639 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -6384,8 +6384,8 @@ static struct sdebug_queued_cmd *sdebug_alloc_queued_= cmd(struct scsi_cmnd *scmd) =20 sd_dp =3D &sqcp->sd_dp; =20 - hrtimer_init(&sd_dp->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED); - sd_dp->hrt.function =3D sdebug_q_cmd_hrt_complete; + hrtimer_setup(&sd_dp->hrt, sdebug_q_cmd_hrt_complete, CLOCK_MONOTONIC, + HRTIMER_MODE_REL_PINNED); INIT_WORK(&sd_dp->ew.work, sdebug_q_cmd_wq_complete); =20 sqcp->scmd =3D scmd; --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 8DEB022DF8C for ; Wed, 5 Feb 2025 10:47:00 +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=1738752422; cv=none; b=uiVwEXTelIpddcCQRxhJxIB8j19dhI8FrPAMsQa88CkZQ1FI/Yj/FpiGlqCQ0JM29nIS0rqkZg1Ua2sqUgvPbPxT1M191b0iVJi+1X7uc7bPSCNw/s4KVphZLkJHRAQXYyD7MnwCrXLqvbtLZYj1BOOvXolmjDbkyl/JEVEqVls= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752422; c=relaxed/simple; bh=UOf2/Y8F8BZf2qeQpJln+jMjEG7auOWl6hXxESuDhWE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CLpLOeyFocFU5KbT7BB2UzXNBp0y4ocn0D2iJLWcGo/x4ETnvwpuL8xVBaxm+vljQm9ZkKiS8+nHEhUAYSv0seCfRm7eN6gy6jBWLJf0XtbQrG12QBlgROV6MToiaip3tB6WMe8M0MdU2eFWmpP5r8Cw9RoSjxtmjpV0onnZKTQ= 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=mGw5uj/G; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=nCwJkZXS; 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="mGw5uj/G"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="nCwJkZXS" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CW0ESEBqmHamIsofGrUEsEy7d32I/4w69xlp4Y7u2Vg=; b=mGw5uj/GH7UBBP5KLF4N+GG68vBkcuysjyAtfSpy5e6gosvKWSz5eFOkBw/1PVAGGyMrSH YLNy0gz0/k8Tr2TiVOZt63+DVW8+p2hiJfUVJ0XiDkH82noWGW6/xNiJRav7gO1ustyste bJj/ywCbf0gmnNPjgZsTAnqiYDHF47KQLBHWc7DIGo3zsGlheLMZI98jwFC6WI2yAoXTH5 XQ6ouNjw0Gr9vPnQkpME2OUhzXMGn8sa5OoiHQj2gAqBFLQpNSYiMHRHhIoFxexJo8DEmV 1Vq72OIaNH4xOq66CnDVzMDYTvGPHCUoJnn34Y+JLeawulv32ly5Xb7bTthiAA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CW0ESEBqmHamIsofGrUEsEy7d32I/4w69xlp4Y7u2Vg=; b=nCwJkZXStepwo68UPAjUgg8rKosGrN+1ZVQZH6iRXbrcx7qrj21jQZhTWtJpJlPWr80bUY APkoeAPnqyE3K2Bw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Alexandre Belloni Subject: [PATCH v2 14/45] rtc: class: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:02 +0100 Message-Id: <22f3f087ddbab1708583033c07c3b7fb17810110.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Alexandre Belloni Acked-by: Alexandre Belloni --- drivers/rtc/class.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index e31fa0ad127e..b88cd4fb295b 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -240,8 +240,7 @@ static struct rtc_device *rtc_allocate_device(void) /* Init uie timer */ rtc_timer_init(&rtc->uie_rtctimer, rtc_uie_update_irq, rtc); /* Init pie timer */ - hrtimer_init(&rtc->pie_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - rtc->pie_timer.function =3D rtc_pie_update_irq; + hrtimer_setup(&rtc->pie_timer, rtc_pie_update_irq, CLOCK_MONOTONIC, HRTIM= ER_MODE_REL); rtc->pie_enabled =3D 0; =20 set_bit(RTC_FEATURE_ALARM, rtc->features); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 0FEE7231A38 for ; Wed, 5 Feb 2025 10:47:01 +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=1738752422; cv=none; b=N5EETOld1S1dPKRc8RGHB5FILqPlOEgtvFI0HtNlPULXe55RfAWEySZ3ps2xZ9A5I1T2PVCV2kOSGyu4dUkbRow5qQz2Ooscl92H2Gib3AVgKPZfhGUMzhp4jWGMnaU7xWLNrsm6Qb5Ie+I4UVcRIW/5/e6ALHSgrvn62TsiQhA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752422; c=relaxed/simple; bh=Ai8PZyuGPgiQbLhdU7Z/qMB14AOJJrKXbH9GdHYkJxA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MZOhmTvq6vDhYFGqFLRwh7DSXeRoLb7hPt3t1Ugwncg5jK0wIEO92GM9bF6VP1llyxIFS7RfUIRNL+wc03paJbYQvxiXja8KmAtvocwhTOVujPtNG47U5/xoUm7cXj1x52c6CcCEJR2Y3gHI4/OYatnOhIoi5mnYKvxSCJ2fe18= 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=glgUyYBF; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ka/v10IX; 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="glgUyYBF"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ka/v10IX" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UryDSTk/Jx5CqmMF2OX2pVFqILgCEUHxVNrRXznvA2I=; b=glgUyYBFSqrMudZ2pKCvBQBmTVGWwhHdpXV6dILiCtu6A7UCDs/9OhLOrJqHsQUh0F6XzV lOh7dd9mLdWCjYe4Q3WoVSAoubvsVXDePCyyV0SAit7ZsWV+L8lpHIAPlInzPCMFOFl1Sk ykmdV/EC+4r6fxKwrm64yNcyB3k6kL/fI3GzupAGhkzsOJPFBqjAndP+435E3MU9zaZAIL LlEvP0ExYS1CAH4FqDPgn+Ika7pN1EbnRajYDxaxqLGR0RkmvQYAxnSuVdenzqfYFBSw+o UtXBGFF2kCMtcm4XT6eyl3rvF+gKoaOd/rtQChmUCliRHp40H9MP9ozrbpxT6g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UryDSTk/Jx5CqmMF2OX2pVFqILgCEUHxVNrRXznvA2I=; b=ka/v10IXxkAVCWK07TguFytCXDLIl2nx1FdbFvpxGaDGwtOtvOvxRnrHHki5wxo/D00IPU GS6OzT71kDhg/eDQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 15/45] pps: generators: pps_gen_parport: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:03 +0100 Message-Id: <4bf3bb22e21f27c58bb28690d856df913431e693.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/pps/generators/pps_gen_parport.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pps/generators/pps_gen_parport.c b/drivers/pps/generat= ors/pps_gen_parport.c index d46eed159495..f5eeb4dd01ad 100644 --- a/drivers/pps/generators/pps_gen_parport.c +++ b/drivers/pps/generators/pps_gen_parport.c @@ -208,8 +208,7 @@ static void parport_attach(struct parport *port) =20 calibrate_port(&device); =20 - hrtimer_init(&device.timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); - device.timer.function =3D hrtimer_event; + hrtimer_setup(&device.timer, hrtimer_event, CLOCK_REALTIME, HRTIMER_MODE_= ABS); hrtimer_start(&device.timer, next_intr_time(&device), HRTIMER_MODE_ABS); =20 return; --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 6447822DFA9 for ; Wed, 5 Feb 2025 10:47:01 +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=1738752424; cv=none; b=mNopP/yTFgjGOeeBm+VRrT3fQ99hF+tYiKB2qLOh/yBN/3+jtdLYurklDNKdvpGd+dXCIdVGPID8jr/0/POqHWZZcGch5ZKvASy0DYwBlEl5hZWwnBUq6E2PPxSQbFtCyhBkdcIjITYeIHOmDx9sAFbV38H6IDiPVBYcpq9eziU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752424; c=relaxed/simple; bh=6g/QPUlIJV8swSm7eBhrCXyD5X9cUmz6Kj0wDivSvC8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cyuXRqIDoX7sqm90cSHh+or5QYxBBk2bX7fyREcWGAVATRXPe14N72XCOjK6JlwO28fiqHEXDvOEaWnKnssWOCLKRZR/kyJI5U0ms2fpCPT0MCRAOoDscfj1t5XHcuHHBuj7ZdJskGkONehkpDBKWLRvbxgKOcGxHScUERd5vYk= 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=d71f1Ln2; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=fm9oQDJ3; 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="d71f1Ln2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="fm9oQDJ3" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dv1Yu4iIeEMxKsUFYju9BcSqLadTHkwIowgqitCIxik=; b=d71f1Ln2mOnDn6Tgye60yVi0ljWznJqJ1cveAjbow+e0mfelBK/t4uWZPlZGCfSjV38VeK 5C47Qg3wbDmb6wNFScGmC7wvb+LZJqt8AfHQtcL8ExFdB12lb26GS4TcZf98rbjks8qAze EbKLrWrjy/ewxDcFpPuOnpQSMRLKhnl+/zP5ZkcGpa1dA05gyXT8o9gVd2JQV4FH4ZPVhK rJFj+UJTLy7epY5iRMKhgcBT4zffVVMYEiXB7vM8HiLmSsG9ypJAaXWYYJ69oYjfJbgrUj OuzTOunC/Kh76Nek4JUC5VqA62SKqnGEHKZ0wnj+pU0hH2k75sUWWriu4iebCQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dv1Yu4iIeEMxKsUFYju9BcSqLadTHkwIowgqitCIxik=; b=fm9oQDJ3w4R7Ho1KWAMKePPgCgqK/5Xjtecsfl9uD0oBFlU7f1ttjYtdz3qRYk+4yv5QCF CddpQFJjDxYiMmAg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , "Rafael J . Wysocki" , Zack Rusin Subject: [PATCH v2 16/45] powercap: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:04 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Rafael J. Wysocki Acked-by: Zack Rusin Signed-off-by: Nam Cao --- drivers/powercap/idle_inject.c | 3 +-- drivers/powercap/intel_rapl_common.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/powercap/idle_inject.c b/drivers/powercap/idle_inject.c index 04c212953ded..5ad7cc438068 100644 --- a/drivers/powercap/idle_inject.c +++ b/drivers/powercap/idle_inject.c @@ -339,8 +339,7 @@ struct idle_inject_device *idle_inject_register_full(st= ruct cpumask *cpumask, return NULL; =20 cpumask_copy(to_cpumask(ii_dev->cpumask), cpumask); - hrtimer_init(&ii_dev->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - ii_dev->timer.function =3D idle_inject_timer_fn; + hrtimer_setup(&ii_dev->timer, idle_inject_timer_fn, CLOCK_MONOTONIC, HRTI= MER_MODE_REL); ii_dev->latency_us =3D UINT_MAX; ii_dev->update =3D update; =20 diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_= rapl_common.c index 77d75e1f14a9..cf3d806284c4 100644 --- a/drivers/powercap/intel_rapl_common.c +++ b/drivers/powercap/intel_rapl_common.c @@ -2064,8 +2064,7 @@ int rapl_package_add_pmu(struct rapl_package *rp) raw_spin_lock_init(&data->lock); INIT_LIST_HEAD(&data->active_list); data->timer_interval =3D ms_to_ktime(rapl_pmu.timer_ms); - hrtimer_init(&data->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - data->hrtimer.function =3D rapl_hrtimer_handle; + hrtimer_setup(&data->hrtimer, rapl_hrtimer_handle, CLOCK_MONOTONIC, HRTIM= ER_MODE_REL); =20 return rapl_pmu_update(rp); } --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 1FB8E231A3A for ; Wed, 5 Feb 2025 10:47:01 +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=1738752424; cv=none; b=bq5uQ2vnOe2oTLupgvLHO8ve3pCplKLqPDefucWFg2KyfcWAbdWMw4hKj3mJbIN2wcDe2i/llcD4Q074wJSHvbelWhwVGmxmfsS6XoKrlQmhrfZEpjAK5j7NIUm93XH0ZdQX7KqfPmjFdV9ML53+jMHDlTePtH/UOa20kHKwibk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752424; c=relaxed/simple; bh=/QRUIEJcdu2fzCNJ6B++8ueh+6pepgnfzZAqUrn7yFU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gglEMn1IuoU4bYv7CBRt7Q6TD6DrAzT7b13xgCFRwrLZZeg3FJizVy/XN4/uIC8yfJ4M7jvo/P7dan5Aj1FdkD4YogIbX4m8PzHip3R1GaGNbiylTUtuUMVTZE7kl9NNowBU932CRfvu84ZGxjAWPLc4XKYySmCc6XwCGNe0AsU= 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=xZkZEglb; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=G7lUBUkG; 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="xZkZEglb"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="G7lUBUkG" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bbmDVlDtVzVzFQHYRxUSMUZd8c/cGrJwTV2M3nZVY6Q=; b=xZkZEglbrYL9mw22BU/uM9Vu3wNMUjb8aHwjL6p2fxSOiROh+DsUhm8+1MMzxBhyA1QHbn NnB5QTwEGc2AWKt43nwrD4xEWg3XU6kFlFNyg4TyB4sCJYT+F5C0QCSRI5R8vgzYzfuojn HoJkt3eCSG0A8Mh5kGoGudol7F72i4FOI4gYPJw+TUZ/z1jQyhQgUwI2JiGH48yJzOA1q2 l8dVzfqXldQadMh9nY7EBhUq48MEWSWhEEMRzhitIVFwdqDtk0IzSteUvc31SwQQva6eiF HeN3mXVeUCZqVW58bLbN+iFIedqQWBX44rx78c7zEpaUdHQigvyLKlgXdoZSHQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bbmDVlDtVzVzFQHYRxUSMUZd8c/cGrJwTV2M3nZVY6Q=; b=G7lUBUkGYxpz+mhE+LwQvws2OAfzjl0mpI0NRJDRN9wZCVDs4O1y2HxOxykpAZEpWsB9QD JqRAfuc4hQVXexCg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Linus Walleij , Zack Rusin Subject: [PATCH v2 17/45] power: supply: ab8500_chargalg: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:05 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Reviewed-by: Linus Walleij Acked-by: Zack Rusin Signed-off-by: Nam Cao Acked-by: Sebastian Reichel --- drivers/power/supply/ab8500_chargalg.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/power/supply/ab8500_chargalg.c b/drivers/power/supply/= ab8500_chargalg.c index 7a8d1feb8e90..dc6c8b0dd1cf 100644 --- a/drivers/power/supply/ab8500_chargalg.c +++ b/drivers/power/supply/ab8500_chargalg.c @@ -1787,13 +1787,12 @@ static int ab8500_chargalg_probe(struct platform_de= vice *pdev) psy_cfg.drv_data =3D di; =20 /* Initilialize safety timer */ - hrtimer_init(&di->safety_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - di->safety_timer.function =3D ab8500_chargalg_safety_timer_expired; + hrtimer_setup(&di->safety_timer, ab8500_chargalg_safety_timer_expired, CL= OCK_MONOTONIC, + HRTIMER_MODE_REL); =20 /* Initilialize maintenance timer */ - hrtimer_init(&di->maintenance_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - di->maintenance_timer.function =3D - ab8500_chargalg_maintenance_timer_expired; + hrtimer_setup(&di->maintenance_timer, ab8500_chargalg_maintenance_timer_e= xpired, + CLOCK_MONOTONIC, HRTIMER_MODE_REL); =20 /* Init work for chargalg */ INIT_DEFERRABLE_WORK(&di->chargalg_periodic_work, --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 75DB2231A49 for ; Wed, 5 Feb 2025 10:47:01 +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=1738752423; cv=none; b=IupAiAo9Yn5HgsFg/m2PY7ekwcU3GVUspzt7wtJI494x4sO+y9pb9l06Sre8L0dBGBfeo+ouJ3pDFc908JrXbMvrY1R2UhwBUiVYd09wNG8N5L848+c4MQyC5QYBKQ00jILfDzetNZCGFRiGZ8ROTEji6FLxPuKIQrZ/+K3cmY0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752423; c=relaxed/simple; bh=q/TtEJ+PMeZ70CVvP9TcLl2k7gIf0tam2BKdnctLRu0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KosK5/t1baFgP/LkITkDklHk1HM0RRXv1FdqzMKrg0sib9Rn5r8KdHi2GUDkCF0GTYQ728erpy0yEDC1EnVmSUMAdl/xYwqtDjTzKvHFqR1NE6Y4HtPIoUasQHWcLhgJI4S2LKlytb/MLsks2TvAzJtJQaDvltoKqc4HhOEcIsI= 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=gUTp/5b3; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=5a9a9FAi; 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="gUTp/5b3"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="5a9a9FAi" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XlAAacMbsh7R0RfJXl9zPs5EKSPtwFTBcKTNc8Fryos=; b=gUTp/5b3e0TvlsQ7Tk5SxquZ7bs9v1US/QUbFYLXr/zMwoDcZ9RUy8I3E49RP6XoNEpdn5 Ic7dmuwsEFdPDA8dvlpOPsjMgDAsi3aVF3l5/2RcuaMqfQndKNtmihlNQlqw2bYhOjYT5n SmBFOQCkBgRnde4ZJTpZ6L5m1qo9v8q2898h1eK1Eu5V/q4PtwB3Rxd/hVqZ/7jRxsjqkD Ahnj987s2Rtz4aHugDeYAklDGqYQeMwLL75isQByhn4vd8/9XnBZkYIdm0lTxUz78frixv ofgj0MG36WB1AFUon3FyyGDoiZDaAGOHtAG9rdiFKI+t9HqWFWawMLXX+RVcew== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XlAAacMbsh7R0RfJXl9zPs5EKSPtwFTBcKTNc8Fryos=; b=5a9a9FAiFQDuaH5bpcG8l7lcxJhoT1F2K0J4iXkhkJdgkun5XgEp+iUzy4SCRP1c2CT6UW 8BssEyIZw3n579CQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Sebastian Reichel Subject: [PATCH v2 18/45] power: reset: ltc2952-poweroff: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:06 +0100 Message-Id: <75ef5206f52f194b9c51653628cd2d0b083a482f.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Sebastian Reichel Acked-by: Sebastian Reichel --- drivers/power/reset/ltc2952-poweroff.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/l= tc2952-poweroff.c index 1a6fc8d38e20..90c664d344d0 100644 --- a/drivers/power/reset/ltc2952-poweroff.c +++ b/drivers/power/reset/ltc2952-poweroff.c @@ -162,11 +162,11 @@ static void ltc2952_poweroff_default(struct ltc2952_p= oweroff *data) data->wde_interval =3D 300L * NSEC_PER_MSEC; data->trigger_delay =3D ktime_set(2, 500L * NSEC_PER_MSEC); =20 - hrtimer_init(&data->timer_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - data->timer_trigger.function =3D ltc2952_poweroff_timer_trigger; + hrtimer_setup(&data->timer_trigger, ltc2952_poweroff_timer_trigger, CLOCK= _MONOTONIC, + HRTIMER_MODE_REL); =20 - hrtimer_init(&data->timer_wde, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - data->timer_wde.function =3D ltc2952_poweroff_timer_wde; + hrtimer_setup(&data->timer_wde, ltc2952_poweroff_timer_wde, CLOCK_MONOTON= IC, + HRTIMER_MODE_REL); } =20 static int ltc2952_poweroff_init(struct platform_device *pdev) --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 33D19231A41 for ; Wed, 5 Feb 2025 10:47:01 +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=1738752423; cv=none; b=fFblnXRDR0nC4tFz7h6ZFgxsgMOKvX8SnwzXHy5OFaf76wfT/Uigu+D2xJBkUGuVmVbcBH413uyONfqiawdAXCqYdFdUQ9WZ6/bLek8pVOL2CymN747PsSWhWiR9GCXtrxYEDBeYXEGKAJrwe3cGXXN6EdIpSGoU0SCZ/iS7GWA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752423; c=relaxed/simple; bh=jZqpz2l9g6hmV5ODIy3KvrappbuokMR0nWeWwI6Jk9M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FcNu57eTCF4UwxGbt37tiQk9W+6lVE/GuNx140fLw/QFpP7UmLISO7f0UMOIdKUbGnzOZ7Qy1eEoDwUaUOkTVMwgJRKgkmP6SYK7RF6+8ouhFCLIUGE3wVfkgh7z8F8Pmylf9A3ZagQQuATKQBb8f/iPoo9SgX9+C9mO3bc4SLQ= 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=LAzD2AW8; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=XkIL1LAy; 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="LAzD2AW8"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="XkIL1LAy" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T7LqWuuUfDm3xRsvF6tMM6TaXD7gQmWW7bF6UzLZQBc=; b=LAzD2AW8IUJGotNhJE08i4pLx+36lMPq4euqFhd5fOtEHhnmuCiaxb74/vgmC0l8QwPSEd UR1WCXCb2nLDH1OieR8bNAopFwV4FpUN0eyzEaG73SOFBVU5hRwCmBSssd1VNNs6qcEMuY fhIXp9sLQCjEl/OZIuR5KB3nJs1kdmgACcBqmqsAK6cOZAXdaqrramIQAggFIw7gzNejJ/ +MVf/w94oVeA+BL5bnwXL10qkKsApLe6zRSrk6TdBdVDioxDhIyZgRCgbkwAbkupuQi75y svvtArY1pENz2lcr7TRufozepnNLsbrG3zn7aLWfXBsXxZzDIYC/7aam9qIXlw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T7LqWuuUfDm3xRsvF6tMM6TaXD7gQmWW7bF6UzLZQBc=; b=XkIL1LAy1u4ZAYpoe8mAgx/xWrJt3PAYJGEmLkGp4FUv8MyjflV2Dfo6lfuGd9YiP45UYm Ku7e4d6Q0XKOv3Cg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Will Deacon Subject: [PATCH v2 19/45] drivers: perf: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:07 +0100 Message-Id: <471ea3b829d14a4b4c3c7814dbe1ed13b15d47b8.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Will Deacon --- drivers/perf/arm-ccn.c | 5 ++--- drivers/perf/marvell_cn10k_ddr_pmu.c | 4 ++-- drivers/perf/thunderx2_pmu.c | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/perf/arm-ccn.c b/drivers/perf/arm-ccn.c index d5fcea3d4328..1a0d0e1a2263 100644 --- a/drivers/perf/arm-ccn.c +++ b/drivers/perf/arm-ccn.c @@ -1273,9 +1273,8 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn) /* No overflow interrupt? Have to use a timer instead. */ if (!ccn->irq) { dev_info(ccn->dev, "No access to interrupts, using timer.\n"); - hrtimer_init(&ccn->dt.hrtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - ccn->dt.hrtimer.function =3D arm_ccn_pmu_timer_handler; + hrtimer_setup(&ccn->dt.hrtimer, arm_ccn_pmu_timer_handler, CLOCK_MONOTON= IC, + HRTIMER_MODE_REL); } =20 /* Pick one CPU which we will use to collect data from CCN... */ diff --git a/drivers/perf/marvell_cn10k_ddr_pmu.c b/drivers/perf/marvell_cn= 10k_ddr_pmu.c index 039feded9152..72ac17efd846 100644 --- a/drivers/perf/marvell_cn10k_ddr_pmu.c +++ b/drivers/perf/marvell_cn10k_ddr_pmu.c @@ -1064,8 +1064,8 @@ static int cn10k_ddr_perf_probe(struct platform_devic= e *pdev) if (!name) return -ENOMEM; =20 - hrtimer_init(&ddr_pmu->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - ddr_pmu->hrtimer.function =3D cn10k_ddr_pmu_timer_handler; + hrtimer_setup(&ddr_pmu->hrtimer, cn10k_ddr_pmu_timer_handler, CLOCK_MONOT= ONIC, + HRTIMER_MODE_REL); =20 cpuhp_state_add_instance_nocalls( CPUHP_AP_PERF_ARM_MARVELL_CN10K_DDR_ONLINE, diff --git a/drivers/perf/thunderx2_pmu.c b/drivers/perf/thunderx2_pmu.c index cadd60221b8f..6ed4707bd6bb 100644 --- a/drivers/perf/thunderx2_pmu.c +++ b/drivers/perf/thunderx2_pmu.c @@ -752,9 +752,8 @@ static int tx2_uncore_pmu_add_dev(struct tx2_uncore_pmu= *tx2_pmu) tx2_pmu->cpu =3D cpu; =20 if (tx2_pmu->hrtimer_callback) { - hrtimer_init(&tx2_pmu->hrtimer, - CLOCK_MONOTONIC, HRTIMER_MODE_REL); - tx2_pmu->hrtimer.function =3D tx2_pmu->hrtimer_callback; + hrtimer_setup(&tx2_pmu->hrtimer, tx2_pmu->hrtimer_callback, CLOCK_MONOTO= NIC, + HRTIMER_MODE_REL); } =20 ret =3D tx2_uncore_pmu_register(tx2_pmu); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 64677231A47 for ; Wed, 5 Feb 2025 10:47:01 +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=1738752423; cv=none; b=jBeDn0uRART4Zjb1GpLRESWYqo/7mXiax+temchgO5gkwS8NU7L80DX1HtW3WIGChZAqVkGH3ksveBTiaX1er8iVw6+9VMDtM9ctHpdrfWptu4NSt9ncGz+vduL9enkeW7ccAYryY+BAoFWp44bM2KH701aiRMwmmX71EUI+VoI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752423; c=relaxed/simple; bh=KcS9816fJheDiWtFqqkQ+ZORgTSYWJtxFsnHscgU5/U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=R0YA3XS9wt7pNjvV1wGwKwM/wBUmuKcbCQBs/A+wOe4Z8KQYyqVzMiC5+05oSyt7lomD3S9HyLIKclgV/GCo280LSuHN3TKPLqbr8aQilgzL+eT92yF49tO6LmMYe8S3wjAm42B/vefXySroepae26qLKwQQm5Yyxgs8lfEXeoQ= 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=QAVwSgI9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=E9wd33dL; 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="QAVwSgI9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="E9wd33dL" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Em2KYYUu8s44zqSIbzIXarV+zjk25kc0U4I2CCdKN9M=; b=QAVwSgI9nNrzCQ/IFnBw74uyg+CGO91MJwH2l6lQw2Ci6Cpxi38MxG0t2uq+izFpmHrCdu JpnpCzEO77kxX/WDzugpa/KKhSAAZHBMBtJtcXpNA0TF1mBOhujnH2ABvQfCGExuVciWte cYnJHZr9+3uPhhuR00zt+OMyYzTkZVcxl6e4nFYoB1KsDtIQ7e8kVrJJlHG+7Vh4i9qeSJ aU/zRKtcrmFthwe06OBzJDntVPtkgcFOv9Jwl0estAMgDXEbBVnEd64N1LUXarOkoHK8l1 SaB57vlFedyiVtQz46LHcZS6V7GMsC1wbqGf0mfAuPHjoYyu3utL8kwyswOS0g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Em2KYYUu8s44zqSIbzIXarV+zjk25kc0U4I2CCdKN9M=; b=E9wd33dLqCwOeuNfX40tuD+ZYrUFro9AKLqDROZi/28qtYMvwtwhPC9yI377uw0oUmMn53 U+VtboQZCqG75qCQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Jon Mason Subject: [PATCH v2 20/45] ntb: ntb_pingpong: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:08 +0100 Message-Id: <2b179e16ab830611fdcb09a33a5a531c9800679b.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Jon Mason --- drivers/ntb/test/ntb_pingpong.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/ntb/test/ntb_pingpong.c b/drivers/ntb/test/ntb_pingpon= g.c index 8aeca7914050..1c1c74f4ff2d 100644 --- a/drivers/ntb/test/ntb_pingpong.c +++ b/drivers/ntb/test/ntb_pingpong.c @@ -284,8 +284,7 @@ static struct pp_ctx *pp_create_data(struct ntb_dev *nt= b) pp->ntb =3D ntb; atomic_set(&pp->count, 0); spin_lock_init(&pp->lock); - hrtimer_init(&pp->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - pp->timer.function =3D pp_timer_func; + hrtimer_setup(&pp->timer, pp_timer_func, CLOCK_MONOTONIC, HRTIMER_MODE_RE= L); =20 return pp; } --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 D02CE231A56 for ; Wed, 5 Feb 2025 10:47:01 +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=1738752424; cv=none; b=j4uUQC9gaF4yfY9slC4x3KPYggtFzhvQz0LSyIxcDo43eVf+9FA0wUMQxwKE7t3f2VQMcTANWRYyxuC2X3QiSCOOYhNIhYmk4Q//7fnzIHUu9rkq+mk9zF4Azz9AhcUErKJDCbF+RYpPcYjKN9fyuytTULXLPrZo86d7ibFY4nc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752424; c=relaxed/simple; bh=+/v+DBFOKvZ6C1gyZn6NPsri4C7kmGvx5U9E169BkxY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lIhM33F8c1POleDk85qeGrr6oG+sqyK5yMkE3Y+I83XLmGLwyzvfLA+dteVSetfY49g9Co24yzuVa/phbQ5VVn7OYYWH7ptGcvRKwlv6SnmLBqRfST+fLHgZR/3K2D1IDgRuxXQqS2cx02LdDoofZnUqM7OC/kKpq+xB1RG8nT8= 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=USNBOLJ5; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=UXeGAzW3; 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="USNBOLJ5"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="UXeGAzW3" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YbUPMTaZt/M9AaKi667HoikX83gz5kNwlQt6n1L9PN8=; b=USNBOLJ5+YFvfzSS5JAaLXVpLLlXnu1jYWsav69rMgFAUgF5ciXUBp+c7s/QPkBY5He7Zt GowLT8NDAtL91eXDlhoBhFuW6Kh8ZL3EaIvxJKvwwDYV0ncV07A2YAhvai3NkGbW5JvZbe 592mukJx2fMXnXOckTH0nojSeW+1rrswv03LZxLqa2aQYVA8y2OHXRc8H6otg85d40bsIC pMsE0M9VkWoKybDhOv8sWfanTGnuT/OBhqGRgiajuDf/iRMZXqYNbBW289+O/pkW6gaOCT VnG9JV4FQDdb12ZqJSNbFZeqNAmi30ZFRM8tkDkorLgQcDkfC20pNoEA6f51jw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YbUPMTaZt/M9AaKi667HoikX83gz5kNwlQt6n1L9PN8=; b=UXeGAzW3npbNYghnG1hZ++GApQnS7UJZVsI4VbfEA53rBtIhIY0vqTkxxjvEKPL7jyO02k NmmSesduzxxtjTBg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Jaehoon Chung Subject: [PATCH v2 21/45] mmc: dw_mmc: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:09 +0100 Message-Id: <4dec579387ced5e97bb25739fad2ac852e5a689c.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Jaehoon Chung --- drivers/mmc/host/dw_mmc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 3cbda98d08d2..31f40c04afda 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1875,8 +1875,7 @@ static void dw_mci_init_fault(struct dw_mci *host) { host->fail_data_crc =3D (struct fault_attr) FAULT_ATTR_INITIALIZER; =20 - hrtimer_init(&host->fault_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - host->fault_timer.function =3D dw_mci_fault_timer; + hrtimer_setup(&host->fault_timer, dw_mci_fault_timer, CLOCK_MONOTONIC, HR= TIMER_MODE_REL); } #else static void dw_mci_init_fault(struct dw_mci *host) --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 CF70122DFA8 for ; Wed, 5 Feb 2025 10:47:01 +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=1738752423; cv=none; b=PO9Y0n6iBoA0XYoJcDGNamq6lJKblRjCHXADu8odfIv4yOBnCQHWsoJFSFAFUk79oUS9I9tenXgAK3XFKYX+yTYvTar/aic1G6iqwyCB3SROq80MAldz3XEnmDYbZ9+egN8ZyRrBVnyO31pal07x4bcIvFbkqnRYUgHK0PMguzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752423; c=relaxed/simple; bh=NTzCf7qh2LlxsQNyaVS0ITS/LvjhAOY4FgMdFq3DsbI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=P3Cwt1dzjNyca8wnIMcCz5hAEpSRpR4+TA/upOa9Cyc59ujO6LORuKH1NASHRap2mAh39PXnuaGAPWYMT/2EOXJU1efe+kBf3MtJgd/7BSaYGBQ5q8y+lNltb9m+EBWnQo9g44rlxvLE+xT7eHZNrZvrRyRFIjwfUpwAWmTFXnE= 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=HwSU6OT9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=PthrRuWx; 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="HwSU6OT9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="PthrRuWx" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W0/5h8SnECt6G+uZTSG0mM4WQSpxVtA+ab0q9wDtDK4=; b=HwSU6OT9oWXviLvrGO1A64Mb7YOAKO71OoybQj3uinopksLOCDJ+B6Uich/m3fVvR6W2Ko YK3KRUWM3/tCy9+n7C2s0yuDYYQ/6DPWbVE/BWt+tl/K8oDncm4CAUok4szrwshQ1eJuWJ ll7+AdJ3Qkt/bOpdIprhEBAkhHV7lufM3dJhSag+DpAFbe7+jhesW4vbDrENcqYzf1gueT Now4I6Mf56JZD7nv++S6+u6hvDq41m559ulWDXN7DfXrFzAVp33C/QQog0JDFjQpm/Q1cM coMuOfD7+tEL3KUvrwamL2xQZiIZbuHnONrAJDiE0xFE03HzOMEkY5hErX6dOQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W0/5h8SnECt6G+uZTSG0mM4WQSpxVtA+ab0q9wDtDK4=; b=PthrRuWxaGvkPXfWm3Ot7UqPfohO1xhprCiDAhsWHbisI6MXtl/APmvfjfgF0tSp1yry0C xaKNE4wfUPtBYgBA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Greg Kroah-Hartman Subject: [PATCH v2 22/45] misc: vcpu_stall_detector: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:10 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Greg Kroah-Hartman --- drivers/misc/vcpu_stall_detector.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/misc/vcpu_stall_detector.c b/drivers/misc/vcpu_stall_d= etector.c index f0b1fc87490e..26166357b255 100644 --- a/drivers/misc/vcpu_stall_detector.c +++ b/drivers/misc/vcpu_stall_detector.c @@ -111,8 +111,7 @@ static int start_stall_detector_cpu(unsigned int cpu) ping_timeout_ms =3D vcpu_stall_config.stall_timeout_sec * MSEC_PER_SEC / 2; =20 - hrtimer_init(vcpu_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - vcpu_hrtimer->function =3D vcpu_stall_detect_timer_fn; + hrtimer_setup(vcpu_hrtimer, vcpu_stall_detect_timer_fn, CLOCK_MONOTONIC, = HRTIMER_MODE_REL); vcpu_stall_detector->is_initialized =3D true; =20 hrtimer_start(vcpu_hrtimer, ms_to_ktime(ping_timeout_ms), --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 32A17231C88 for ; Wed, 5 Feb 2025 10:47:01 +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=1738752425; cv=none; b=KH9dNmG9vJQYyYsAawwfkjbdvbhK3aje8ve1IkStO4CPjilLswkRqpufjcCd0grJHTBM/ugTtk9Y27SXt7VSn4450/ex4tgXllJAeIfKO0KCvytKkvfeKrM/uQwbA58A4lOVdE1QYQZwxroA+zXGgXkHO41VAWIcpY6ldHIcUDI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752425; c=relaxed/simple; bh=2+AVOagAv9Wra+Daw7HSNCfiR+ud8KcVFtNDX2w1N2c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uE5ZA4YoozSnbvjiriobW4/CrA/6AXhNF9/dvjGxviwN0cfnjTH4JM14vS7sJVmtiNpv6fIjf6tdVNsA1AxarJI9wrkBtV44fGQ/P9V8hFmfxsyO8R5/qZYjKcFyqPaHqzrmK/y0BmiYpHCd81qG2eMXfZ23QT1YUdZ7ESRoCfg= 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=PMC/eQUw; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=w60jytqP; 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="PMC/eQUw"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="w60jytqP" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NV6PG0EvKYNo6jsyK94R/Nc6s8RtmSclnNRocz6VOi0=; b=PMC/eQUwMKyJquWaf2O3Ms87pm5Nocfi6yifGdAUe6gxSOr+E0EJxC8O3ll9Z6ae2zurMs Yv5bAh6ro6dfDHpQw+PUrDoL0kd/X+O3kIBerftMHM1smC8pLIHFCMqKGeGoTavQBzRIn2 rgx7Bwgv1tbhK4shikDSfNFLT/K8YFh76NDqKQNzdz5e3YJUrb0nYKVN/osGWt4HFSKiH1 EPRWrVwAPXLebjEP+wUtHaOLnTpXjXQb8Lt61nL1F1kGbZWahls+oaqrcMjGqAvuHMC0xA hilpsdhCtzgUJ8KJ7/sFQ37OJAyC5BEBv8zIppI6GAAFzrCGMYDif9uiDResdQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NV6PG0EvKYNo6jsyK94R/Nc6s8RtmSclnNRocz6VOi0=; b=w60jytqPwduhDa9IZEhA10yxRy5sFNZ1ZKMQlSDyWAob3HSY/Z8orBZTvQNuBnPIDbXMS/ 5kqLUqszaVOiHfDA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Hans Verkuil , Zack Rusin Subject: [PATCH v2 23/45] media: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:11 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Hans Verkuil Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Hans Verkuil --- drivers/media/cec/core/cec-pin.c | 3 +-- drivers/media/pci/cx88/cx88-input.c | 3 +-- drivers/media/platform/chips-media/wave5/wave5-vpu.c | 4 ++-- drivers/media/rc/pwm-ir-tx.c | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/media/cec/core/cec-pin.c b/drivers/media/cec/core/cec-= pin.c index a70451d99ebc..bebaa40e0eb5 100644 --- a/drivers/media/cec/core/cec-pin.c +++ b/drivers/media/cec/core/cec-pin.c @@ -1346,9 +1346,8 @@ struct cec_adapter *cec_pin_allocate_adapter(const st= ruct cec_pin_ops *pin_ops, if (pin =3D=3D NULL) return ERR_PTR(-ENOMEM); pin->ops =3D pin_ops; - hrtimer_init(&pin->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); atomic_set(&pin->work_pin_num_events, 0); - pin->timer.function =3D cec_pin_timer; + hrtimer_setup(&pin->timer, cec_pin_timer, CLOCK_MONOTONIC, HRTIMER_MODE_R= EL); init_waitqueue_head(&pin->kthread_waitq); pin->tx_custom_low_usecs =3D CEC_TIM_CUSTOM_DEFAULT; pin->tx_custom_high_usecs =3D CEC_TIM_CUSTOM_DEFAULT; diff --git a/drivers/media/pci/cx88/cx88-input.c b/drivers/media/pci/cx88/c= x88-input.c index a04a1d33fadb..b9f2c14d62b4 100644 --- a/drivers/media/pci/cx88/cx88-input.c +++ b/drivers/media/pci/cx88/cx88-input.c @@ -190,8 +190,7 @@ static int __cx88_ir_start(void *priv) ir =3D core->ir; =20 if (ir->polling) { - hrtimer_init(&ir->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - ir->timer.function =3D cx88_ir_work; + hrtimer_setup(&ir->timer, cx88_ir_work, CLOCK_MONOTONIC, HRTIMER_MODE_RE= L); hrtimer_start(&ir->timer, ktime_set(0, ir->polling * 1000000), HRTIMER_MODE_REL); diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu.c b/drivers= /media/platform/chips-media/wave5/wave5-vpu.c index d1320298a0f7..8479dc9c9a8f 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu.c @@ -269,8 +269,8 @@ static int wave5_vpu_probe(struct platform_device *pdev) dev->irq =3D platform_get_irq(pdev, 0); if (dev->irq < 0) { dev_err(&pdev->dev, "failed to get irq resource, falling back to polling= \n"); - hrtimer_init(&dev->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED); - dev->hrtimer.function =3D &wave5_vpu_timer_callback; + hrtimer_setup(&dev->hrtimer, &wave5_vpu_timer_callback, CLOCK_MONOTONIC, + HRTIMER_MODE_REL_PINNED); dev->worker =3D kthread_run_worker(0, "vpu_irq_thread"); if (IS_ERR(dev->worker)) { dev_err(&pdev->dev, "failed to create vpu irq worker\n"); diff --git a/drivers/media/rc/pwm-ir-tx.c b/drivers/media/rc/pwm-ir-tx.c index fe368aebbc13..84533fdd61aa 100644 --- a/drivers/media/rc/pwm-ir-tx.c +++ b/drivers/media/rc/pwm-ir-tx.c @@ -172,8 +172,7 @@ static int pwm_ir_probe(struct platform_device *pdev) rcdev->tx_ir =3D pwm_ir_tx_sleep; } else { init_completion(&pwm_ir->tx_done); - hrtimer_init(&pwm_ir->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - pwm_ir->timer.function =3D pwm_ir_timer; + hrtimer_setup(&pwm_ir->timer, pwm_ir_timer, CLOCK_MONOTONIC, HRTIMER_MOD= E_REL); rcdev->tx_ir =3D pwm_ir_tx_atomic; } =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 8B3D4231CA2 for ; Wed, 5 Feb 2025 10:47:02 +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=1738752424; cv=none; b=nINDU6PeNUzqla5vRiKDUNDgN3DEb86+ju3pWUqvWl74OcNp9kqxcpGRtfnnHzTJnr8PUuCYefU2Hfc6wenNtAUNH+eirDCxWaaj9W6M/ZfAcr+0bI7IMHKppRTaYjggaV9S6clxzH+tZXlOadPbQAVYS35KAm7ck+REBXGvX/I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752424; c=relaxed/simple; bh=xRkFOWHuZ+4aavyCFjkbkfd+GJEMFsXNmhrm/e95+8I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IgY03aVnZVpxXRvLJkSskPuq2EPrZMgecJMEdlmruytiwx8RYI9cNq7k5hHIK7KQUexRhJiiRpP1WjRSkkj6kKULfLBop2nlZVsafbuaD5AUKxAfiVwxYJrNIfAmYWWhk57qIHGb180Nmfh4LOYvyIe2cbrrN5pCWRUf4239FwI= 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=ziQSI3e5; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=sd8EGdt7; 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="ziQSI3e5"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="sd8EGdt7" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ypoh5bPsfxOM77Dymarue9WtxfUD42b9bpRlgO7jFRQ=; b=ziQSI3e57QrJCb6Go3UMd6AGPlrdJG2fJjIOJsSZgsy3aAvBqcaNoGy1rmSlzC2n5eSPY2 poEfVElDycTubu+LAZaIlX21OJO+iCX7FtWlLvGB7zShs3u2hGKocnV+FdL9TwBcNXmLuf QhgnEjmjJBJCcVahvH9J9cnMVvFEwI+P4bdyvnAElWZrFhCvTLksDOiyWpOOR8fj3N0Kxf bSoYQPVZgmBERGdSeB5VWPnASY3Xosbb+LptKBu9kay6EyEccjl4O3gpswK/stLtkl2/9j yuPQ9dxx6nW7pNAuoq4bnErm7FT30ZxRlQ/4KkUnGzi/o8AXvyNnqFWQqP4nrg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ypoh5bPsfxOM77Dymarue9WtxfUD42b9bpRlgO7jFRQ=; b=sd8EGdt7DB+4jVCmgKh8tXZkIWY6VTBdXu+vH4nkCQO5EonW63pnBpOzDlwW4u0muILHtI pb4wJNo56bhqK6CA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Jassi Brar Subject: [PATCH v2 24/45] mailbox: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:12 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Jassi Brar --- drivers/mailbox/mailbox.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index d3d26a2c9895..118beaf447aa 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -534,9 +534,7 @@ int mbox_controller_register(struct mbox_controller *mb= ox) return -EINVAL; } =20 - hrtimer_init(&mbox->poll_hrt, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - mbox->poll_hrt.function =3D txdone_hrtimer; + hrtimer_setup(&mbox->poll_hrt, txdone_hrtimer, CLOCK_MONOTONIC, HRTIMER_= MODE_REL); spin_lock_init(&mbox->poll_hrt_lock); } =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 0CE0523236E for ; Wed, 5 Feb 2025 10:47:02 +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=1738752425; cv=none; b=QEIIN7x1R1/tKHm0hawKO0jT8RbthK6e9N7CxVY5FjTk+e+d8Jn3nUndTj9TBRLILzDyfhEA/m5aSj/RvKL8UStC14OmBlNphR78ehWSXMEi8tMLZY5zcPBW9tlIuMlPrw+0Kee/14kg/j+P7EwNpQfRVfEe8AFTxhx2VsI18lQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752425; c=relaxed/simple; bh=aYBCsYtn+CzikXXVzPpDKM316C72CEViAATzTT0g8o0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=d0tDtH9BVE5OUoHZHpJI9vUfVIH6SxsbZaELTKXZsZ2FvcEpD9QBzew+J3FpK9nbXpNLC9CunWh1e8XpAUGo8hp4Ek2Gwd6fLCXUOK95ZiAwywFDMoecrWrZvECSha284p95xkW1qMH32P2siDShjyaEH8dsXl+6khWRQu4uDVk= 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=ZUJU6HnY; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=6wDSBPvK; 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="ZUJU6HnY"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6wDSBPvK" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SHxmbs9CMkIPXFurAWE/4zIPrlVyczWIEvoEg/ZzHLM=; b=ZUJU6HnYVlQ1pB6PKmzy1sx+d/hOVIzg6Lk6vbGfcMuKF6zWKl7zNCTkSpBk9diiK+gHJK ILrThkz+KOIcisNMxmRyS/nGk1ckbDYxKmNeNlIuXQ18iYo/LNiFax+RP8tkH7sNm4R+ye 4csw/O8uBPMGEO5DwFzmk9mtMwGJpymKTeS19lSeTmcoDXAcOZaNAzD+Ac8tfs9jF1hz8H sCV+efeNRLxt3BROrKxdQo7jzMShqYOiEznU/TFwsYY23u2MyJT0q8zK1pOzZzCIkFCXif U/ZIQ8XQgbMA219dDUST7AMpKJaP7fEW8cspiOihEy/rbr6sx/OhgZQ0SjeOKA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SHxmbs9CMkIPXFurAWE/4zIPrlVyczWIEvoEg/ZzHLM=; b=6wDSBPvKWtSj1F/9MxqAKm64bKK+eImAvZ/xT1EY+Oado9rmDaBdNzxsILz8+SaDleVLoJ 6s1yl2rLAMZ5iUDg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Pavel Machek Subject: [PATCH v2 25/45] leds: trigger: pattern: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:13 +0100 Message-Id: <76fa1cc9777a99a48f49f949abadc1c10af1bc64.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Pavel Machek --- drivers/leds/trigger/ledtrig-pattern.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/leds/trigger/ledtrig-pattern.c b/drivers/leds/trigger/= ledtrig-pattern.c index aad48c2540fc..a594bd5e2233 100644 --- a/drivers/leds/trigger/ledtrig-pattern.c +++ b/drivers/leds/trigger/ledtrig-pattern.c @@ -483,8 +483,8 @@ static int pattern_trig_activate(struct led_classdev *l= ed_cdev) data->led_cdev =3D led_cdev; led_set_trigger_data(led_cdev, data); timer_setup(&data->timer, pattern_trig_timer_function, 0); - hrtimer_init(&data->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - data->hrtimer.function =3D pattern_trig_hrtimer_function; + hrtimer_setup(&data->hrtimer, pattern_trig_hrtimer_function, CLOCK_MONOTO= NIC, + HRTIMER_MODE_REL); led_cdev->activated =3D true; =20 if (led_cdev->flags & LED_INIT_DEFAULT_TRIGGER) { --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 0578E23236D for ; Wed, 5 Feb 2025 10:47:02 +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=1738752425; cv=none; b=O3qi/Xk14Yaxhkeso3rrGjRpglLy3/qUJssQg+e8Uf9VKYX06SKkxBSfzZYUfev6RMXITZHkA8oPBnvYZtb/rNCFv3cneknhHFOnCI25nF+hypr1H/hFXQOeytnF6AzEhHSATKc2OAoVpqgBedtrR8a/uJf6KzmOrO4IGPtFzp4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752425; c=relaxed/simple; bh=Lybvc7LO/jeeVpjBAU8joTd/29m68j3g5FVa67y2zXg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Nvbdwm33cWHRb5Rf85KNiE3vCdFrvt+48zqSuzoiFooTNQ2QbiniTGat4fRAGIjWZaz32aYcApiuLi1lShm9v4r5SLPluJ+YwpIpBJthPc9FmCe2WGz65Y4CoKBdpeeo0cSMjL+SUkB4FH0S73yLzAyO/eg3X0h/yusyhEO8awE= 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=o/QctFBI; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=K/kHWhYh; 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="o/QctFBI"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="K/kHWhYh" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZLkUtUnLETo6ELVPNAVhtdtOwGBRl4rSaF031Rj8MNw=; b=o/QctFBImjZwxPkJeYpHxJ1v9yysweDeXLa0Hc52hKPadqgw9r1iNj8/HZz+CtNpW1ZJT5 1RkqAFC2Y6JhI1YeOeD547/Wi8IPmLkXntv/2RkVJDfKYjgD7xp/LqNUAcFUU85l73RELW TY3QpFCE1qV/mYmx5T7aZkWo2FKMYugv/xGrgBic9vtRYEB7HEy4IxO+uNFB+w9qR8nqsz DS54lv1ikpCSMLxf5XEEO89tU4FrpA3HQlVwXewLgvI1hEsLX/ufo+n/7M4U28GH2wFLJy +uzW81AHR9OlWFRWd3Y00fwUwNzWqug913jk9wLy8gh3q0aQO5WFRohwzNgb9w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZLkUtUnLETo6ELVPNAVhtdtOwGBRl4rSaF031Rj8MNw=; b=K/kHWhYhelQtonGHXyhUrrET7pDiT66362k4J+N54QDVGAse7A/skGgkDCVeTjJMGzdEPo pc4tPYxfJz621eAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Dmitry Torokhov Subject: [PATCH v2 26/45] Input: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:14 +0100 Message-Id: <62db561622799dfc8d58682ca41b54e3f1ff6949.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Dmitry Torokhov --- drivers/input/joystick/walkera0701.c | 3 +-- drivers/input/keyboard/gpio_keys.c | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/input/joystick/walkera0701.c b/drivers/input/joystick/= walkera0701.c index 59eea813f258..15370fb82317 100644 --- a/drivers/input/joystick/walkera0701.c +++ b/drivers/input/joystick/walkera0701.c @@ -232,8 +232,7 @@ static void walkera0701_attach(struct parport *pp) goto err_unregister_device; } =20 - hrtimer_init(&w->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - w->timer.function =3D timer_handler; + hrtimer_setup(&w->timer, timer_handler, CLOCK_MONOTONIC, HRTIMER_MODE_REL= ); =20 w->input_dev =3D input_allocate_device(); if (!w->input_dev) { diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gp= io_keys.c index 5eef66516e37..166cfc67d98b 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -590,9 +590,8 @@ static int gpio_keys_setup_key(struct platform_device *= pdev, =20 INIT_DELAYED_WORK(&bdata->work, gpio_keys_gpio_work_func); =20 - hrtimer_init(&bdata->debounce_timer, - CLOCK_REALTIME, HRTIMER_MODE_REL); - bdata->debounce_timer.function =3D gpio_keys_debounce_timer; + hrtimer_setup(&bdata->debounce_timer, gpio_keys_debounce_timer, CLOCK_RE= ALTIME, + HRTIMER_MODE_REL); =20 isr =3D gpio_keys_gpio_isr; irqflags =3D IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING; @@ -628,9 +627,8 @@ static int gpio_keys_setup_key(struct platform_device *= pdev, } =20 bdata->release_delay =3D button->debounce_interval; - hrtimer_init(&bdata->release_timer, - CLOCK_REALTIME, HRTIMER_MODE_REL_HARD); - bdata->release_timer.function =3D gpio_keys_irq_timer; + hrtimer_setup(&bdata->release_timer, gpio_keys_irq_timer, CLOCK_REALTIME, + HRTIMER_MODE_REL_HARD); =20 isr =3D gpio_keys_irq_isr; irqflags =3D 0; --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 8837122DFAD for ; Wed, 5 Feb 2025 10:47:03 +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=1738752425; cv=none; b=S8AsEKOQ8L0KnTcUOjZHUqIC0+SLyebXa65HJSlgLD4SSdLfF8fCmEM0+MO5WgmIZj822DitFkSrCHf8Gij6/G+PHJmWarecMjgrcWZveydLpZy9hAIxk2iOsE75mkMioSGG2j2BHDUixCq1KGIkAMJZdKDGfk04XhZH7t8PgZA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752425; c=relaxed/simple; bh=e03tCuce8sqgdxMjGoPUhTA7EjXanDQNQRZyXjJkUaY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GAv2vHZ50bQHrVuumA5V91E9/IawX5yaRj+49TwFjH5ctJAs/n3wyEnGWKVbhV0/gXEs96asuSL3Y8QD3r1Iwgs2eIrp8r2pv8afhY4wKMZz/btjo0kPAoYaz/m9H0LqgyrNZlztzAjovLS4HitXd3Wcdi0tz7p+BRMmcAn2LEs= 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=t3FXt1la; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=4w/mrT/G; 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="t3FXt1la"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4w/mrT/G" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EON2od1YOzSZTiDMeNdc0/opP1+ZKtlRHo3VBdgx5UM=; b=t3FXt1lajuPwqKvdovU5dXiQU1aWdCYzYh5HFRnfzhXyiO2/GiDdMce02c2HmiwffIpbW5 9V4ldyRikgyBeNAeN9rPQoTUTN7PKbemEth3BSYNpJ1EdjVTGQ+c4S8dIoLCs/PQpnjPKD nZkV4RkQzWqXBS04291VDSl0Yf0vpgQ3EnW5l0B5S++tzekYkoWkSTOPbXzO973EO81G7O 78OOGw9zmvVvbWdZ7RGqqK/V4XGFA2k4ghGzNIpNcZvqb6lwC1+dfqN5/YXsJbS+vttnYx 8AHU559/KPoLG1xUfZzESmhhOLDhsq0S7yiYFgOxxiVCMrYbQ7HfX0oiTbxOHw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EON2od1YOzSZTiDMeNdc0/opP1+ZKtlRHo3VBdgx5UM=; b=4w/mrT/G+t7/H6D01vkVqGMX6W9ACsP+dhURL5ueY2a2sBL7Ex5eFtEYTqJSNzg2Fm8FEs TOy8PbgFQ4CY1XAQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jonathan Cameron , Zack Rusin Subject: [PATCH v2 27/45] iio: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:15 +0100 Message-Id: <570792e31b28a94a511c19c6789f2171a6745685.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Jonathan Cameron Acked-by: Zack Rusin Signed-off-by: Nam Cao --- drivers/iio/adc/ti-tsc2046.c | 4 +--- drivers/iio/trigger/iio-trig-hrtimer.c | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/iio/adc/ti-tsc2046.c b/drivers/iio/adc/ti-tsc2046.c index 7dde5713973f..49560059f4b7 100644 --- a/drivers/iio/adc/ti-tsc2046.c +++ b/drivers/iio/adc/ti-tsc2046.c @@ -812,9 +812,7 @@ static int tsc2046_adc_probe(struct spi_device *spi) =20 spin_lock_init(&priv->state_lock); priv->state =3D TSC2046_STATE_SHUTDOWN; - hrtimer_init(&priv->trig_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_SOFT); - priv->trig_timer.function =3D tsc2046_adc_timer; + hrtimer_setup(&priv->trig_timer, tsc2046_adc_timer, CLOCK_MONOTONIC, HRTI= MER_MODE_REL_SOFT); =20 ret =3D devm_iio_trigger_register(dev, trig); if (ret) { diff --git a/drivers/iio/trigger/iio-trig-hrtimer.c b/drivers/iio/trigger/i= io-trig-hrtimer.c index 716c795d08fb..82c72baccb62 100644 --- a/drivers/iio/trigger/iio-trig-hrtimer.c +++ b/drivers/iio/trigger/iio-trig-hrtimer.c @@ -145,8 +145,8 @@ static struct iio_sw_trigger *iio_trig_hrtimer_probe(co= nst char *name) trig_info->swt.trigger->ops =3D &iio_hrtimer_trigger_ops; trig_info->swt.trigger->dev.groups =3D iio_hrtimer_attr_groups; =20 - hrtimer_init(&trig_info->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD); - trig_info->timer.function =3D iio_hrtimer_trig_handler; + hrtimer_setup(&trig_info->timer, iio_hrtimer_trig_handler, CLOCK_MONOTONI= C, + HRTIMER_MODE_REL_HARD); =20 trig_info->sampling_frequency[0] =3D HRTIMER_DEFAULT_SAMPLING_FREQUENCY; trig_info->period =3D NSEC_PER_SEC / trig_info->sampling_frequency[0]; --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 8A4B7232797 for ; Wed, 5 Feb 2025 10:47:03 +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=1738752425; cv=none; b=NeKZzTwpmVSobzIu+FP/giaKJoLh1Zqag4rAIiQCIgVsc01uHaSJd2zFCphvqM7U7UlzZm70yYaNgmj/OMl7IumyaoqKdGO5mgUauyTEkLGFnFfQMyng1nMj1OnfvxoMdmah+11g3oerzcdv6aw97StX2DBbuz18SEwaH2fwkz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752425; c=relaxed/simple; bh=8Av4eiiOTjw6EEArD4Pccww4bBCja3feTOuf/zOJYqo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Xeqz3VIw+GD7ON/yZ72fysOYX5drJORFE5g/bVgc8BPigvhypyNILiEkKh0WwP8BJ5POKvUVb7u3rKDsrAblzmf3yUsEygYJMPe/qpUvkkAWDEWJvURJXrTZ6+RMiyxPJkqJuNjaBrKuioOhzIH+bd4o37c2AcESMsN95hcoUnQ= 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=43QK6Eq/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BYQckxXJ; 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="43QK6Eq/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BYQckxXJ" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6gNF3htQ0JUteoaO+U1h1sEzucko4rV0CXRP7nYtd4w=; b=43QK6Eq/oK1eoQibdpTHHtk3d6s8xO8Ib+Kd+MTzS48zTRJ9Kg7acJzRNjVyxzQMeIoP2L 5oBJq4lsGD/KSX8T0z/54E0UzA51lXFTg79INhihGru1FmEGovtq1U2pNKNprcCnWZ4tWn RcXlRxkNNclCxodkpie3B3BRuqxFR/vljQtBiNIVWabj80nWlxaMcJdfYsK45Snq0XCt1h DMHedRzVvAD6KjyL8ZrgBux/re6yvXMet0PTHlVvck+ToJA1YfsHtI4uo6OaDOvpOSxkq8 Jy8kgF8Ya5+BKTXG2KZbH+xnVChKtE1BSJEIsw1DpgDzXKgzVc/+v7pEl8VsWg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6gNF3htQ0JUteoaO+U1h1sEzucko4rV0CXRP7nYtd4w=; b=BYQckxXJy5GRuNv5kQtBO+1aealKx+1LuECKi2fhuG/xKeY+Ijb5np2KYHd29QFGvgTo7v 5MM5nmWyKUtcVeAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Andi Shyti Subject: [PATCH v2 28/45] i2c: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:16 +0100 Message-Id: <6a0d31244560b76cc7e76954bf68dbe14a4761e3.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Andi Shyti --- drivers/i2c/busses/i2c-imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index ee0d25b498cb..9e5d454d8318 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1723,8 +1723,8 @@ static int i2c_imx_probe(struct platform_device *pdev) return -ENOMEM; =20 spin_lock_init(&i2c_imx->slave_lock); - hrtimer_init(&i2c_imx->slave_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); - i2c_imx->slave_timer.function =3D i2c_imx_slave_timeout; + hrtimer_setup(&i2c_imx->slave_timer, i2c_imx_slave_timeout, CLOCK_MONOTON= IC, + HRTIMER_MODE_ABS); =20 match =3D device_get_match_data(&pdev->dev); if (match) --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 DD99D22C352 for ; Wed, 5 Feb 2025 10:47:03 +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=1738752426; cv=none; b=NLBWlD+G1iT8Y+7aoYryGKJc3k85JNNJxWtHCKilTvy8uBNwS42rBdCAMUE+EEI7sfmacci0DtpZFk/UvOxWyC8UED6p0UfdecPem5+2TBeuosKjxEh8izB/fSNLj5kSqjdZba3665pU75BF0McOsLdEwpo0IqM/MOIHmc26ATI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752426; c=relaxed/simple; bh=Zsy15+u9563Uf83md82evxZVNbHG99m61yjPdr7luYA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tVdhr//AkXavBM0XJojPU7iY9FS2WyNATlMu9TwQAxk4w8b1dl8uN90F7hjEUa7Wy1Lt/Z/iPx2kVsM8+D0cf4N6sw4NT7fsuvEcgbvHHK7jPwG8cyorhC4dDqbubEXDMNThfWiLY1Gi0weUZvMFjlz2t3B+A6QLubwsIzceKWs= 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=u/53eyTM; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=v+4muJMV; 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="u/53eyTM"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="v+4muJMV" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7E8387BNF+Bhe+JKx5HB6LB3m0HelGQPRvQQfMKMkOE=; b=u/53eyTM3tgR28Q49yVf29PlVytH32NgJ7oMZI4f1FQKl9GDhKrSrQ1meQjkGaB/8/WMF7 TTzCHfsIKCs1EtmvTe1NUX20ukg8mKQ6tJNrkFDAfAjai7FYThVHZJAZmhz/YFlYYfvfEi cUZ73DC5AcDczWFg4Ub96JNpA//Nc+fU7joGmxshFXh9TN//kNidbz8wNZ0n4iRf/+nzPg OPDUzElLp4XfbM03jh51n4KVcywNTJRXTf9N6T7N+Cx5qHjby9Ne9a0rhuowUjdW2bQZ+N f4AqpgiODqad4v9hNsnvPZJHURpQ7DykJ5Gaisz7e5epvaYlAtoyvqDV6NHJTw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7E8387BNF+Bhe+JKx5HB6LB3m0HelGQPRvQQfMKMkOE=; b=v+4muJMVV3Ki12t0+rebP1jGsmRjXHOcMZOct6ll03OfQgc9lZtI2gmeHxrmtDh6VMWsQ6 n2kPlymc3/UamuAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Alexander Shishkin Subject: [PATCH v2 29/45] stm class: heartbeat: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:17 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Alexander Shishkin --- drivers/hwtracing/stm/heartbeat.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/hwtracing/stm/heartbeat.c b/drivers/hwtracing/stm/hear= tbeat.c index e9496fe97baa..495eb1dc8ac5 100644 --- a/drivers/hwtracing/stm/heartbeat.c +++ b/drivers/hwtracing/stm/heartbeat.c @@ -81,10 +81,8 @@ static int stm_heartbeat_init(void) stm_heartbeat[i].data.type =3D STM_USER; stm_heartbeat[i].data.link =3D stm_heartbeat_link; stm_heartbeat[i].data.unlink =3D stm_heartbeat_unlink; - hrtimer_init(&stm_heartbeat[i].hrtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_ABS); - stm_heartbeat[i].hrtimer.function =3D - stm_heartbeat_hrtimer_handler; + hrtimer_setup(&stm_heartbeat[i].hrtimer, stm_heartbeat_hrtimer_handler, + CLOCK_MONOTONIC, HRTIMER_MODE_ABS); =20 ret =3D stm_source_register_device(NULL, &stm_heartbeat[i].data); if (ret) --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 AB6F322DFAC for ; Wed, 5 Feb 2025 10:47:04 +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=1738752426; cv=none; b=FJ6p7pkmrzKIyFH+MfuTrxrlganBw2A+NXAWyksQY1GwaiHugcF1Vkyu8zvl2uWKwA0DSOjnOD0ZpxprxHJ7zwrGBHEhrjOvSDksY6aa/OzEtGfCRpWDbvDHcozAESqB+icopacEvUt9jhoQnl1VfWkdXrySLI9gAutlT+W9BxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752426; c=relaxed/simple; bh=VGipMjUKC6rTV8hI0Lh1OzshUjwZTXhb0xki6X/HIEk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DoZRY36I5cq9x1RdURqaN/n6kQzprFGd7M2bQA2UKo+XqzXHhSWm7p34jWeSCquMXCPGlUb1ogk3RxOo72dnFb2WZljpsPYHHxTvNYZxp23K4p6lO5kkiCgCxwp0Cv87e8eZDxtg5refRuGH86Nb8Q/fK5GfMHC0Z6DrvfYPJzs= 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=QLcpkSf2; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WSuUHkO2; 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="QLcpkSf2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WSuUHkO2" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gaxUOSu6PPPmpExSaLxtjLPAjrrkX8vgXWaMr9AM/Iw=; b=QLcpkSf2SC5moEzK6b1IAU3RyZQGsM6aldfQP9hkpgwFVqRj6nayQjEiUnMpUzBkcxjEh9 ztEJuzk1STGFUuKz3HlwAC1zWHKQ8Vj5PRbn7MG1ldWNhdtW6cMrEnyGSTKJWDFSrQR4Lw qsBDFkGm8fIEMmao+TSARmlGDO0Swd6ienxgoreRWiDwa+6/YWpRNTkWGHqLaxf9kSEptN XW2wFNTnkizjiv9aluMkbawsr5c26HIDoGSIfNXjw0p6Mb5x9eXAcdSsKQWuur0ZuCO2+S H7L1+WqPAmQ3dXovTKJQ8Ri9VKS+mbt8UkYWGE84Y9euzZRoB/f79AMEtm76cw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gaxUOSu6PPPmpExSaLxtjLPAjrrkX8vgXWaMr9AM/Iw=; b=WSuUHkO2dQnbaQouJudLA00xVf8lQv3ZOyM96APZPTzpdH+DQssvaMI83oKLE4AzuABrZA 1R/V6TnxVXPiYbDw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Alex Deucher Subject: [PATCH v2 30/45] drm/amdgpu: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:18 +0100 Message-Id: <2e3664eebb00d3a8c786ee7cc1fba8096bababc9.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Acked-by: Alex Deucher Signed-off-by: Nam Cao --- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c b/drivers/gpu/drm/amd= /amdgpu/amdgpu_vkms.c index 03308261f894..7507d9443028 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c @@ -188,8 +188,8 @@ static int amdgpu_vkms_crtc_init(struct drm_device *dev= , struct drm_crtc *crtc, amdgpu_crtc->connector =3D NULL; amdgpu_crtc->vsync_timer_enabled =3D AMDGPU_IRQ_STATE_DISABLE; =20 - hrtimer_init(&amdgpu_crtc->vblank_timer, CLOCK_MONOTONIC, HRTIMER_MODE_RE= L); - amdgpu_crtc->vblank_timer.function =3D &amdgpu_vkms_vblank_simulate; + hrtimer_setup(&amdgpu_crtc->vblank_timer, &amdgpu_vkms_vblank_simulate, C= LOCK_MONOTONIC, + HRTIMER_MODE_REL); =20 return ret; } --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 63DBC233144 for ; Wed, 5 Feb 2025 10:47:04 +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=1738752426; cv=none; b=PvsO67mWpYh2lJ5uDpWxAHEB+k7pNqadeOmW1IOf77EE4vIyAS8kSygy/EkxWtVY5muSOHHk97bqeVFq5iRuGsKl7ZhmZlVUY1d637SKEZAuUODyLUTMTjEqGMPykJltHUXMDLDUH25zmHcat3IeyC1msyGVym6w0KEMt+btau8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752426; c=relaxed/simple; bh=u9/EDuRcB82GNyKjqYa8EalLD45Pfwdwr9NZZJ5+Nmk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pFYgpeniUzIfG8XNUJtjn7Ddq8z1DPei5aizemHdU8fi8tQ1qsz37Qn4ZNc/1ksOnj8U4epZPViyUagLisdGgZd+i04ofh7QeR6/5+xU8Wn3T+tYuCbg1iI+Td5njgTk1E2hcf1smnyFZID1aOYiyZej1VWQ9iEHOBhxuVWApg0= 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=dtQdVW4y; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Q0t2mhmi; 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="dtQdVW4y"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Q0t2mhmi" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XbGMIjxYIde2al+sdEmg7IbJRUAqtWqPlO9YZ1B56SU=; b=dtQdVW4yu5A1uOz7AD5vQk57c/DBPYl8t+XzE+SlwyGCsA4YX2Ga1tBaX5ULYS5csWNMf1 D5nglRjcxpWYtwbVdlzpvx4VrVJSaP29S0bMlYkgv3vzTg2xyqxzxtYGIRVOW2THwHuGQZ tFgl42wesGGH4p+RQgsmzOWZiJ0uJqOfesVtO8yx5wYHyoNvYl5nzXS8w53gguJA3xNRSS hPh3vnLeU/2VrhRdKmN6c3PXFr/xEGBF6dIlSGhAeVPGoxunmeQxcEkILUXKrEdRYVH6z9 IM+fxBy9BQwRLylQRocW4DTaLVrYcjQCHdodcjiibgXvF8g5yrIldnsLC30FdA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XbGMIjxYIde2al+sdEmg7IbJRUAqtWqPlO9YZ1B56SU=; b=Q0t2mhmio+IC0Ftc3R8qCcZjZDhAWP2cPQMViXiLRErW6rx6x3fZZglUNCyEKS8unKyiKX z/W9o06BV6+hnODw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Jani Nikula Subject: [PATCH v2 31/45] drm/i915/huc: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:19 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Acked-by: Jani Nikula Signed-off-by: Nam Cao --- drivers/gpu/drm/i915/gt/uc/intel_huc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.c b/drivers/gpu/drm/i915/= gt/uc/intel_huc.c index b3cbf85c00cb..00d00c480cc5 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_huc.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.c @@ -231,8 +231,8 @@ static void delayed_huc_load_init(struct intel_huc *huc) sw_fence_dummy_notify); i915_sw_fence_commit(&huc->delayed_load.fence); =20 - hrtimer_init(&huc->delayed_load.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - huc->delayed_load.timer.function =3D huc_delayed_load_timer_callback; + hrtimer_setup(&huc->delayed_load.timer, huc_delayed_load_timer_callback, = CLOCK_MONOTONIC, + HRTIMER_MODE_REL); } =20 static void delayed_huc_load_fini(struct intel_huc *huc) --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 0D523235C15 for ; Wed, 5 Feb 2025 10:47:05 +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=1738752427; cv=none; b=XKGVs/A0qrCEzGY/BDvQ3ALlo+7ZpJylOXdA3Sn9eZjY6XxbXqUgsWpnyPqVs9I99Rh/jIFiZP6fMnCgLoeyAPGMFoyhjcmulC8No1KgGQJMRZaxUDXyJhFplwhJ7ZV1KcAsv8QwwDw/3+aCBPg6ONrS88YvclW2cIaiJ0jTOxI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752427; c=relaxed/simple; bh=nX8DXsCpT9rgqoVzI56QfgEL5GqeB1usbTrTYi/dR8U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WwE+UmeiHzm/dweFitmNT2Tr4PT6Jq+ubyKZVpVQRcj/srsk0+8kJYqBTZCDlrLzpf0ATyuA4oKeOY6Lx9dLfBx3ZQKM+xi13xJM91l1qk9WgX+jeXGnONJJP5myMTA9UshQvWQiotmkDVxOyBRovo+XvZZpgFLDdShMwOW1+uU= 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=joo2Ocif; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=OwIF2CeB; 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="joo2Ocif"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OwIF2CeB" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2P48GePcAavn7WXu5LgLQbMUKtGqras4yxixT58g3xM=; b=joo2OciffMyRNMiWlclHMB7soh5BX7ThkBgl70X/XOi/2/WaA6uOoFV59TNJeiWqckIgSr cS7lZ9P4n4KxBnM79qHv/ODM0h8FzIp/rP8kPXC/ElHNI972aPfHotpK7JLTiHc8f12Mtg Tu8HwXT4udU9JMsMO29kJliRl8rwslGsBeY9zkWwNp7k+RjD45NVO47c3c7nx5/CIifnfW Svt21fXgUEJDVGhQ61NDa4/YHtRpW+go3F4k9Lnb9zUYj5jKwHkuy/Q7VaD/pEX2LbddMa yJ2nVvVybXLeXK8G6rgroVEOK5AXoLuq5hulw3LWC09kJupgCmmdDb/q6xLxfQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2P48GePcAavn7WXu5LgLQbMUKtGqras4yxixT58g3xM=; b=OwIF2CeBxBpj4K8suV39p9+Lr0c9aH61axPQv4zj7bmxyrcnPLWuQV26onG6Lv3h+OOP70 f+H8bz/jKoYEYUAA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Jani Nikula Subject: [PATCH v2 32/45] drm/i915/gvt: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:20 +0100 Message-Id: <9af55b7d0918bb3642c6392fbb4800d8ea7c9c50.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Acked-by: Jani Nikula Signed-off-by: Nam Cao --- drivers/gpu/drm/i915/gvt/display.c | 3 +-- drivers/gpu/drm/i915/gvt/sched_policy.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/display.c b/drivers/gpu/drm/i915/gvt/= display.c index 95570cabdf27..f668cd9487f1 100644 --- a/drivers/gpu/drm/i915/gvt/display.c +++ b/drivers/gpu/drm/i915/gvt/display.c @@ -581,8 +581,7 @@ static int setup_virtual_dp_monitor(struct intel_vgpu *= vgpu, int port_num, vgpu->display.port_num =3D port_num; =20 /* Init hrtimer based on default refresh rate */ - hrtimer_init(&vblank_timer->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); - vblank_timer->timer.function =3D vblank_timer_fn; + hrtimer_setup(&vblank_timer->timer, vblank_timer_fn, CLOCK_MONOTONIC, HRT= IMER_MODE_ABS); vblank_timer->vrefresh_k =3D port->vrefresh_k; vblank_timer->period =3D DIV64_U64_ROUND_CLOSEST(NSEC_PER_SEC * MSEC_PER_= SEC, vblank_timer->vrefresh_k); =20 diff --git a/drivers/gpu/drm/i915/gvt/sched_policy.c b/drivers/gpu/drm/i915= /gvt/sched_policy.c index c077fb4674f0..9f97f743aa71 100644 --- a/drivers/gpu/drm/i915/gvt/sched_policy.c +++ b/drivers/gpu/drm/i915/gvt/sched_policy.c @@ -286,8 +286,7 @@ static int tbs_sched_init(struct intel_gvt *gvt) return -ENOMEM; =20 INIT_LIST_HEAD(&data->lru_runq_head); - hrtimer_init(&data->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); - data->timer.function =3D tbs_timer_fn; + hrtimer_setup(&data->timer, tbs_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_A= BS); data->period =3D GVT_DEFAULT_TIME_SLICE; data->gvt =3D gvt; =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 9659C22C328 for ; Wed, 5 Feb 2025 10:47:05 +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=1738752427; cv=none; b=QGnAs410NSssH48kuF06SPZLyCMoWOnOP1bFVkJSRHFpgEidRP/UONg7s/A5WQNf6B9Aga1xsZRJQ7ypFevXGL7vfkEzvXT3OPxzASHysFDOEFf+uxHrGy87YtQOFkiJ2l16huCmw6mSyt3ZDFZguqE44KtfFs4sXkZ8GxSErxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752427; c=relaxed/simple; bh=GfqUII7lFtk1fgjBBoNABGMaHXZgp3I8jU6YpuDzaNY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AtRFFmtyk6wJplWMZj5z449VJvt2sdi7A1F+zqUs3YPGNsfVXI9ROPUS2FL0O/giO4O/cl764NCb/u40oT6q3RlvIrhz6xBQNKH2OBaaEfW3wB8ahjfEtUh4CvFyJHWKP7V3Jo2M0RohiW1EPZELF6U7yhGqghTBjnCNfsb3Np4= 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=Q+Qbmg5n; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=G+y5FU3u; 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="Q+Qbmg5n"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="G+y5FU3u" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ow7fudlBfGM8CjAonrVZXh3DmryZO5a4Ve/tusEJ0iY=; b=Q+Qbmg5nlDjUPcjEGnBXxNg59+eqlDW3EH5GJE/0ma5VYKlMApNLk134FEvXQL6gjtfZD9 m4UglMTXFbHI9enpeQn/XKSeMdvT1J/I6h7r0hKauSUjGoFKPN1z8Dmk/MwNLWw4GWmroy Unld+bUKnyL2bEl4gZG3GBHAlyhklClc+NGF9k1axCxDlduha+yOPQmj0X7w/9Y9WLE6tK eVDg9X2gKvjRiJo415QbX77UXz6QlHMO1CybvBN8GGV9Vq0HyqGZmLNWht8M+NPiFR1sYU cDyK80PzPtEkaDm93QZklv4HmmNstHM1nTQ7HwSm1DBDqvJk+cHQkfWnhGosIg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ow7fudlBfGM8CjAonrVZXh3DmryZO5a4Ve/tusEJ0iY=; b=G+y5FU3u+i/sC1RnwHi7TNpxI+8CSjmFrgtXW42YNNLXAWEyEo6KilJvGnnRwk0SF3AZ/B RyE2XnUWX0PGszCA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Jani Nikula Subject: [PATCH v2 33/45] drm/i915/perf: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:21 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Acked-by: Jani Nikula Signed-off-by: Nam Cao --- drivers/gpu/drm/i915/i915_perf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_p= erf.c index 5384d1bb4923..279e266b4b06 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915/i915_perf.c @@ -3359,9 +3359,8 @@ static int i915_oa_stream_init(struct i915_perf_strea= m *stream, "opening stream oa config uuid=3D%s\n", stream->oa_config->uuid); =20 - hrtimer_init(&stream->poll_check_timer, - CLOCK_MONOTONIC, HRTIMER_MODE_REL); - stream->poll_check_timer.function =3D oa_poll_check_timer_cb; + hrtimer_setup(&stream->poll_check_timer, oa_poll_check_timer_cb, CLOCK_MO= NOTONIC, + HRTIMER_MODE_REL); init_waitqueue_head(&stream->poll_wq); spin_lock_init(&stream->oa_buffer.ptr_lock); mutex_init(&stream->lock); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 54EA9236A64 for ; Wed, 5 Feb 2025 10:47:05 +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=1738752427; cv=none; b=jSbUVwDeoS7DRoIM2C0GneyV8oc8KOKt9kkRYi694AYEBt05pOU+p3mVhpLH4Vmu7xKRGqKcoRoQTqblgWdQzLiz8PHcbbza22+kGLFJTGxAyBiV56G5OOpuX2J5BTi0AdkCTTPhK1K41VClEOcjSXnytr+G7RJdpsHwPExjBlc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752427; c=relaxed/simple; bh=RFLYUzbalhETD9CyCFmQSUv5KmIEk+DmHSLgayDdvTw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=N+I3+QCDdrNMjrz4FWETaCNtkeQrZiC+ps6qFoYn0pakxaTeW/nT7hEq0ji2cpxavPJX+U9Kx/vlEYknBeladsZ+O+uWvXRVTDyAe60nKfNeKRJyAZC9Wd/LY2H4rems+RJtwZA9X0/YZsCdHxMToxuJZexJnVsB7V7jTuYwVgM= 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=TE90k0iM; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=AwPRy24y; 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="TE90k0iM"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AwPRy24y" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+ZohldlZlnrCImAsUW/zApiBKklUGRKifvgPCxKR9QU=; b=TE90k0iM7mTnjSYXjJJ8xe+ce+ieTdYwjJPSCM0UcgLGoJB6dpT3hjgNUeiK/f7jl1FMTP PY3hA0ZsnBBMwhS0cXuliQE+YbGcnTSLt/m70G8udDgRWPmkK9iBIzAW19J7yGvEMoo7SZ XLKNkEe1DaEWTVqgJBo5Z/k2qmEXhLWzgOjVVVlOsD51xVUADIUHdZqz0juALIRZ3igGMD S2Vb7I7kK276pRSMTzBFeTrfkLBz/LnMAWTYaEEN9ot7XZbGE/272/nilVWhhpFTmnoTw0 0ds0CQRyQpdSz3XU6xSSKQWI7S/WIhVyMZBvSYgg9e3ki5CzhV/8RfDlQBa3CQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+ZohldlZlnrCImAsUW/zApiBKklUGRKifvgPCxKR9QU=; b=AwPRy24yFiP6eouH7C+z3a1KZ1C4YslMwfav3VXWsEqWkOem1Bt1TtJlVkL2KtK1wgyAWP HJwEi4E+UfHKXsCQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Jani Nikula Subject: [PATCH v2 34/45] drm/i915/pmu: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:22 +0100 Message-Id: <71198b93c438866fe2be7323e59cdbf21aa0d493.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Acked-by: Jani Nikula Signed-off-by: Nam Cao --- drivers/gpu/drm/i915/i915_pmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pm= u.c index e55db036be1b..0ce87f188d11 100644 --- a/drivers/gpu/drm/i915/i915_pmu.c +++ b/drivers/gpu/drm/i915/i915_pmu.c @@ -1264,8 +1264,7 @@ void i915_pmu_register(struct drm_i915_private *i915) int ret =3D -ENOMEM; =20 spin_lock_init(&pmu->lock); - hrtimer_init(&pmu->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - pmu->timer.function =3D i915_sample; + hrtimer_setup(&pmu->timer, i915_sample, CLOCK_MONOTONIC, HRTIMER_MODE_REL= ); pmu->cpuhp.cpu =3D -1; init_rc6(pmu); =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 DBD6223237B for ; Wed, 5 Feb 2025 10:47:05 +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=1738752428; cv=none; b=u7qVGee9pqphCNtshwQBa6GGpQrZzq4P5f3WxIhkY29GMeYXtuJJ1gwFPUnqBaDQDYnwoq2G3aoGnqaK09DHa1V2MC9PuKcn2ghZdX7zt49+qlKvWwqnF9EDV8Tk7QzmC48enQr58+OlGq6x2BhXb/deL15jht3f3z/AhPClXfs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752428; c=relaxed/simple; bh=wB4KZZhxcAGUFl8hG1aAQBp00DCCTwAtv3/hip2nNdo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q4/D/AdT1F5ii2pL7r9k//QbpOS/76paYEWpN2NrEBho+KHs2sV2HLaiV1/l1xyUa8FW6Dw+v2oI6qF9LPyFL6/tnIr/L3am1d9bgeM7TDZGS32LdJDWPk1huU85zGilJVV2Ie8gyQ5/+uwuMqrZ4Q6ky65q8zIrtDEYcopCu3o= 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=Fj6/aebK; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=4my0yOh9; 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="Fj6/aebK"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4my0yOh9" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ajmbXs69PsDZhtlzwk7dXfl62K8OxjcLUr12Ed9DLtg=; b=Fj6/aebKFCAEHWBW4D9VSqC15xAK5Bcaj1eHbAnelUJilh4c8aBrSlFhchuGs53Ucx87tx oQjn8hdO/N0pjYw+fqr2u0YncxCUVUA6ZFZfWJZR36a8A+pLEcYe6Yz2LpoqGjujb43e/4 5F3Z/52ouO+SHsYQd7OPLGRFWj+QgaE87XlYyz6c1R6D++2MJTRiN0p0AecOQ2058VGEkq uziwZk5I4bAusr3HB2/XFLu7zaG/FTtCTT9YdNKY0D8/auEj1Tx0lnV+Y7KWUPscASCQyQ tagJgIADI7LL2ubOT9v086UTUFjdW6ULhCXkwqqF/G8Fu7M8PXA81u78Z+fcbA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ajmbXs69PsDZhtlzwk7dXfl62K8OxjcLUr12Ed9DLtg=; b=4my0yOh9Yn4l9AJW7618/hPvuf8juNPMWtYY/wL2e9QgFubgjNBx6egKUMUlWu/OwPp0q8 xiydbKqY8s9IdnBA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Jani Nikula Subject: [PATCH v2 35/45] drm/i915/uncore: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:23 +0100 Message-Id: <1d0ad9ab31040d9c3478b77626cdb0a04c0a7bad.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Acked-by: Jani Nikula Signed-off-by: Nam Cao --- drivers/gpu/drm/i915/intel_uncore.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/int= el_uncore.c index eed4937c3ff3..bdcfcae83b52 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -2103,8 +2103,7 @@ static int __fw_domain_init(struct intel_uncore *unco= re, =20 d->mask =3D BIT(domain_id); =20 - hrtimer_init(&d->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - d->timer.function =3D intel_uncore_fw_release_timer; + hrtimer_setup(&d->timer, intel_uncore_fw_release_timer, CLOCK_MONOTONIC, = HRTIMER_MODE_REL); =20 uncore->fw_domains |=3D BIT(domain_id); =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 30506236A8A for ; Wed, 5 Feb 2025 10:47:06 +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=1738752428; cv=none; b=g7naS8UX0ZeXAzsIP9TD5cvkSpenIghc5f7Yjb7tU8RPBEdvy2npEi7tjpwgRZ4sD/sMBPFKjXVH0r6bkeet8LJQIAeeqnTzU6wPTq+sWaleDCTc7/YFtSkgWW9I93JetS6NHoaG6zqkm6TalkcEe1YOfmfn83iA0AaDtjy1MPQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752428; c=relaxed/simple; bh=mgqcCX6BM96yb3Bl8K0m4m+eUi5M61u//7rwqmwiyxg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Owgs3OdDaSCRcjugkRXfg33ZphSvknI9PBA576nmsZpv3OExiqTsnm8JEkC/cYDCm6AKKqAfoomkUwWivNejoJbJv3yEFvSZsM4kFBPQkxSlPGdD9yNQEhkPDkJtSBfAQLYD8gWzrvqswvkYMm6pyrdaJqZNPJ6Nj9HRKA+cn5Q= 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=slzoVW+6; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=SqewLaHX; 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="slzoVW+6"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SqewLaHX" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Gdb8JDczRno+JM4eSptWKwnjmZDpWhwZ/3dSo4UPyXU=; b=slzoVW+60ryVYQXErtqvsmRm/jMawb9A6N+kbs1+qleVKfj1qIZB8faHirP3OD18vt3oAp f7bTb80I3zvx+jaXDPCYoLpFbGBZjt70vqV+I1NAB6BcEy/L5V73OYYns9kH2Lwu4ewmbg vy8gC9INp29QM05unoY2ke3fWQkPh/D7p1PaJmFSQapnTz00gVZ1PY0aYgMm1YsD6lsSyO dQeiUxo0Dy5Esc5WcKJC0ipUTAOIj3cGwObuN/v+vGnMqVb+CmbBZKf0vrM47njdteUsr9 vCSbwc+bEj9XO24z/TwyJLBldwIu2xU/EIOf1Y5R6pQHQQrqIbsFnXYojsKgMQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Gdb8JDczRno+JM4eSptWKwnjmZDpWhwZ/3dSo4UPyXU=; b=SqewLaHXU08fKchbmi+nd6S4j0lUSPnF4WCXpqIgPvQ41DIn63MAqBTlv0vWnbsAscwD1y xWalUql2PkVdskAg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Jani Nikula Subject: [PATCH v2 36/45] drm/i915/request: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:24 +0100 Message-Id: <4fe658e6d8483e44d4fff579bc426e627487f6ca.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Acked-by: Jani Nikula Signed-off-by: Nam Cao --- drivers/gpu/drm/i915/i915_request.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i91= 5_request.c index 8f62cfa23fb7..ea0b8e7e4828 100644 --- a/drivers/gpu/drm/i915/i915_request.c +++ b/drivers/gpu/drm/i915/i915_request.c @@ -293,8 +293,7 @@ static void __rq_init_watchdog(struct i915_request *rq) { struct i915_request_watchdog *wdg =3D &rq->watchdog; =20 - hrtimer_init(&wdg->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - wdg->timer.function =3D __rq_watchdog_expired; + hrtimer_setup(&wdg->timer, __rq_watchdog_expired, CLOCK_MONOTONIC, HRTIME= R_MODE_REL); } =20 static void __rq_arm_watchdog(struct i915_request *rq) --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 7C346236A9E for ; Wed, 5 Feb 2025 10:47:06 +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=1738752428; cv=none; b=rno+BuafkPB6frXcuH0UYtPjgn5D6N++C+Rc33CCpqKKRZIDHT2FRt+Zd2gWhD16eohinyB5ZCKj4FH+gLFhJDLvxj3h737AUV3q3srCEQWcPlBa8LOYR2z46EoiyWkyRQQ0cVZZfpdWVLukGd0ICDlFOOUzzQn2Yezx3hpQYNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752428; c=relaxed/simple; bh=LhDJ2dWnNlrjrCuXiD0RHqTFfK590AExB3NNRRld7WE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RPb4HMCY6W5E28F+E9lk2Vsl6wJre/rHamOM4QAIqirqXyl4N8A/+ynga1OxkbjTkOoetUUKa2zpdx3zbDa96omE8KpUL+a7GKl4qoGnhrkoOYkU7KcVPMUZvRH+qi802MfnIZ3sGmC8cmgpJKIpDZupU1g54WOArmW3hAPNnA4= 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=Dw0EC/HZ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=fDf5enej; 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="Dw0EC/HZ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="fDf5enej" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wMp8IZm9wwaUxvFRFgmz5genTLj6SdAv4afa2x4sF9E=; b=Dw0EC/HZTemfVjuowL3DpubDNMPdNiJDD9dySnwtGqUsnn96MLEXFM3qwUrwpzESr01lLH LRXUFpDkV8nIO77VChCGdmqDBqUHpqFNxk8Qqypzv/5fniXjjYRr7sTmzAz/js56dFCAq5 51y0nBsU30/SOc2rt5W2Wi6D0JrawXoGBBA8ady+hAL0GZePV0D9N+G3Rg4Cp8n+8v96lA Q3hHeQkwNuavscE2hxoX4isZ7aqFF44WivYOLNne7Ihq9XjU0T89da5numg43HYjCk6CLk D4HoXtFM8lL7CzUH+5VVX9SSHnFusgV/rvHfPUscpFZwHOxphy5ecZyPj7siAA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wMp8IZm9wwaUxvFRFgmz5genTLj6SdAv4afa2x4sF9E=; b=fDf5enejvOQBlzN/B50myOQY7vwKHGYOR3OX2o0qSj06GiQiCpIhlFhEU3ypuyhjJ+ItUS QX6q9PZVY23oWlDQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Rob Clark Subject: [PATCH v2 37/45] drm/msm: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:25 +0100 Message-Id: <2689e1ad4105f415ce8cd9e426873d9ac479dc36.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Rob Clark --- drivers/gpu/drm/msm/msm_fence.c | 3 +-- drivers/gpu/drm/msm/msm_io_utils.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_fence.c b/drivers/gpu/drm/msm/msm_fenc= e.c index 1a5d4f1c8b42..d41e5a6bbee0 100644 --- a/drivers/gpu/drm/msm/msm_fence.c +++ b/drivers/gpu/drm/msm/msm_fence.c @@ -65,8 +65,7 @@ msm_fence_context_alloc(struct drm_device *dev, volatile = uint32_t *fenceptr, fctx->completed_fence =3D fctx->last_fence; *fctx->fenceptr =3D fctx->last_fence; =20 - hrtimer_init(&fctx->deadline_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); - fctx->deadline_timer.function =3D deadline_timer; + hrtimer_setup(&fctx->deadline_timer, deadline_timer, CLOCK_MONOTONIC, HRT= IMER_MODE_ABS); =20 kthread_init_work(&fctx->deadline_work, deadline_work); =20 diff --git a/drivers/gpu/drm/msm/msm_io_utils.c b/drivers/gpu/drm/msm/msm_i= o_utils.c index afedd61c3e28..a6efe1eac271 100644 --- a/drivers/gpu/drm/msm/msm_io_utils.c +++ b/drivers/gpu/drm/msm/msm_io_utils.c @@ -135,8 +135,7 @@ void msm_hrtimer_work_init(struct msm_hrtimer_work *wor= k, clockid_t clock_id, enum hrtimer_mode mode) { - hrtimer_init(&work->timer, clock_id, mode); - work->timer.function =3D msm_hrtimer_worktimer; + hrtimer_setup(&work->timer, msm_hrtimer_worktimer, clock_id, mode); work->worker =3D worker; kthread_init_work(&work->work, fn); } --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 1EFDA239798 for ; Wed, 5 Feb 2025 10:47:07 +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=1738752429; cv=none; b=hIcUTWsL0ntXBbsv/hWPboJZTPJK5TyHQp+DlrDRb+vDrt9gdsm4H/fPMLQ+ZcgwaQwv7W2/nJMMDuecxD2YoCMdt33EtreqsvB8c6aqPTSe/kvhG/49nCNW9GV40in5dbgINEhzo7QLESpvEoIKq8qazltDkEvdiR/d0qXFRoI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752429; c=relaxed/simple; bh=9zM2C6xZPGSLiSw2QFSJSphWHeaGXfpPgNKEDtSDzjM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QO2FqdMv+Yxj2UgkmFeJFMQoy1Ws8lED5Mzirg6kCBQqz3jqx7J48svdMEjKwAgsRfCk0fF8kERwl439G/L/dG5HOlGt6cgzwpqjGMF/XCw2+DBKYzdxaA+1+AkoG/DydLZjxXPP5/bSjFDjCRZKUXQQ59hhXaTlbh+iW3xZkCQ= 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=yC555jeT; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=m+e7F/54; 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="yC555jeT"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="m+e7F/54" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=45xl/SuxcoeLf1NcYGJifWlrlihb7uGWBnfBuBMK0/0=; b=yC555jeTOFqhzRw1MkuIg44+IZ1OU2nnphWbReD/RjltKTN+mT/zQHIucifGCvvtqagVMp yqi620kcUJ5obNKoRAwArRMqq3GcvaML7cnfS6SKMw4/U85J8tSQWnjEaa/ND/OtFVh04o Y92q+bdFMaRQGlg1sx/1KgV7o1EdX3RauDXvD90xh7HIyVwMySvguv5LdmKgmdrPB5conT xpLf8JECiy+U/SzddS4+0s1aS+y5z5JNX3DzhkEpJ9lgWWoyiPi5VU4LtFJdY5ga5EFceG iuzq5YbEgrrHDesFAeqyWKYZSbQN/RcIliZGXj4dRc5ACcoWR0hF6reEY9t38A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=45xl/SuxcoeLf1NcYGJifWlrlihb7uGWBnfBuBMK0/0=; b=m+e7F/54WWPZ04kVNDDtHoJ/icd0SGf1XMlyIyUUnWV2L7KW2xae71ljX3rmUA0oF20OUk mFNtdMRMsJ0uzCAg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Rodrigo Siqueira Subject: [PATCH v2 38/45] drm/vkms: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:26 +0100 Message-Id: <866841803c850c38819f98fdf6bd992ee4a4d012.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_c= rtc.c index 28a57ae109fc..ae4e36bc337c 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -64,8 +64,8 @@ static int vkms_enable_vblank(struct drm_crtc *crtc) struct drm_vblank_crtc *vblank =3D drm_crtc_vblank_crtc(crtc); struct vkms_output *out =3D drm_crtc_to_vkms_output(crtc); =20 - hrtimer_init(&out->vblank_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - out->vblank_hrtimer.function =3D &vkms_vblank_simulate; + hrtimer_setup(&out->vblank_hrtimer, &vkms_vblank_simulate, CLOCK_MONOTONI= C, + HRTIMER_MODE_REL); out->period_ns =3D ktime_set(0, vblank->framedur_ns); hrtimer_start(&out->vblank_hrtimer, out->period_ns, HRTIMER_MODE_REL); =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 64F6822CBE0 for ; Wed, 5 Feb 2025 10:47:07 +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=1738752429; cv=none; b=AwwrJr4FtyrrvTPA/jqhY4Vb8gR4OfjOCuhJk7lr01jykc6c6I0BTDxM93g7HnoIx+g0OYWuaYzoX45wCCS5kmHHqMXlKgkVEYQFgelG0RNfer3LRCq87v2D63nHuIlzpoRtoocrF3pdSuNzxDGqH6YUTPRYm1fvCydxa7ex6vc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752429; c=relaxed/simple; bh=enJGw3z8wc4NfZPVf5yVNrotbBw3uybTAVe5mnXm8gs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jVEt9P6/qqhib90lg5uMY6ZtfVTgxoIN1o8UCyy0fe85NMCApQqeuiNXmaijsNaaVxOAQuOYnzZeumwdsA7nQk8aTZFs7AAsVEVT39cMB8nTyiVc3IVNgXOxgEJL6rT6ik92QDB2cS3gCJwK2Nsq4qfDv61RfLlPTQ9ScH0H1wQ= 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=2y2DpE/v; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=z9NCN1gU; 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="2y2DpE/v"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="z9NCN1gU" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GE0vxm6kJ8AmR1y9odNbcvEuJAJGoBR2o8boyWzFAFc=; b=2y2DpE/vhDwASauPgM3z9rmhWLPYT+FD0BfSLU6RYlgRM8G9xXfQb1ZsETs31iY9pMUXRt khv3cpjH3XxqYyl+lzYpdY8Et2vo4Mtcn/eRJJ+J/F9C+ZNupFGsvnRs0fDRDGf60OU6cH 02gkW3D/F3rdHBNX0/aAT3V/sHEVa0a9botdwzNdOAoY4Oe2qJLbKEyUg9I9JhQKT7eOci TNfMDIfUXXn+4baNwEKBVgZTj/sFKlF3eRBc2+kkXOqT3wnmRTrpEsVpFpf0Ref6A/0emP PP74Re1MsaSA0cPPopbLa7clcZHTTA25lslQjkGxsiPJCsO5cI+cj0wXVLrbfQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GE0vxm6kJ8AmR1y9odNbcvEuJAJGoBR2o8boyWzFAFc=; b=z9NCN1gUGalRx4v45ml/ym6cUE9LfELvCPiqmm/X7LNBKruz4/5J0r7TCTo0TGLEEZuHMr 3zWBoWm+BEcHRvDg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Lucas De Marchi , Zack Rusin Subject: [PATCH v2 39/45] drm/xe/oa: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:27 +0100 Message-Id: <08238e193b1f63ae7d5d607fa975420735a869a5.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Lucas De Marchi Acked-by: Zack Rusin Signed-off-by: Nam Cao --- drivers/gpu/drm/xe/xe_oa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c index eeb96b5f49e2..7fbedd83ccfd 100644 --- a/drivers/gpu/drm/xe/xe_oa.c +++ b/drivers/gpu/drm/xe/xe_oa.c @@ -1763,8 +1763,8 @@ static int xe_oa_stream_init(struct xe_oa_stream *str= eam, =20 WRITE_ONCE(u->exclusive_stream, stream); =20 - hrtimer_init(&stream->poll_check_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL= ); - stream->poll_check_timer.function =3D xe_oa_poll_check_timer_cb; + hrtimer_setup(&stream->poll_check_timer, xe_oa_poll_check_timer_cb, CLOCK= _MONOTONIC, + HRTIMER_MODE_REL); init_waitqueue_head(&stream->poll_wq); =20 spin_lock_init(&stream->oa_buffer.ptr_lock); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 697682397A5 for ; Wed, 5 Feb 2025 10:47:07 +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=1738752430; cv=none; b=CC6jd8A5ytn0QssMr8huaKh2mZyz0jjZrT6IBsiPgdZ7j138jI6B7QCk/xHo9NGUH3EpIwuTz9FAuekRiUvvacMlGSHGNg4i0MgeXzF80CrlwhKD+ZTjhE/pqt26DakmHylBsMn8Jo7yYP554qgB46O5YMNDV2yfa2+rbgwuuE4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752430; c=relaxed/simple; bh=r97tosg9u90oORKl9Tzrp6Y+JgVJUkwvoycZ9acHAkk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rQIw2iFo7Nl5LjzpbBXav/rdLTtjPxxpRDmKSt53wF9kk01xVsHNh4xlYYQrPd5Q/naLNHYEw85aDv0U3qrgA0hdUiPYj34BMipBndyVCgXzXLYm0rNFU0lOBlIEUMcIJatvBZQUHK5e/hlD0CID8Ak/Ox4z5wG6uZzP/960AvQ= 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=A+nm/tw7; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=EeTCp9kr; 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="A+nm/tw7"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="EeTCp9kr" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5TiNN54uhShOX0jDzC7+dFqA7KuVghX9BMG++H5/rWo=; b=A+nm/tw7PbQauOFjqOqmVLslHoYSPO++0+ZUyTg32Z8IIxPW91AI4KrYviaWuOfcfzR4Sn tYyK/0M9T/qihuYUtg9guEiFaxYXQBmKze8iRcLigFODLX6TxPrY1jh9irkbhV/gH52EY/ wAOe90mtJpn909H+Eh5/NZHPGNPiORHuOoxo2W/uCcMS/u5N2w7hUZdKfUAg5cXfLK2jcX 2t++zQIKEdvs3/QF7IFXiGj5i8Hr08/mI1/v/v8RvukKc3rt8itfGnXVtt/WdvT39t4Sfw 0CyeYhreh/v9woftowzAHZej4U4zvAM48Sb2eXbNNMp6ZcJtT3uuW+V7I6SgAQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5TiNN54uhShOX0jDzC7+dFqA7KuVghX9BMG++H5/rWo=; b=EeTCp9krMFQLSnvOY7vQ5IgTEUhKAYdTe9RYY/0Xg4nLDAovfYSkJyDh5PYpqAcl3W0nyr JlSEBsNz1/JTlzCQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin Subject: [PATCH v2 40/45] drm/vmwgfx: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:28 +0100 Message-Id: <6f6664cf2fea2f782e37f64a77fc9f8699794f58.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao --- drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c b/drivers/gpu/drm/vmwgfx/= vmwgfx_vkms.c index 8651b788e98b..aec774fa4d7b 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c @@ -290,8 +290,8 @@ vmw_vkms_enable_vblank(struct drm_crtc *crtc) =20 drm_calc_timestamping_constants(crtc, &crtc->mode); =20 - hrtimer_init(&du->vkms.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - du->vkms.timer.function =3D &vmw_vkms_vblank_simulate; + hrtimer_setup(&du->vkms.timer, &vmw_vkms_vblank_simulate, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); du->vkms.period_ns =3D ktime_set(0, vblank->framedur_ns); hrtimer_start(&du->vkms.timer, du->vkms.period_ns, HRTIMER_MODE_REL); =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 C5FFB23A56A for ; Wed, 5 Feb 2025 10:47:07 +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=1738752430; cv=none; b=m1p9+77qZhzCBi4wYZJJTYPE2BY8WYZXXJDsYh9L24qsvZYGiinxZtPAkXtsPegafBoKdLHGkLkqw1dw3bmqQ+R+9/UJaBzQbgqXUvNmkkCIFyQ4RjKE62GAryEOf+jsLEoovlAiOh+rsn73uMhxM0tbJnutbNvPVp3nG1FyzZU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752430; c=relaxed/simple; bh=6nsQYROfnQnGkMSpmE2baxymz0hx+lCr5DOiqsDqGMc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=d9FFab9XJ2da/TAKSTQjhvnx8JtBjEhYyD2t34EI9KWCz3IT3a6BIn1GAbA57EY+w6cH3QzZqmX2/djfH6rOUAXfZc1d/vR2NA/JwstsalKNsJjwoxLNxK/sNA4Mdq3Ve58D1kP+6TTvlpNkVsgzhXWr+WqWZgofApewmAkqBw8= 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=NhJY3/H7; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=P5oRV8Qz; 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="NhJY3/H7"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="P5oRV8Qz" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jNewaaJJWh5lLXLCWuiOYoABRKEsvt2pN7qrAmPm1pQ=; b=NhJY3/H7q3D7lFmHlqq9IagYyaBKw4k56m0WfwpLtZNFfeMbXFexTzobH5J9VWhSKJrX/P rabK0tLGaQW+4cOMpczI7cJogk37nvNhawQ0Dn9Bt7rvmY6uycym2SoB33VAfHvvhxogr8 xnuFRMGLBCG7V4zP+/QhVHzsyYnvB/Z9wormjnzahZnJIyyqy35RxHPKlAK5fR3YDMbD1f 3ceteaxlON3Vof6/Mn1cNYw9qXJfwVcJDNxQIzHiJbPSFDwjoWX29aj49JgbO8zAJ4Xj0J zp1qHBX+28Z4CXWpUbpcIdxsXTi+Db7r+1s5PumF5faF/HeMYMbsGr3r3k8N2w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jNewaaJJWh5lLXLCWuiOYoABRKEsvt2pN7qrAmPm1pQ=; b=P5oRV8QzBgzNCSJ/yOhkcFUbneth/kFMp+ZBrm3fhRYkITl5akLWs08iGEHPVf+mhtMYQW 0yBUcjNX/P1gEVAQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , "Michael S. Tsirkin" Subject: [PATCH v2 41/45] virtio: mem: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:29 +0100 Message-Id: <4a911503d16684592b59a16d8ade97e42df64a54.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: "Michael S. Tsirkin" --- drivers/virtio/virtio_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index 8a294b9cbcf6..56d0dbe62163 100644 --- a/drivers/virtio/virtio_mem.c +++ b/drivers/virtio/virtio_mem.c @@ -2950,8 +2950,8 @@ static int virtio_mem_probe(struct virtio_device *vde= v) mutex_init(&vm->hotplug_mutex); INIT_LIST_HEAD(&vm->next); spin_lock_init(&vm->removal_lock); - hrtimer_init(&vm->retry_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - vm->retry_timer.function =3D virtio_mem_timer_expired; + hrtimer_setup(&vm->retry_timer, virtio_mem_timer_expired, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); vm->retry_timer_ms =3D VIRTIO_MEM_RETRY_TIMER_MIN_MS; vm->in_kdump =3D is_kdump_kernel(); =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 4020B23A578 for ; Wed, 5 Feb 2025 10:47:08 +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=1738752430; cv=none; b=OSYe+xhN2VgNKvq1ljkPzJkmFpiDiMp4mle18ht6MV3My1sL+CfU9DRf2rbUxDqGbFBzzSzvTQi5JH6OOBsHX11BnWyWViAY7mu50jZH6w8FmZEMZgGDc7TzLpWa6DmKiBNWyFupSQPJBcwfl6RI8LgEpHI7qLUStVH0s8kPxtE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752430; c=relaxed/simple; bh=qjj7QTjN0JQEfpvGir8AMOKa51Z/zGUhegFk2vIHiJ4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eYh4hM6FhF1VO+XtcoAtIc+w2TJ4xnBlQeGntdHs7jrBKGwOsGSy++uXGrC9dew6Rm3/6797R9wA2016bYyKj3Hm6h5HVj4s39s+dSvudA+hwxW5ejD7p87YYrQQCqltE8ZwJ3ACnUTpENRLDwFLBHhN0DO/a9ysXqhK/Mul8Hg= 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=IJLpAxM0; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xloWB3JC; 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="IJLpAxM0"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xloWB3JC" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0xkbgVNW2zHU50lrtVMoPPpUuWMccik3qKj1ZAWAip0=; b=IJLpAxM0hU3gxbubD86UzXy7xgc2ba9hb1Ax8yq+vaS/nQbz+YbXdRZASrc6ADxmfITzDz nzX/csq+p3g/NM3Ag6la4Shf+ms7xlaP9U2ztK6300ZnwSMTs+KjLWj48y58ctuCxq/aAk YXn5W5GdtEBT2TPCBzH6cdQwfbEHdPrpFV/5nMvXIkU78YT5hWFtUmhpG+vV2yHrdd986I vvxrhDkFe4hAU7vKeNhflip+3+N2yIOaijI71t729NuwBUbaIMr5NBvZqxXdJjEIuqa5s2 y0hAd5Eq7FhVjTcIsMQ4z+LVyD4nsU4+eqrhdmxYss9RY5xvsFrRoJbPnKwEww== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0xkbgVNW2zHU50lrtVMoPPpUuWMccik3qKj1ZAWAip0=; b=xloWB3JCct6cAkPoZkDqhxadOemgeNjgwGK+klrzEw4xHClY4oBYuW7nThntRw4ytMxMd/ HCZ8sY01GZx4RbAA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Jason Gunthorpe Subject: [PATCH v2 42/45] RDMA: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:30 +0100 Message-Id: <37bd6895bb946f6d785ab5fe32f1a6f4b9e77c26.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Jason Gunthorpe --- drivers/infiniband/hw/hfi1/init.c | 5 ++--- drivers/infiniband/sw/rdmavt/qp.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1= /init.c index cbac4a442d9e..d6fbd9c2b8b4 100644 --- a/drivers/infiniband/hw/hfi1/init.c +++ b/drivers/infiniband/hw/hfi1/init.c @@ -635,12 +635,11 @@ void hfi1_init_pportdata(struct pci_dev *pdev, struct= hfi1_pportdata *ppd, spin_lock_init(&ppd->cca_timer_lock); =20 for (i =3D 0; i < OPA_MAX_SLS; i++) { - hrtimer_init(&ppd->cca_timer[i].hrtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); ppd->cca_timer[i].ppd =3D ppd; ppd->cca_timer[i].sl =3D i; ppd->cca_timer[i].ccti =3D 0; - ppd->cca_timer[i].hrtimer.function =3D cca_timer_fn; + hrtimer_setup(&ppd->cca_timer[i].hrtimer, cca_timer_fn, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); } =20 ppd->cc_max_table_entries =3D IB_CC_TABLE_CAP_DEFAULT; diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdma= vt/qp.c index e6203e26cc06..614009fb9632 100644 --- a/drivers/infiniband/sw/rdmavt/qp.c +++ b/drivers/infiniband/sw/rdmavt/qp.c @@ -1107,9 +1107,8 @@ int rvt_create_qp(struct ib_qp *ibqp, struct ib_qp_in= it_attr *init_attr, } /* initialize timers needed for rc qp */ timer_setup(&qp->s_timer, rvt_rc_timeout, 0); - hrtimer_init(&qp->s_rnr_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - qp->s_rnr_timer.function =3D rvt_rc_rnr_retry; + hrtimer_setup(&qp->s_rnr_timer, rvt_rc_rnr_retry, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); =20 /* * Driver needs to set up it's private QP structure and do any --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 4E42623A58D for ; Wed, 5 Feb 2025 10:47:08 +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=1738752430; cv=none; b=CerD9OCLQEpq7oKrS/zkX9pK8mb/cPbZdPO6bTYI2UNAbzlz4jC6M5htHK7kKyJhCxVknJ6vBIEBDdhe4mY4n1B1v4NM2da1IPO8So84PG2XmvjuAbBHnhpdUzAeZo35AAohb2fv7dcUipHKIHixjNatMth0itkTsoUjBzdASM8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752430; c=relaxed/simple; bh=6gyVfc9YT9K9XE5HuqAO+Ehf/vRd5tfwbetFB1Bie4M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=UNDBeWsaZuTnAUJxtenWtkx7yVpplXc8PeJ3eu6XHC5sIBCY6gyzLbEtumhn7Vb7O6tSDBoaGiMbMMSyNBho/DXX06Fya3PWFyD5qQRs1HO01NBOMxwtgT2UT20buIs+TqIMn+qfppmpCPVmm9BHSNJ67eY+gvA9z8rmfHRn+cw= 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=Ve9gsEkN; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=G3n2zMVt; 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="Ve9gsEkN"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="G3n2zMVt" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752426; h=from:from: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=RexfgyQiaO2DZFgKT52XT9v0CgK6EZGqRaKJOG68cgQ=; b=Ve9gsEkNIgbvKBaE3EUwuZ4Svjd895uCVqUzC5LWb/sEH+lzJOmHI5XrESnl+MumzrolF8 5HDR20l2ximG6Gxf5N8PPFxGLvGc/BNgIvN9xVjrG7xK2uzy+TG1fDyggK8zrFG7t15dXA P/oY3vNmniJ/b1aRkEH6xyVPdQ9IjOvflHZSW67VDtkBF3nS0nWLej5YogkEqb5MHmigLW tjyzHoHMN6NlgTci2UqZ7WuuIaijvGB9yyHINwEvezSzg+J7ybL4lX4FPaJXcAQ4c6bYLE StromYYnr5pjIi11KEy4mp4vdK4+DapjNiibYVszVjrAdPXUjIcXPGy28nYsPA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752426; h=from:from: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=RexfgyQiaO2DZFgKT52XT9v0CgK6EZGqRaKJOG68cgQ=; b=G3n2zMVtQ3W7H2g6s/g9EBePXw+AfF/ha1bvvTByRP2eKqByM2So0jWiC8CrJqZZOFCE+P MetdrYWMKmeLFLBg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Subject: [PATCH v2 43/45] pwm: gpio: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:31 +0100 Message-Id: <7b7115da84372a49e36a0ac1a5ce553129c3ce0b.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: "Uwe Kleine-K=C3=B6nig" --- drivers/pwm/pwm-gpio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-gpio.c b/drivers/pwm/pwm-gpio.c index 9f8884ac7504..5f4edeb394a9 100644 --- a/drivers/pwm/pwm-gpio.c +++ b/drivers/pwm/pwm-gpio.c @@ -207,13 +207,12 @@ static int pwm_gpio_probe(struct platform_device *pde= v) chip->ops =3D &pwm_gpio_ops; chip->atomic =3D true; =20 - hrtimer_init(&gpwm->gpio_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); + hrtimer_setup(&gpwm->gpio_timer, pwm_gpio_timer, CLOCK_MONOTONIC, HRTIMER= _MODE_REL); + ret =3D devm_add_action_or_reset(dev, pwm_gpio_disable_hrtimer, gpwm); if (ret) return ret; =20 - gpwm->gpio_timer.function =3D pwm_gpio_timer; - ret =3D pwmchip_add(chip); if (ret < 0) return dev_err_probe(dev, ret, "could not add pwmchip\n"); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 BF2A623DE9B for ; Wed, 5 Feb 2025 10:47:08 +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=1738752430; cv=none; b=b13EtldZ8LsegLZI48VNppkDLW+k3ORrALSTbv6RCMeSvgeDBDQsD8YqCpja9h81z83hBbPI7Ta3ZgYnMFEDUuu9BXntjULBXVMM9i/eEiP20GVr2KGWL5WhCQe4dvaZMxG4mdohrOTznNfT3Mkkc/a2S4ETrThoLyFSiEGdFTE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752430; c=relaxed/simple; bh=iTUumdwedxLsfQz5hNa/CNRYa31SolETVCUMMjrgXwA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dzMhhLkg1w2dVfo/D8gZH/ZmbRD25uo9ivD8KE7wlV56pOiTnxEh6LOiSXsExEFKWWikliCAX7BN05g1lTK3GN+CUHAhlAplAQsnd/ala+RxdohwgDmLMyj2zn79QZSx3jqCRpiJv9W/56fp8D46qGdfd7KIf1+FRc0QKrkGfMk= 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=a1dRzCpn; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=jg0XxbMN; 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="a1dRzCpn"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jg0XxbMN" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2Dw/0AENZUqmx2lrhcOZJa2Q8uCxc6ZKmcFrmjSHguw=; b=a1dRzCpnEQ6+O+ztLcSrTQ9eDFf6qtzhYblrR9KMM/YasFbwWHYdMXdrGIjLVBEKMrCpHv BTxunqyedJg8wJ25bpbc6qGl0w4iUfggdgs8daalESji152qD1XKZegpDcVosWGrjmi65U 8TUpfJi5eQSG0l8zB8Nswx+iCqc8U8/146nySD2vXC7NfHJWqGYIqxwbiRYXoaGS7MU2+i YELXW41u0GOvsW6IhqhdaeJW6mYWUNkR2O7ZmYkc5GQCeTBzx/pwrkOrKqm/9STSYceIyt YvkJx867P6M67SrCbV5TFQ2Q067YiIft1AI4hT/kJmXmpIHpiKeMGsV5VGSy0Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2Dw/0AENZUqmx2lrhcOZJa2Q8uCxc6ZKmcFrmjSHguw=; b=jg0XxbMNez7yWKUeBEfnhsGSF+ihEe/sspmjNYLcsv+pk/skrx3lYq/hKfyNH/PybzsoWu CL+d/Asx125zOkAQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Takashi Iwai Subject: [PATCH v2 44/45] ASoC: fsl: imx-pcm-fiq: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:32 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Takashi Iwai --- sound/soc/fsl/imx-pcm-fiq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/imx-pcm-fiq.c b/sound/soc/fsl/imx-pcm-fiq.c index 3391430e4253..83de3ae33691 100644 --- a/sound/soc/fsl/imx-pcm-fiq.c +++ b/sound/soc/fsl/imx-pcm-fiq.c @@ -185,8 +185,7 @@ static int snd_imx_open(struct snd_soc_component *compo= nent, =20 atomic_set(&iprtd->playing, 0); atomic_set(&iprtd->capturing, 0); - hrtimer_init(&iprtd->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - iprtd->hrt.function =3D snd_hrtimer_callback; + hrtimer_setup(&iprtd->hrt, snd_hrtimer_callback, CLOCK_MONOTONIC, HRTIMER= _MODE_REL); =20 ret =3D snd_pcm_hw_constraint_integer(substream->runtime, SNDRV_PCM_HW_PARAM_PERIODS); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 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 74D9723ED64 for ; Wed, 5 Feb 2025 10:47:09 +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=1738752431; cv=none; b=t0tpvHW/JvtHX5qbQ+iJFOyFTJHjM6UN+NVxjMwkapynYRddndnLgqXrqfhh73hRkXPteFhBSOlpw8KngGW7zm7oURNMQuQj3hapAKBb3qq3WJR4s5A+K9LEegdJszf58dlqepnQqaM+6FyhyWg4DVTfeTfo527/diHTx0rjh/E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752431; c=relaxed/simple; bh=lL5KZean/dpll0/HHzw7iWhdI/MgRg+AoCG2kGt4Juo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WedPhUCyvBDkejCcJgttjQ7EBJymhYP6qUZb4SQDymO7La7VUWJEYF0nGzg6ZsX4j4RimeEV3fvJv5WYv6UfC7I+kFRWHh960aUj0lRq6/O9Mo3lTPyGkdyeU47b+HglYOW4y9reeH5eXLdJQ50jEJhy9ABxXCub6G11Guyvco4= 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=wtTv7cgb; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=H34c8tTe; 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="wtTv7cgb"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="H34c8tTe" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pA5+OW+1SruDGsfpn+v3hvksjrN5sOKFVSHHy12lIls=; b=wtTv7cgbtLL9hf2zI2aftDk1TkTkMCNhndV/3Bp064zx3MHhMzvFUyQb9DIhpX/52dRJYh 88vTf0rcz3IyHSRPnCxrRj3jQH1P2Yh5485BA/mAVBUdQN6tP7xMilfI3jO7LQsRbSK+p4 y9HHsa43lqwitoxzIj6NJ+6MEPXdGndPU1f0Q4YdMJu2uOZVN4QZKvgEMlwX/zY9SjntBb 572e+1MnKYy6HIRgo/17EfWEiDuXXxjgjc32MRhPvCLokaeIzaY22zOvHswQGlrfeiNzsa o6PkPOar8P9c7H8reCY0t34T5Oaui8iDaoqKfrcA1ySdYFj/vuYb0YpEvYJj/g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pA5+OW+1SruDGsfpn+v3hvksjrN5sOKFVSHHy12lIls=; b=H34c8tTejeGr5aR59Lwk60ZEU8DhNXAr523HGvDnYu0dn6TjqdNI9CZADBThjONSjbzxrv ccs2F2fdmTgDMECA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin , Takashi Iwai Subject: [PATCH v2 45/45] ALSA: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:46:33 +0100 Message-Id: <598031332ce738c82286a158cb66eb7e735b2e79.1738746904.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Takashi Iwai --- sound/core/hrtimer.c | 3 +-- sound/drivers/dummy.c | 3 +-- sound/drivers/pcsp/pcsp.c | 3 +-- sound/sh/sh_dac_audio.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/core/hrtimer.c b/sound/core/hrtimer.c index 147c1fea4708..e9c60dce59fb 100644 --- a/sound/core/hrtimer.c +++ b/sound/core/hrtimer.c @@ -66,9 +66,8 @@ static int snd_hrtimer_open(struct snd_timer *t) stime =3D kzalloc(sizeof(*stime), GFP_KERNEL); if (!stime) return -ENOMEM; - hrtimer_init(&stime->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL); stime->timer =3D t; - stime->hrt.function =3D snd_hrtimer_callback; + hrtimer_setup(&stime->hrt, snd_hrtimer_callback, CLOCK_MONOTONIC, HRTIMER= _MODE_REL); t->private_data =3D stime; return 0; } diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 8f5df9b3aaaa..c1a3efb633c5 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -457,8 +457,7 @@ static int dummy_hrtimer_create(struct snd_pcm_substrea= m *substream) if (!dpcm) return -ENOMEM; substream->runtime->private_data =3D dpcm; - hrtimer_init(&dpcm->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT); - dpcm->timer.function =3D dummy_hrtimer_callback; + hrtimer_setup(&dpcm->timer, dummy_hrtimer_callback, CLOCK_MONOTONIC, HRTI= MER_MODE_REL_SOFT); dpcm->substream =3D substream; atomic_set(&dpcm->running, 0); return 0; diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c index 78c9b1c7590f..e8482c2290c3 100644 --- a/sound/drivers/pcsp/pcsp.c +++ b/sound/drivers/pcsp/pcsp.c @@ -103,8 +103,7 @@ static int snd_card_pcsp_probe(int devnum, struct devic= e *dev) if (devnum !=3D 0) return -EINVAL; =20 - hrtimer_init(&pcsp_chip.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - pcsp_chip.timer.function =3D pcsp_do_timer; + hrtimer_setup(&pcsp_chip.timer, pcsp_do_timer, CLOCK_MONOTONIC, HRTIMER_M= ODE_REL); =20 err =3D snd_devm_card_new(dev, index, id, THIS_MODULE, 0, &card); if (err < 0) diff --git a/sound/sh/sh_dac_audio.c b/sound/sh/sh_dac_audio.c index 3f5422145c5e..84a4b17a0cc2 100644 --- a/sound/sh/sh_dac_audio.c +++ b/sound/sh/sh_dac_audio.c @@ -312,8 +312,7 @@ static int snd_sh_dac_create(struct snd_card *card, =20 chip->card =3D card; =20 - hrtimer_init(&chip->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - chip->hrtimer.function =3D sh_dac_audio_timer; + hrtimer_setup(&chip->hrtimer, sh_dac_audio_timer, CLOCK_MONOTONIC, HRTIME= R_MODE_REL); =20 dac_audio_reset(chip); chip->rate =3D 8000; --=20 2.39.5