From nobody Mon Nov 25 10:54:53 2024 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 BC896192B9D for ; Mon, 28 Oct 2024 07:35:33 +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=1730100935; cv=none; b=fSOmHbD+NLcduQFeNh4varRHoO3oxQ2q40t7aCclzH1WCTgUkNLPid9z3uGPMVtRCljxOYb/TuY5FjBh13lRDMXo3Mte6yj0G8na1O1pzUwe89wwUmRmcSF/+Duofx9Er6h7UdR6MmeExTRFWzofQKTm7i4gypPxlIGvLEHR7FY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100935; c=relaxed/simple; bh=7qykuoXRggVkPigHGCQrlryYIh72TFBX8g9YgRJtnQY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=K3Gl/uSIDrIHJxfIKynlpPqmoBSi8Jh4k6JZ0EAXi0Lnb5BOMvbDsulFP7zFJ7R6b6IS+8SUN+CynGYAn9Me1I2PljZ3F3g6uZz0rDBBOyUNm4xbwp2ODuhC3qDsWoXbS9NEM527QEV4kn9C/onuHAaQ+MAek+QgmrFbwZSNWUQ= 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=Jc6bhKyx; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ItcJkDlW; 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="Jc6bhKyx"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ItcJkDlW" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100932; 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=ke5qweWt85bUkQA0Wor2RxSG+uxUvQzb1eYc8MKAi+M=; b=Jc6bhKyxsMMLohtN7tEtLr1Yu1svsxbHaOWYuxxwYCSls/f1RMCrYTjPVmoNZ1XbGs0z+u hYHmSbyEyunpIvjDQpQVxdtU8yI1tbSC9o09sLn57QEyqxfBfNFhYnYDM/MQyBpPYGiY3c c6Qb6F/7mfWw/5iEKZSGA9fyrO1pRupRmk0Q47Q2/VOjiyxWnLBYi6lMdLAdFfUAG7EzeM QK/GJUs26qMTCqvVgtqnONLXMmiXKZOvWiu5OEwNRmtELUOFbCOG0G5bw+1IsBJuvvz2wp n62Chf1rDAD4TtIyq0ddU+gAQtLSTXot7IwJzN1voFiF3DyDeY6bdKrXM0Bxkw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100932; 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=ke5qweWt85bUkQA0Wor2RxSG+uxUvQzb1eYc8MKAi+M=; b=ItcJkDlWwP4ghoj/RtLiUH1zMSwiUqvsrp+qRujcslTmTRYymp/J13fDXwHNqnefve/dKZ kNzTv+Z+etEQmVBA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 01/44] USB: chipidea: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:37 +0100 Message-Id: <4cf9c2d0d93f5bc6ac6c377f92739793adca1f6e.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 15A671D7E43 for ; Mon, 28 Oct 2024 07:35:34 +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=1730100935; cv=none; b=esKRU5Wvms7dyPIqV/EQHS7E0j4por/kkubeAwadCrHVweIyRxUEhCa5RPmCaYdtUTce0x3Ic9Nk+tHeq8pebKPm0B6R6ucAu61YH36GYWn4KF+p/U2LsSIIJ+LOLYoFMwDWO/eLUGf2Ts2LBA0+imzVhfwKzu9Weq//lV1Fseg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100935; c=relaxed/simple; bh=/1mNpvW/TLJL1FvZBhareeX8SSNZHPRaTR5QSYG2ITc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iINO6XoE2OAWtMnKXbcj9JTR0k8C+Iug2GFpbrTsdBVmHeTuElXgNxLWfa9AqaLk8OJnTxj9eJ02fZSfVVO68aWAf/qzeDLvWRwtQyQTklWgi5YgiU9ZRahrUhKV2NPLN16weVhLpH8DRrHAKBAP3cQ0WsOeTprJSoxX8z/GlP4= 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=tZNIir/Z; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=EU0u3k5Y; 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="tZNIir/Z"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="EU0u3k5Y" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100932; 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=Lbh3IVRyBqUV2FCpCmbEWh0nPes2Vx796VP9y2euSzU=; b=tZNIir/ZjgKJIcMUAApovbYmkhJLUIWRVt32nRm/YLIkJ+xK5ZSwIGhuRPNmbD+9xbptVo KGFWT8B8I4hWczqslIM7bG2g8yM06V9jmiXPc4EhmI8+jlT3ZQ+1CnmYYnGWZ+1Ms5T5L9 OPp7fiyQhHXbFfANky5S5vUac/WsDdJg+wdgKwmTYDs0H/sX1+ROux6KBxEZ2cd1Ppq3Eu ADmDtf3qaQdJqSDRlVFQelXwLxahyB3fUzOZH0v5sSf1eDSOhgeWE19orGcgpqJIbqfRcH JkRhLQ8Lir3VNsmWvL1wvPJs5p3gfZfmuHhz38NtD539w+7/mNV8qoURJF6TxQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100932; 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=Lbh3IVRyBqUV2FCpCmbEWh0nPes2Vx796VP9y2euSzU=; b=EU0u3k5Yw9tKDbf61thRsQM1PslLsAnLvoWw3Ts1zB5XUq37uXGSWz28wcNpzKdnJRPTOm TK/Gkl4Ig5IHECAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 02/44] usb: dwc2: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:38 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 A67A81B373B for ; Mon, 28 Oct 2024 07:35:34 +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=1730100936; cv=none; b=dPYDRIqFNNTJQMNdp/gOyBaug7cEwE2kXB9eqH9d+RMhRvGzZiTRcLF7Beo0hrlYliwMGYyHSc9gON+4yYBgUTI5/M8R7D8U3ExVNVL3sWAZsqUGRmAkJPUEClZfc6Nx+Lsmz5l3uEFvb0vgk2AhLpCcXbhYTvEaX3Qp/xB0dR4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100936; c=relaxed/simple; bh=EcIiVlXPxxmQNU0CXiQ79sLsnNyDCoucXBgFJQ3CdyU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u+VR/5HpZtkw0evHDxtJWlcAIOSR+mHg/X4wXTyEcXs2R+1NjIUJUQiDDYVL/jLNXrMS7WEXY17vcge7t1fq39OGV969CrZKdB4P71K9n0gXsQJqjI3T//GqAiGFTK3SjdRDCTiBVqlTb/h0m19xOWa4waQUQh9dZgHP0SJKDAY= 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=IqUXv5Eb; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=lamGsNvW; 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="IqUXv5Eb"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="lamGsNvW" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100933; 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=VsQmLX6ZSibcBD7WZZrpoU2ZdQz66xx3VcZH5kz/i1M=; b=IqUXv5Ebknx4XbJN2MwH3VS6sdpJ4YCk0fgzvk3H5zqiWQpqJjqu0IoL4uMLD/zEEmD8O0 4MowYD7qNI5uVvojCwKomreSo2PBS8e7rZBf79TH4P6a/KRvxncog/ATuDfUSOCyF6zSh0 nsCumojJImENRnrniGOOmGTmmDS5t8mkM8oTgO4ei/Qb57G2fgtOXDSWnzhZq1fL21NHuz hs00zbnTM4UWZjtaog1WnnCUvSqkh/EnZk4iQJuO3VNBxTsC+XAxwRdNyWVesrQGrAwNQf wAGqQq71TyaGizvdsYaobzEzKXS97FQUz5gHEr01ftiQK1qTShum1iy0qmSa3g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100933; 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=VsQmLX6ZSibcBD7WZZrpoU2ZdQz66xx3VcZH5kz/i1M=; b=lamGsNvWfH/46gy+dI72D8CUD73EQunOmhHqAhsxGZO77prZvTg01LRuCVCwDoCF+Fl4mZ dm4H+SU7oosMoMCw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 03/44] usb: fotg210-hcd: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:39 +0100 Message-Id: <35d03799c19982aa2f8adb0af3d2fc67c60ae61a.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 8c5aaf860635..36d4d5ab7a89 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 Mon Nov 25 10:54:53 2024 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 1F5D6191F91 for ; Mon, 28 Oct 2024 07:35:35 +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=1730100937; cv=none; b=HbHM8W5epLXkrKmIydM2MFVfOAQXbJQCG25jVvTUoSiyI6tgXgQjioRiimEkXTmY2ofsGTwloIBYsXIwCPY93fXKlZrCT+RP6e+NuzfkQbJH9LFV0RSAPxv6JTGWA5sE3llsF9kSxAkKmqHAROG5IHEjgCbjkH8MqbYPYuZUNao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100937; c=relaxed/simple; bh=8s7L7Isjf0Nni/eQWdz4bolhPH6n6k+huVPS9Ks+Udk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Yl/pDGg1DdJAaYYy/uJ2VLek9L8zqrlYVLyNvJZq+HAmqDbrsTQKd9xycIyRnP83IefTjx6ehbfJdwg4Hz7nsWFApLJjdoASnBzWedcWUXT/E9GrPH3UsRYsRbrfUtMmsYiAewd9fXIQqWICiAWXyzamU1LoaQkg0wU3rmomGc8= 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=HiseFaS3; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=v5xINcpF; 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="HiseFaS3"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="v5xINcpF" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100933; 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=5iyVcUFP8Pc3i+Zxw4z9mRyRMZ1P4oTGU6J20Xh+9GY=; b=HiseFaS3Sw55YFJV3yfHqPxe2dY9i8IrBIbZh02LiZVNg8XkVmA3K+TZFnH3vDipE7qget s2VGNaZUvZ9YpwZjS6to3xBt1t4F9ue0+mkvSEpOkWUnWs3vNk62sMepQ5RtcsPelQknf5 xB0O0Lk7kBXn8sL5nZGJ0A7yb3bzF+EUooffGdWyqaTdlaHCRTPv9JrLsZFiziJglfle8j GmERB9hVOqVYd9b3YuSY1W80fbZYIAQgce28h0QH15/NWiX/cGdTW9f2WHFMWUDspayCBO HIsl2X4ckhbE3ew9eF67vPPkRnejKM3Eei8TWb3owNh+lUw+hsOLfhr9yQo3zA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100933; 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=5iyVcUFP8Pc3i+Zxw4z9mRyRMZ1P4oTGU6J20Xh+9GY=; b=v5xINcpF2i4S5gvwsDX2GX7b0zb550g1lrlJAL7p//twUK3Sl47lu+Ap5MHDThHiMrV2J9 B8rx1M2ktrqGwCBg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 04/44] usb: gadget: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:40 +0100 Message-Id: <1f79c2d68dc641329cbbe358a2cba79d2335d8aa.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 8e761249d672..dcdb6246e542 100644 --- a/drivers/usb/gadget/function/f_ncm.c +++ b/drivers/usb/gadget/function/f_ncm.c @@ -1558,8 +1558,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 ff7bee78bcc4..bae07e87f37f 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c @@ -2469,8 +2469,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); @@ -2499,8 +2498,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 Mon Nov 25 10:54:53 2024 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 EEB301D88DD for ; Mon, 28 Oct 2024 07:35:36 +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=1730100939; cv=none; b=qgfk/3U1w/l5UkjdKCFfB8+MJZNM8crEfs9GvlgiPwZgFkjsp4/QHnw+aQ9odhnAHBkDeAxKu7keo0hgpl9BvG2RJLKHZ+PHb8zl4YfxqHT7x2ynmt5GXvzIevaevbGxHgm8/rKb+9BFXiLZltkXjZMbAODTovCZ1GiM+TVB8iE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100939; c=relaxed/simple; bh=6tAcVwXV0yfM8sT/Li7mHpI+3tGTUqV6Roxtj3Y4kPM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GkB3xmi0jX5OgDImnSOtepQdJxxhxoUMIP3Wa1jInS2Qf3gZdnCam4w6jbBdqrBGA6OKdeR43GZPGHpPiwPTV7HOuCJmN2OjO+JHFeIS1z6EDlbiYQXFVpjFWZP0BWAysaMrmvSkRzdeQEk9njO4OVkRrSibPge8bQpBc/tirX4= 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=4F8nwo/C; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=8yctEO1C; 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="4F8nwo/C"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="8yctEO1C" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100934; 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=/jZWyOgpHOB7XQ7LSkzhpzmsHUeSnxjnVm7YmCze7h4=; b=4F8nwo/CfWFNJg3e3aDHdiGxuHxXMw1DtZ8OoFmqJGgT0BQI6UNmhcByfxsylwNkIatXz/ FQzCGPUbuF2qlDCKDd1Y5cg1yYp6B6iTPQ+kFI1gvouUpqrzEo8HVwoafGqV7JIdV7ubl0 skbtwZF54UTrPnbwCsprB5U8ZZwur/Nh4YYOq1BChNtTNSt/zzWmtRqu16NbYT7Sgnndkk nDQgSqKT0/T+lUt2cirWaUiYeuwVJa0wDyctTRO4LpdXOBVmRywufrPGbasq8VQy2kzp6S jpSKHmbQ9oAxj+YABZcE2ynAKw1GUxditMzICMtRJP2VNxuV8gexD++pQNmP2g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100934; 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=/jZWyOgpHOB7XQ7LSkzhpzmsHUeSnxjnVm7YmCze7h4=; b=8yctEO1Cou4CX3y6t9DbEPj7lbg/lZQqcRo7oCvM9Egw2r+vht1F268+HJHo5GuEciWHs9 kgFAgygVvNhMAoCQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 05/44] usb: ehci: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:41 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 802bfafb1012..127699aa482a 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 Mon Nov 25 10:54:53 2024 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 EEA861D88D3 for ; Mon, 28 Oct 2024 07:35:36 +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=1730100939; cv=none; b=RDL5Ti4BoGykTZQ8ECobRekJJaGOXpdvm+DcIDY/WdjFRiRz+gFFMu9/T/ZhUbRc9bqg670CpqUa2HG3L/ITaa8FtekNCGBX6YzBjqv+pQGsJSODwP5EzGJK+NNqCe5msEpucIbROvEk/7XEHO48lZ21Hg3Qgd0sIUmuKXThbes= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100939; c=relaxed/simple; bh=ocxJPXrRMX9AKPTRCsMQE3+IzYihoZ0YsOyAwjdYL8Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PlqCeU2WLFgz0gRzLJYEM9lHdvf9eD084UchbdKli+Fd2xHh5L/URFdcolspgYseh4HYctBWYjImAf8pFpbzSOLe6TS715gZOHeb7hUtUjgirkT2JXqT1bZVe7EZJs/TESpjBvASMOf13I/tMrephjCLisgzL6gtlfDbRxW5DAs= 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=TU6vzB03; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WtNYUEtl; 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="TU6vzB03"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WtNYUEtl" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100934; 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=4zUA72cF0wRisdlX9SpPcqHHR3ShFEagmFS22tbaE90=; b=TU6vzB03pYEwWF031wybG3X0tlwMGQG2PuF83IqHSEkd0EqfAdOgI1NZ2mhZc+Nh3hDits Ksnr4s+5E/CzuakoILHpqN/dRtb5JeoGtYHALbZf75JGITRd5oI4DEAgzsXLD79Wg4d8ti zwLCl/sx252JNlJFIzjqq4KWAZx+dDdTEQe34HBudrf2A+Mu2TgAoSi7/Tb6pelzYW0zfv dRK7mN2P88cbcv+RyQ+jta/Hfv56ZaFEjxDg8mU4tyeieJU2DJsYALvhvSm5QDC2wjRXkL m2CMmBM0CfXbLbdY7qCPbF5chh0lRUccgJKVECoYSMyMmrWlha7NmlmGyipSGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100934; 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=4zUA72cF0wRisdlX9SpPcqHHR3ShFEagmFS22tbaE90=; b=WtNYUEtlrmiBtb9Wk6Z7lzRJGoQxhZ2BmJEMrfMEmG02mFq5HaIYVcXZLOUsslmyUAdG5m ZgAS983lVH7HWBAQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 06/44] usb: musb: cppi41: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:42 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 403631D8E0F for ; Mon, 28 Oct 2024 07:35:37 +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=1730100939; cv=none; b=B3yxYadhe+F7NWxNtHMxdXGEivkphpD8Ct93oBwTPzrdV5oYDaYxetOKAM6jbYzEmLcsOA6YsiJ/zqIdg7bvh0TDiw6jmtA4Iclkpy87Spmnf5W0Id1CAlAcfQxly4aNmRlWHlKLsiOKuAtZ8D36nzn5km4mTsdDA0ceaWRM7jY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100939; c=relaxed/simple; bh=UaYxAumF596mIKmZqycLpRWoB173w88RHVYNzv7Ytgs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=awHg+HThoWja9qgT8NlJCROIfEQu6y2xizLpovbKhCeQN/ggCW5M9PoKdMmo9lRDfAPdmjr/sNZQBlDPiTMZGxszmWPVaG8AHb5v+6WHUHFfY2MbPAKAIZ86oCL/1ZpjhdCGm9xzPBwfCcL3iY+s5y8HIj1xtogJFWCxEELfSns= 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=MP+wdI4H; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=XLz+QnqC; 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="MP+wdI4H"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="XLz+QnqC" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100934; 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=vhW5CIf5rCBS5Mqnn3c+MLTZGdB9bw1qRERMonk4LY4=; b=MP+wdI4HVSxDO1UKJirOUN4ncC9hqP502lX3iduze8QA7FittXropIAgJpxCAB587K5yyt vDsn98v0rml2ZbOsdSZ1fajjD7iJ45e/e0pzMJMqRgP+RzF5alhUvQhDkyEKEnUcV/g0ZG igCh0F/+dRIVV15qL642OaihS/Y0f8T0Zzx1EWi57DpehD+2+bL2PVDvDaE5yqy8EQtRxU KiBipLI8yeKZwdpJtbKldmFpZuxuOfpW66oXZ8Q2hCZFF4qR9e6STKwXLf1z5H7rzHSn3a cVGWgwrFYdn4gmFI0glFx/9a21U4gQJXiZgtVM8px1dSAWmwG1qgeC1EPYydhA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100934; 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=vhW5CIf5rCBS5Mqnn3c+MLTZGdB9bw1qRERMonk4LY4=; b=XLz+QnqCQSqWBPmDOFkLXEH4QaV1wWl9rOiDLXO9QrCHFXMsil3xcNw1Lgat+kOMu+hzgK howd0J1YLTNDShAA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 07/44] usb: typec: tcpm: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:43 +0100 Message-Id: <6db894f0aff57181987d7754ad315883a046bca5.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 fc619478200f..48ae73033972 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -7587,14 +7587,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 Mon Nov 25 10:54:53 2024 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 45A5E1D8E12 for ; Mon, 28 Oct 2024 07:35:37 +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=1730100939; cv=none; b=tku+Q1wiUcIOeTVj11GOyoyQCg+fhLQsCXMleZMm97Y6WJpBzvU8dCpHCdZc2Ye1K/qsCYANG3L9XOcPv+jc+X4thFO31qc0n52KhicIM1b01DD4JEo/b3hznLMPWC1GSVBJyNJsXNdw1DBUPz1M1byg85S6MRV/lY3Z05YTIDw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100939; c=relaxed/simple; bh=UWtNd6X90JFlmzOQaxaeH0W1A6Y1qf7ydVJb2UDlJW4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZVD6OMo4RKhNQt6gDxU1TK7BHW8/we/jqeBsWEN/Du+OcAQ+Oy/Z9CW2WUTR36k5OK/Bu7CDbI2ad5EDjFJRLd5sA09m0sk1uxHCZu5HDR8xM2ebqMyD4S4QQXl1cDTeWrromJFkiKUXxq1HHwKf9KTwdI9sw1+VrEtz3JemmlU= 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=Kp46gt7G; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=S4FXGH7Z; 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="Kp46gt7G"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="S4FXGH7Z" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100935; 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=DE5x6gmEAuO/dXtOClYJ59fHqtORiAXE5xfwUqoTonU=; b=Kp46gt7G24LoHz8Ebzs9X2BSriwr0zjq31qrjgHiO5sk4tAHs+6GjRo24GhmILG2oEYUk/ 9bRN/JpUlqRf/bSIImqdnHYJYHRAU/BOaSZMuiklnvFMfjWqW9aMaq2h88uEUq58+P8+tX d5xJSL4fzEm7cbMdolNO9BVlUWAGCKwqRWi+jV8gQ7+ksDGm6xZ6EMo1fF1/WeJXLfHzWX xyl81M4Ap5XK7bkS4c7LR3B13JDRLN5yLsk4kxKk/5HHoZQAptwJ3KZhTH4w9eIubjhb76 oS70yF5dIbmixsQ9f2pjlAEvv6aSWFbqRzVMjmbtOkAi1tBn31574EIY27I+kA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100935; 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=DE5x6gmEAuO/dXtOClYJ59fHqtORiAXE5xfwUqoTonU=; b=S4FXGH7ZiuqQoCxgjsNHabu1JdED+DBw/XDoodWYLOqKyMQPMfLRKMluV/PXi9Z6el9GsM VUQY3MKeKt5xT7Ag== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 08/44] serial: 8250: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:44 +0100 Message-Id: <54c77747be2b79062970d874bd8003bd47096d70.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 2569ca69223f..766bbdb36d19 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 3509af7dc52b..36820eed535a 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -546,12 +546,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 Mon Nov 25 10:54:53 2024 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 85C6F1D90B9 for ; Mon, 28 Oct 2024 07:35:37 +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=1730100939; cv=none; b=CYeD3xJeN8/DXBjLCexTnF/0nEVVfA3ZGIalaOYuTk+JDekkQBpH2nZbChjri8XARbTyI7Prh1GCzodA7O2xWgXlne7iiMyR4Rbu5KnLq3pQmzN1YDfDrJnOvyFLH7v2OrUIlDTk6QA/1rPPE+LG5Qs1uHvHtMflgIIqiUr3HRo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100939; c=relaxed/simple; bh=3PYaFV7Oys5DkACuILmY2qDle/vQ2K7t6BDA9FRSnXA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jGtocnFugNA8iic9nqpnRORrrrscRLIeXOiHvmwOlstskG7Vz1AnQ7wzedFqXNrYjIgqDsuVGwT22zXJ1/ka7Vvu4XQDneopY0sP111rh4nr9CDxqiTN+6P8Lm4iEzFfoNOhSopGn/SOvQ6+qqU5TTuCvEmBeQrmb7mfCloEPOk= 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=TaLELn9Q; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ZPNg+VL4; 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="TaLELn9Q"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZPNg+VL4" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100935; 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=wnhs7Q2K97xaJ0+aOCp8WgzteNZ8vBXPvoSOZogCkNI=; b=TaLELn9QTSDqXy0665N+aBbrs3u4Tk7e3c9mJ5+lOdiEIWa2EFAmHLy9TiO4j+ZfdUqadC CX8Zb5DVZAuZWNoQBu6dDuPMX2UisFBxKr1HA6pv5Veet9s3Jn+gaUlubTu/Zs1niW4vAN fT3Q6ouUhQ6I/KDuGiwe9+mHOtkvJstC25seQh3Yn0uGbEx/h7OF7By72YpLOQGPAwWjLB t+wwlHxrc1MdKOmId4+k+XObyaDOD3uWA//15Pqwhr6O7D30fOoP9XqFAtcKVln0HiicKy OE5ETcoWrrstDmgZzWXcWkUbtip5Hf1PrGgALLIpkiX3rRuO/0gJ0BkhRZGL7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100935; 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=wnhs7Q2K97xaJ0+aOCp8WgzteNZ8vBXPvoSOZogCkNI=; b=ZPNg+VL4qTSDxqHAdXffEjzy+DosUOMxp2489cRoPjI0lEWhxaeFCwBTFGQ0+tdKdt+fJY wQUhRmWOsiK4sODA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 09/44] serial: imx: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:45 +0100 Message-Id: <6d72f1abc0f151345934fa7963326dfd74b66ee8.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 67d4a72eda77..753325b6d125 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -2475,10 +2475,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 Mon Nov 25 10:54:53 2024 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 85BE21D90B6 for ; Mon, 28 Oct 2024 07:35:37 +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=1730100940; cv=none; b=IXf59XBhVWFamdlJQOA0RPHkaOFxuSTqebeJCMCV5kam/J0OfF19zfovPe31FdJKWxn0ZNZE2t/VQxbplLjonBZZc4HEyECKWgygUZCMqmMPvDiZJaiK3aJh5ZbmXgJiJAAJioq9lnuQmGlSdtOMM3ouySKprcmMz2p0e9mdeP4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100940; c=relaxed/simple; bh=pdbYB+u46eGaJDT1PSJvYcZGhsghd4PRRmyCH9BQDKM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kWqsRRNbWmukrRv08E10WVi8N+H2ZQGsZMjvg8Bo8i5hMbmBVWwaYxqUrg6yknC2hKncRtDBeMSnZ2acTnuzihjpslHxkCESUJzNmgGEqHaegoiuTl5CcpElrynHFGbY3F4quEmHWYfvyM2lTulAdsEw1E+OCLOVU77nCBqdlls= 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=pplijDq5; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=R0qL25RT; 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="pplijDq5"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="R0qL25RT" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100935; 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=LKuavl6ftw7muQYWbF/ONalJr/LauagWVFwayn43ZU0=; b=pplijDq5bJvlh2+26/gpEB2d4LVzhOaZ49bENsQ05+5n5LYmw/ORuEccMFolhnBOhB2IDC Sz1DO8AuZRy1/8qu5rDNSWKLiiMx/NIO6ZQ6tk9Ys7DZggHnAda/OXmw94nbLgaKfqg4al amlomYdRHh0GFXffQKAgm8hHjLKesS+qZcD2cLsvxru9EiBBOHoAUmjzHE1lvzQCCJJ1Lg dVbrP+SRxYrXl87YfDdTGvXkZUeZY5OWKt2oOWwmAOmh8vxKmdtqjrBrMVoqNSZ7xFFZ2a THsnlJ+HbUwMULfmQvdhSfcZ7jADaro+Gt8rz30VYKYIW9IGPH2MLSqxS41PVA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100935; 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=LKuavl6ftw7muQYWbF/ONalJr/LauagWVFwayn43ZU0=; b=R0qL25RToYpmX/sRk3UwAc9dR1ZxRsV9f+oKjMRpHohuTac0t7Ry0YN5FTxtMLagfQmIsz NN6jR4LdZxIvMGCw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 10/44] serial: sh-sci: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:46 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 b80e9a528e17..42e9722c2c82 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1695,8 +1695,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 Mon Nov 25 10:54:53 2024 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 064D21E25F6 for ; Mon, 28 Oct 2024 07:35:38 +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=1730100940; cv=none; b=JuAwQnQeNPa3+9wNQTwFQTn/2pBslOmkgvVZQA9oQKguj4rEHXWg4N2jlaaCXJmTllhKvbFETu4NUzZrvCr4DZepKGXrMstizur8Qmc9ZqPmVINiAWtcrkQRsTduUuBy7wR0WW8qEvVVIZeOjsYA2FSOMj/tceuNbO4IjBjerhw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100940; c=relaxed/simple; bh=jwCoo4G8+sru4QpULFH1Gt1qFNp5mlI4VBikKVY3srA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Z+7K71sItwUsQuzpRJV/5Y6UQZ6TAvG/th/u7SxnKfkfR5mAfwPGrw+qx/p23qRe1rCN7uGpqcC82ijJkAc2bZuw33MLeG6sz4Vy7SJVPggIrPZdSRxMIaXN5vpAi0U2lE7611HLwKNACrpfKeoF762wwrJhxnfXGuhfmEPktvg= 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=HBG2TeAY; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xbd6A/Xp; 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="HBG2TeAY"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xbd6A/Xp" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100936; 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=h49iAgyP9GxJPZCVix3xERtV73NW1YoYxvNa4f7RK9k=; b=HBG2TeAYdc6KO0y8lORTD4n9MCqmspa6yJwcJxe/9svvDjmlZJA9br/RHmFz4UFgQTTW8m t+o1qpDved3pGwGn8QqoUb0ITyAAhCY8ZDWBe6tbNyOfmYI9K8VbAyqbN0C++NSH7Q2Qqc SVynFcpI7QybSPCHe2sPWG19BkYXCMZ8If4/SpVGbBEZZLXvVhk4N2HQqBE0ohB78i/z2H AjmcRGw+iBnv/QxrePdTY30lXCCPlNIOSgBkqdc3iAUNVdCjwfyxSP+Ovlu/cxAboHXG2y EiwB29g33NhMQy2m2JoWqGODiDi1bHnZkLb/qjVeEnMtlSzN4j3ji1xBqk00yA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100936; 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=h49iAgyP9GxJPZCVix3xERtV73NW1YoYxvNa4f7RK9k=; b=xbd6A/XpphtzKbE3ratDbubr2LIj99NQN/djfj6dA+Vkx9MMcWCRHC7UCd4eIBGgwNeJWJ Qk9FDPkscoA4yGAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 11/44] serial: xilinx_uartps: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:47 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 777392914819..4e9a63590c82 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1628,8 +1628,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 Mon Nov 25 10:54:53 2024 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 49CD91E501B for ; Mon, 28 Oct 2024 07:35:38 +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=1730100940; cv=none; b=d7Su22wR5P1VJEtDTWpmLqvxp3+liUo48m31P7KmPoYB0Pj7aG53J5IECMykSbpjCmLsEKc51j2i/Gbt2JGgi7z4YfUvXI4Uqpn+N7RaS29wdYAwdnhF4K02LCfx5qdM6czTdEI+QCCiRJwP0kAFb6X78IyOewSRgyvgMSpy2bc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100940; c=relaxed/simple; bh=12s/ih4rMxB/9E8RQdqFXVBfX1NG0zoQ/1YuJDRofK4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kCHVTrFFIRJNIuw8nk7pvzQU77z0SxRx0MeTWGiXStdnqZX8bY6ZHab4rjDS4168sTAuaylIcNAewQfJGblk9oJSTikoj0vRNcU1hl6uXJ21P3yYUuGCUvYgRvt0podC9wMtW25NxrYDNGysPLnQ2yw1nqaqt1PtEFi9oOJ3qXE= 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=QCBkFyXE; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=NU8DQSFg; 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="QCBkFyXE"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="NU8DQSFg" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100936; 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=VG98OgNYUt7AOG1lFIJaU4AmAsdYRtodd5/LuDGAKhA=; b=QCBkFyXE7Q8v3Yo1mMXICr3x0GEPgfy/vz4hmeKXtbWg4FjRnf8aTumQ0AotgA7geupGKh VcAZLfFGXklkhrexSmzShO77QkstxIyLI+DIaVR9CU4JasgL3BnVMbGwuOEvTPHecdIsdl uT4gAcddPFVWl51e6BHEG+w8DvCdlMU/3Ju3sszM87CqYmQ5yv86y4lQJM3rBjJGF/u4sZ 7Kb450PpuW9giIkQqywTNX5nImVaAJ4hjcu0X54lu+O2KT/Fg01W3HnF1hZTbOoE2y3Pga UgvgDk8SBicjcQj5cx6UGmS6vpJlJSOjEC3jIqTXtk9y9Y/NCdUZ8KHklEuFzA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100936; 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=VG98OgNYUt7AOG1lFIJaU4AmAsdYRtodd5/LuDGAKhA=; b=NU8DQSFgSmJ7Mou+Tq27weWz9ILntAOi1zaHPOO+zqXL2q1D87k6iE1LcDdmg+oVXUhCCI MmrKYZrNR7qOxECg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , "Martin K. Petersen" Subject: [PATCH 12/44] scsi: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:48 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 0dd451009b07..5dc9f47af1f2 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -7969,11 +7969,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 d95f417e24c0..6ddd2f83003d 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -6385,8 +6385,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 Mon Nov 25 10:54:53 2024 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 99CC21E7C1A for ; Mon, 28 Oct 2024 07:35:38 +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=1730100941; cv=none; b=slSvoN+iMIGzs7DrGndfVmmpCVXSk5CeBRC/j4M1rVaCCNFMZhs89herOg3z7qq1acj1karT8wKv92rwui7YO7UBD/QqYcLLxiTLgmJr8Vp3Ep0eA6zeYa59VclXngpcI+jjmjKyAeT9aik2y6yRf0ij1Cgek8Q7kI+mBc59Llk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100941; c=relaxed/simple; bh=XyDLzycutE3haSnlwMMFjd/eXRDfpKNC5x78QccVAnk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LwAhPeQCm/LJBvUXF0PpBJc0RCaCa04hzTksWneqQfQslWYpGZyil0IzJhnPT1Z9UZsQvM0vRrfsFlf0+Y0/CNjgCf5pwuHZDFHciRNFA9xTCNeeF6vkf2bfiKJdtadGMsMwmhTw0krPKetCLh6iG5ZzMZlIUQJy/01xdzPGsmI= 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=cxZJQMxm; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bUeeXWSS; 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="cxZJQMxm"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bUeeXWSS" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100937; 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=uNvhzJvkORL21CY5jsD75ElrQToYLN+MvRbU7d88fDs=; b=cxZJQMxmnZPgnrXiCh+hwIfVrMMQ9DiOdgZnxMWjUtSthX8ZVCjaM0Wa64RNXRKU3YG0bl +8hyeAH/cN0IMrbR2ls/sd3uR9AGCil2R4p27TXUSKn/sYKvB1d7w4cLFW03TsdZJlorkc 6DFgL8OwnZVKE94wyZJTTaYXPC7T08Yt/G2DcloP319obc5gVtEek9hYRgg8hbz2n0DlPy h701bXrsPczcob9S9pWcgcCli1N80TxmpHX6/NjrQTi4N4LghXfw4raYzr3WkOK4ySWanm dnWfh59LHWtTsKTMPJGfWgQMZXw9uS/qrfqimZfHGm+qSFLEXOm6fOIAkSJb3A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100937; 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=uNvhzJvkORL21CY5jsD75ElrQToYLN+MvRbU7d88fDs=; b=bUeeXWSSCxxxkgHySzzMBOVcDVKB776tTdGKSXLOQx7y553Td0CXQGa0NrbpvDETpcnQBm tkqXPqWFnU2+6VDg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Alexandre Belloni Subject: [PATCH 13/44] rtc: class: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:49 +0100 Message-Id: <558650cb8c501ba6ec3f054e9173701f493a2ae9.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- Cc: 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 Mon Nov 25 10:54:53 2024 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 D25701EC009 for ; Mon, 28 Oct 2024 07:35:38 +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=1730100941; cv=none; b=cXKRdVwMpJDcyQNuqA3L3k7ZyJ+PAYurFLOi/FzrnTC0FIGFabJWQzP/EGwOp0zhYkGpK0qIWQuqmkZ74mfHEzItdEHdvEebQPr8Fa4YMcr43WDTG3rojgvZ/+V1Ly3gWzMOVBhGuq9FgMvdwUIQ8pQwoDpkmKKbYQ0C7FCML6c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100941; c=relaxed/simple; bh=yxYaRz5YYKNw3qdQtujufTAlDrtbm5aDY9tbNBu2xDs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sTj6wqHxxxBJqZgmdaTkr/6/s5W7mDkzuW0pE0VC2OikfgrnSdbhdWx0BN+EqWBjnHXYiUNUQXMT2e5cc/fZubU0r5ktrP3HiJGQg8lfURZvjYOQW/vFxO1kRLU2ZQx4YmLL7fvtYyC5slvdidcCcMhtJPzcCPfIDMqlAzNkW2E= 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=GawyjlE+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KoOegUpt; 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="GawyjlE+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KoOegUpt" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100937; 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=aDNK2Ol6tPyckkAlsSArdJh2aHoZHCL7LbAKeA5xR+k=; b=GawyjlE+iDtRyDMlUdbk4ZMRObPUTperX5IwKMW32d/pn1+AFiqitO6x1h/YhMctybmJg4 dHcm6TEcQJEJlw2r3ODxJbq1ILt6/IKr6FzXKpD21/FaTMqarU/4xs23SD7Nc8gkU/cHWt MlnitDtP/JF9UcbA+KP8gfS3UQmN1De61uIXHRQF3Yw0/LJ2RehS/hcJsNDweQk2ixhULr rpc1+ZX/uymuhNO+3kK+rv9hUL/SAmqH1BP127waLVgnfvTiu4B9R6Dx7Zlpe8+BL5NGx5 LTnox6yGO3lsY+DRWtgo1Ceepx5qhL61AeSs6LCtp89N6ba4oEz9PuqW9nKShg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100937; 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=aDNK2Ol6tPyckkAlsSArdJh2aHoZHCL7LbAKeA5xR+k=; b=KoOegUptPjcWL84/CWz6Db7RjRv5xw4C4g2nXz7QfOfPXc9QDColFQEACSg9VvueMQvdOS Vt6FIk41dZcfIABw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 14/44] pps: generators: pps_gen_parport: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:50 +0100 Message-Id: <2600255ebe981f4ca08ab529d18ed961fe01472e.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 73D731EF92F for ; Mon, 28 Oct 2024 07:35:40 +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=1730100943; cv=none; b=m03OMWZ0CWjbYAlVNmofN8TeEd5OO5BxA2aRFlek25EnhNH+7LGVDbpyjyVHdSw88HSiVk8GNhz0nz7Rfgf3KV7WYrLZK2YvA50cBYz/a3WIwnBEPP/0gECifolkYMR97DCRBlUKVO/zAvZ0mS7VT4Rr4rIq5EoUqLQ2ibBN9Jo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100943; c=relaxed/simple; bh=BxDhOeSQLPgECkty78KmlusSnACDaKkcsuLTWWzn/go=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Txcyq05nyGRLJHlgKDNk9MCGybcsGW2Sb/JmukzxVjs0jDZLIqutGMBW8XfEqFz6QuLRXCufoTBFQ+r7MSOQcJrvJxkpHUfPK0hBh88JgV3JV9dyF59H6P69bRYqoaUip1KqmWjwfbyonm2Ph5TAUnGR6WM73u69wDkrWNSncKE= 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=GfFeZayu; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=9d//O7Ua; 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="GfFeZayu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="9d//O7Ua" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100937; 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=BrDakq/+76kc3UqGRrwKcgMS8Vdnk/xc6PYxmxTJvB8=; b=GfFeZayuAhpRvxADLlwRFO2boOh3VKl3i7CGYKwl350jfYcE6Cj2/fDATo5Dgr7ebejGTZ s8BGyGNuo68LOB9ugTv0MnRQSMTpsRZWmyR2SvNuKkgkIMrRp2RudXGSP0BleFCaurMZnI C1OV+DBDldE11YJjExct1EM7plJ6FsvopqotEarqW73FfCl731wS9BrhpjEH7E/ZxRhMOL polBv5chR7/oDBwTWqAB6/yDjGwS+2PR2KEhSM9WaujKspSnweuY9dXLpFUj8sxRWW+6BF /Oqyqg6JWJQ9AMP3UUeQjn5qXwOmdxprsVVgPZWvYYpzgJyeOH2BE8Ma+grrOg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100937; 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=BrDakq/+76kc3UqGRrwKcgMS8Vdnk/xc6PYxmxTJvB8=; b=9d//O7UawOVCZwaAIqrVzIs+eCMY/VtmYnZMhl5PWAN0luBblAgXTdpPD72MmyW8SbdJrh K7o2oL3hPxMPuxBg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , "Rafael J. Wysocki" Subject: [PATCH 15/44] powercap: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34: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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: "Rafael J. Wysocki" Acked-by: Jani Nikula Acked-by: Zack Rusin --- Cc: "Rafael J. Wysocki" --- 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 bafc59904ed3..29f9f452d445 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 5e793b80fd6b..e675d4240d9f 100644 --- a/drivers/powercap/intel_rapl_common.c +++ b/drivers/powercap/intel_rapl_common.c @@ -2063,8 +2063,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 Mon Nov 25 10:54:53 2024 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 717111EF92A for ; Mon, 28 Oct 2024 07:35:40 +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=1730100942; cv=none; b=VVPh5wJG3PMIlnecliY//ZToV81eQ7dA0fszRMOCwJpqdjRn88mW723f4UE+Ae6tiudCQZogo+Iphr7UYb4DXsjNSMUmgP7E1x25p1f/X0X2xdcgUX5sPg61Z7JUIaJkm1N6b0zRDyjMeXTfZ6XZdxRqibmq3svVeMPzey20uwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100942; c=relaxed/simple; bh=EPkvy45eVSUHipqlaDurGAp7pgrNaVpAtaQpHmvsqcw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mEk3Imtaw+Dim7Xn1W/B+ycsh+N2iJUCrnqmaFXJcnqqOwpioylfyce0L4hG4jqDLsBT71W+aQicr+IG+KWuuCB5KvgKDcapnFN0BYjsP16jV8PQWTYV5KqBAitokbJeaPsf9gRhfPfkQ6yJz9m1098LJ3koNYepOpLQ5SMJqMI= 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=i+I+5Euz; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VdAryi5k; 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="i+I+5Euz"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VdAryi5k" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100938; 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=pGO2/skIrnyTgss75i/snh3hyXg3vEmnpgGNi1VNx8o=; b=i+I+5EuzrRQFslV6/iKNQXuy7k43XcKFlcalosmFpXjtfIF+HUZST0kyfSelhtJhik14kw aCf/1hQkXDWD/GRkTb6nyBPD6Xw7xKUwY9bjuspV2dVl2CGQ2R9UkGUDLL1P57M1y2sRQ2 1qFU4cRI4IRBAfSVMzTk5Re1T3Jwz1YJwKfRPpw79XG7pISOJjfWqFgRmNmVJWI2AXZsLt JdW+zAM58pxKej7d6LxnfQlZfZEHZSoXzqk/fQGPiCh3CZOvh+GA8t2pVlN9SY+J6qXQ07 MLaBQuiZHM8BaCcLFMS1P2mmsvvj7u4kDxwyWLescWfyKVgon5cUZ9mTkoLl5A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100938; 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=pGO2/skIrnyTgss75i/snh3hyXg3vEmnpgGNi1VNx8o=; b=VdAryi5kUER5p54Sspq5OPV0Tb1Yi+NmTeu8UWfEIJjDfI6q22VqfAtSB6w1sEFgS9E7YA 9Ao8a/uo2sOfHzBA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Linus Walleij Subject: [PATCH 16/44] power: supply: ab8500_chargalg: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:52 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin Reviewed-by: Linus Walleij --- Cc: Linus Walleij --- 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 854491ad3ecd..56afd5d1f8c3 100644 --- a/drivers/power/supply/ab8500_chargalg.c +++ b/drivers/power/supply/ab8500_chargalg.c @@ -1788,13 +1788,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 Mon Nov 25 10:54:53 2024 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 DC5331F4FA9 for ; Mon, 28 Oct 2024 07:35:40 +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=1730100945; cv=none; b=rA4MFp8nTiSguRreIzJB23mF/XImeaOhpChGT5SWC6ZTO6B07gGx6qVxcAtp/NufTNxVvlmoEeEDMcqmk8DFeW0Bue+cPuiUFwyUcXhzcBHmjlMO1SpKyB+QaNBFZnZm7Xift6ghYsoIZc8BydHFBbg4wxG3b4NekOh7IbsA39Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100945; c=relaxed/simple; bh=AHF5o5vNEOXkzMJVYoznmT+6csMX/dc0lZOFe+Mr7dk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FVyhc1IQlsWdn7Ze92CLVQ+nHZnzg/cGC4vG9kFB0llIDcv4bdlKu+3MoaqsP2P/lrNAWempQ6rQChh+wehBBajppM70jomQJ7ci38r+f85SnmbFZymThV/kd0iE1IZFuDTbem+Uy4hS0cw9ZSOoo3NNI0/HdjxvMhZAUm4IFjU= 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=wwsokf7b; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YxKDlbxs; 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="wwsokf7b"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YxKDlbxs" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100938; 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=MihCUk6iO67SYt64qJ0M+dIX/dEuDX6YcAJM7Mh4EKY=; b=wwsokf7bSD9VCqJlMfI3Vmu1rPWnyUw8ir4KtQdE0OVthwJkiTSqw0MzIWaEt0FQIxiU1c UifDMQIViyNaoMMDi8N+3LSQ1ykLxWeknP+2kPo2H7FDhpiXrd24svDBnxL5p+9hJGllQN qndtHGuowHnpa+/CJ32vNDSrvM8lbHWVLmTzxwtWP8quC7NjRsLGo8odqjIRIFBz4QzVdL Zy8Y9LUBq749KSwemsp4zj/vOvcVW1AgWTGUaGgqe6mE99Nh45x93EM0Ke0MT+uTW9MZ1h YuVyfubgZS2qeuG6PszcrxXBlmWJk3wH/FOqRbDpqGMpraodD81ltr8qdc9B+w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100938; 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=MihCUk6iO67SYt64qJ0M+dIX/dEuDX6YcAJM7Mh4EKY=; b=YxKDlbxsl+pfSPSvzUvME/8kPLBvNgtEE+ZpWCKtWaOrBmbegRnyiFoaDx8JzmnZiaIYUC k8WronQsq48QniBA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Sebastian Reichel Subject: [PATCH 17/44] power: reset: ltc2952-poweroff: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34: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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- Cc: 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 fa25fbd53934..f87ce4686d4f 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 Mon Nov 25 10:54:53 2024 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 97C461D9329 for ; Mon, 28 Oct 2024 07:35:40 +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=1730100943; cv=none; b=rVmLva4c319zASRLixTfl17HcgyBvIjOlr9ZM1wjnLfPEFe5vDoYDj0bCUN/4xQA+QS0b5hMA89BJ2YO9enKFFiuAD3TF45FIuyHcj316Rbtrxg0oa4T6ey7SZBnZLUQiJffJ5oOEa3mOZj0U4gyLtojALMfIQSjiPDABI3ScbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100943; c=relaxed/simple; bh=hSmVDB9s3opYUP0w5UY+8MvpT15czToBUrWu5deqcY4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FMRYZ2lv9ZgsMr+dXLvTlMWEa2d9aGT1ik84xVNKxkg3byL4h1DNFSUS2szPoknwRC8P93GVAti3U4F18qcr/Hq2kKJL9Vuq5OZI+kNAcb+EImi7T3a0Mj9TxfBh6lHSnbMZv1kyhimOSn6hpwRLwYuM7OAXQptyObakvyJD/JI= 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=StYj46Fi; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=pznUBsi7; 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="StYj46Fi"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pznUBsi7" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100939; 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=d/BI0j8RPfznxjeHNdSm9jjPqIqDQjfttM8HSUkmB+M=; b=StYj46FinBqlAgQ+A1/ns0QJFX99k/K8y0SMMFbwgcsuo4fL2w2/q6euiJiEmXQgNMG7AD +DYUC38D+IYQqVyO+X2+dRIjIaOnBiYpUXULMID5fH+N9IJdpyvY/56FKc4ao1AgMJir8h PAQX4BtP6CiGlFWXSrLZmKKgTZCF8jI3/BeZh5bncII/JKbwTRDsWjxUPE10yWVmtbzNbZ bY1910FrkHnE9utFzWY2JfwT2brpifUWSW9mPWdGm9tiKPvuvwZRUdKO7+xClXlPNERwU9 wOfqq2DSCT6CKWVfD4tf8DFvAjJRlLPhsvXhZYfPK/dk4pRqzDDDK1ILeuKylg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100939; 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=d/BI0j8RPfznxjeHNdSm9jjPqIqDQjfttM8HSUkmB+M=; b=pznUBsi7aQ/8Vp4jefHOp8iSPGxW3fG4fjg2Ng3895iuQbzIqY0BP8fqA6eE3PCsgftHrM 88nsalIZbVfKtVCQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Will Deacon Subject: [PATCH 18/44] drivers: perf: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:54 +0100 Message-Id: <663c8175de33876af637e2934241967557ac2cdd.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 5c66b9278862..716c14da5564 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 94f1ebcd2a27..12ee0971b6ee 100644 --- a/drivers/perf/marvell_cn10k_ddr_pmu.c +++ b/drivers/perf/marvell_cn10k_ddr_pmu.c @@ -677,8 +677,8 @@ static int cn10k_ddr_perf_probe(struct platform_device = *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 faf763d2c95c..769a088c8747 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 Mon Nov 25 10:54:53 2024 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 27BFD1F4263 for ; Mon, 28 Oct 2024 07:35:41 +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=1730100943; cv=none; b=dDSxFnqRalexfqP/1ujrYsiBaZKgGiGVi+uk0OAPLFaRC41o3ejte22S9v3T0TASOrvlXh5RUR1wmnqTyvAb/+DGeGqJHtEEYHbVoAVEX/9l3Jip1M6DL9mk9CEs+nEojg2t9vsxYFgcLwWNhuq+PclxJvScnZh8LUOZkh8+lNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100943; c=relaxed/simple; bh=uVoa015HYe5btTzsgcGmX8XI598wivKdFZ21JQQzg0A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=E3yuVoFBj8ECyCjJ89SxNBXcL4vCvUTHvf3QvHSeqZnlILHKXRk6OwPrM5vaXRj1auaidLgSjCSDiCyJrYXX335yYYeSzqADM1OM8EBzA9QjZEfV2lMs1AhXA0UTkkM1fn3iboFBlfeHbCbePVo54ge3dPoVi2jW3151pRJKRuQ= 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=oToFpIYG; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=RmhyG4kt; 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="oToFpIYG"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="RmhyG4kt" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100939; 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=/gDKN/lQVomGUAoZsZW6IwuYx+nvxNLfs4vpRCbgKAo=; b=oToFpIYGbP6T7Gl+GtHC9Vg9I5O1a/LBetiwe0UJGw3/2GJyVFLMLnUrOGYSOozrQokXR3 Wkhmj2cLt/pclIPgPNMpLGerI9x5CCyeu55lxheswo9aKUZWYatV0VJLzsnz3KATtSFLtd o9hCsvNkv7cVfLxtDgScr70cyomX7tIcjGCph7P1l2KUv2YqIavz93CkZkr/KKOvUFDW1m C26eg3NIPICrpmIJfWisKZQHmHdCoZkov8j1OrzJOu/4C7NCasCbPcTMLqnEerK81XnQiL GVWLrispITyfhlb14tAmFxnZPTaujuHQK/dQkV6QVYPfcCkqGeiofbVUjxy2ig== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100939; 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=/gDKN/lQVomGUAoZsZW6IwuYx+nvxNLfs4vpRCbgKAo=; b=RmhyG4kth9+v5gcMvHlgiXzpI+T/JVD/g5h2wPPSNk6HwzZZjzibP7PVwu3ccINg60PSzf hxpyjEDTSVQt6JAg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jon Mason Subject: [PATCH 19/44] ntb: ntb_pingpong: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:55 +0100 Message-Id: <57598af834c409f2f81ae162aa544ef503725374.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 2A96F1F4264 for ; Mon, 28 Oct 2024 07:35:41 +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=1730100943; cv=none; b=Q7B1r9aG54kcMnCoryUSe8BzxfNmhm0FuOKfo2hQmFyYx1tc1urZGkBFWS5U4GxpCovxK8O/+t7oAWkRYAK+frHPa8/9xEcYUVJf8IU4B99+1Ib6of1TCt2Gt7u2FeDqFoqXm9nH0RsvRk2toPH6+DWBWSsew7eWEigL20KbPpQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100943; c=relaxed/simple; bh=lEpQxL9xXuQFToIcVd6yy5VJRuxNaTDofAFptwuN6Zo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NJ/1GGa7tuHSylPerFP4NOs5Axwnmd6PiQ892mNTMrG+LqeOwE8mzU7kKQV3pURPuEc8KrzsGOfioWFl7S4pb7cyIuxgm21VDLQzULAeLqgocKj3iZN/SLD7OPvfnQjkJQ4URykAK87HV4wOvB0rrbLnB2sbU4XlRFHSwEl9Sjg= 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=WUz/V0ti; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=IZ4FYzFN; 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="WUz/V0ti"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="IZ4FYzFN" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100939; 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=Ab5B+FqZ3WhkZ6WaAXYb+YI7fVubcn8HVzkt7ibXae4=; b=WUz/V0tiYnaI0K58Zo/cv9WTcRPFZZ1GtFxqaVZMYoMsSqxtek0mHFdrEW4HE6ME3E61HA ncDqSy9DiY1th1FIo5QUKTcLber0N7qnXJKkZA1q0SqEdrLta+KVYkTcPDNu628w4s1vJ/ HqjAKgjSP2sf+2Pn87OfFG3RWQ5pFRcbwDWuTf4hSnBp8fwx/tZjxLXoFBbb0I3c5fsCRi rU+l3I5HoDpyOpK+ab283hjd9jnh2CILuANV5ka/6eyUe/5/L9jNQfVTO27rLeTvrG8h99 ooBXBwZ3vM3KX6vaubkGuEH+cQJt2B6f8Vaz+S2eVaHy/SalqjREENG0e9jaEQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100939; 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=Ab5B+FqZ3WhkZ6WaAXYb+YI7fVubcn8HVzkt7ibXae4=; b=IZ4FYzFNXzDXaaEYm6ftTDcL/AV2ys1Kz9wKcUNKgT01cUOAeY90kzx6WFVJa19nyPa7ms YjmbUMve1VLCamDA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jaehoon Chung Subject: [PATCH 20/44] mmc: dw_mmc: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:56 +0100 Message-Id: <36c90360480ab8c4c13f1034393f53e531ca5855.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 41e451235f63..3a15af97e4e1 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 Mon Nov 25 10:54:53 2024 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 8F0CC1F428A for ; Mon, 28 Oct 2024 07:35:41 +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=1730100944; cv=none; b=jO084vNEnGwGqLl3iflKju1/ylW6X5AdpvMYgYLYaTtvOdT3+3NEOZBDCHe9jr3IA8tVXhSOKk1gOhWyp80FyBLfE7e8q7wEUmsQ4/zeOTVpXsOW3qxJeAXJU64LikZwNySB6LMZnPuyTi2sdoU0tpTwswDD2Csee221uP6Gewg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100944; c=relaxed/simple; bh=dfhV6QTj4uKGmAcfXlfFgeGsNNdxnJT6m4fdmZvkJ9Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=R/vzfBwLCtVihV2h2pCGzzpIH6+UaIWFmFD1EyDKcp6HO229DFtUr38P5hvBxJalMCYBqIFoMMX896aP0hVNq0NM+eYExOGZ2E/1UqpPqUbrosgu9teH7g9DrSZ8MSl9g9RS29w1CftwwAnJBoAd1LRDw8sLznbnCSeFk+0TV5I= 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=HO4fKTp6; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=1DA/IYkr; 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="HO4fKTp6"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1DA/IYkr" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100940; 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=J7SqXAyAu95z0uwouEaFv/TdsfEFGlIdHdkVNRvQbQA=; b=HO4fKTp6HmSoShxSHRM24sSkLFnkfXFetdwbF48uqlkmaO/x6KgBELbQARo+gvb5i1G3n0 7EgGMNBX1VcWMTG0e4B0LwZYHbfmxvZpvLMujSBiUUp4/qdUIVq3dZfyEYuQzuBmgaCiu1 7InviRAdSPaOyoPVS9TguXBDeD02f7aZRkP6TapJCQmM9UVx1IfKoq8nrMi/OmXSBWSGkj AoxdtyZMLGQcJHKPYve8ZMlvr0IinnTKlvFu0lhdBJPmx6WevtE3onF5nDXFW8scisArDc vUbTcCKuI5rwO35M2I5HVhB4DhQfFUxD0pRpo1GexpSybJm6T69I8WObAhpKmA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100940; 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=J7SqXAyAu95z0uwouEaFv/TdsfEFGlIdHdkVNRvQbQA=; b=1DA/IYkrTVrNbRMSQ8L+zA+U0OP0guimX9FekS9rUlgs0uWKtp9e53H9CzKo2F7yqa9B39 WhzMdxSAWdwqieDw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Greg Kroah-Hartman Subject: [PATCH 21/44] misc: vcpu_stall_detector: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:57 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 41b8c2119e20..dea5f8290895 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 Mon Nov 25 10:54:53 2024 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 082AA1F5825 for ; Mon, 28 Oct 2024 07:35:42 +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=1730100946; cv=none; b=KTMTiEzWjBIhMMfIbDB99fpMCg64O5EAKTsE7wSnXExlCJgOnyjO6qOp35/Hpts3mnu0OPnGIW9jFVEuW24MTG64qmTTtum6HoR2r+8DnDdFd+2dg1b9//91SRlJgyhlLnKWx6QcUtocivVnlmIxw/Ty8W98ImA1gURpyNaoPaI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100946; c=relaxed/simple; bh=sIBpB1p22LXxCTNhLBfRMNcuVXI+HTt7YVobMpwcZtA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kCKZdHbT+cLJ1WA5TBy4/Za6vwEjc6ar1DupR1T7CrMsDTy1kfnhhHM0oHxuBWgyY2P0NXpWaJE0AO7B4P3YjEmozOXeXkKqLe7rE+PDUhduoVGH3UDTs+mrajdgP5as7ssRPZAeIUGjR+zKA+P3MVijFXaIkIRP6wWsGmAHxI0= 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=dmQOg8uj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=9fGD2tML; 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="dmQOg8uj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="9fGD2tML" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100940; 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=4AHiYiPcHPN4NENoHrApHqwIjUfPWMcojvq3BpSPvh0=; b=dmQOg8ujQcDbhqqKsSp/hryzktJfafLQ/o/r5SoJzMCFKJZPJMmdgO4kB9FK63VBHRSPVm CoQhMbO9uX3/X7nzxYbCtyWZaViFnry7/Kqm+NCvpim6opmjZk4LjF1N8aApdLDPE72bIz BdHIOBVno12DBojzVjDwCbbl8/lDuhYivV6PBgdiTOzz6+NsPPeTY4pYvF0q+4hoHUpOtx FNcBbok+Cp0Zlxbb7fRetQiEPB6Hr7v7H5y5MG76gJu3gvUTTTaK+bRW9VeNzTP9RxMYKj Y09xonR028ERO2Lu5uFVaJlKNftETs7rRwovRHjm1zLx3vBm0joZ/Eseq6v03A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100940; 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=4AHiYiPcHPN4NENoHrApHqwIjUfPWMcojvq3BpSPvh0=; b=9fGD2tMLYTT05ljSErBZfXPDB6lXyYTps8CySEjgjhjsAM50EB+LHuUEG4mdwspxfJNE4j GZqicrG7aQAYooDA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Hans Verkuil Subject: [PATCH 22/44] media: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:58 +0100 Message-Id: <2290f8a566605247d9842575dc3e6a630a1c1a72.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Hans Verkuil Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 330d5d5d86ab..fe1cf365a25c 100644 --- a/drivers/media/cec/core/cec-pin.c +++ b/drivers/media/cec/core/cec-pin.c @@ -1345,9 +1345,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 7273254ecb03..d7795d7f8a35 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu.c @@ -229,8 +229,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_create_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 Mon Nov 25 10:54:53 2024 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 74A681F756C for ; Mon, 28 Oct 2024 07:35:42 +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=1730100945; cv=none; b=FwO2zmJh6EF4INP424ZfqNPJq+/USuIm3JAo/C/wFsQMcnlwrNl04+Mc6inU6n8h9m/NRMQG+YjZG6STeHTjipWgVzt98nbtlFmjY+UFqkwvsoEZQbk2TsHirSRrzj1u7c9qzOrFPZOq/HLk5JVtPuuUDyPTppbmmEmM0niZJbk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100945; c=relaxed/simple; bh=knBeue0vxxbZMBDfG5hh41rBBao+jZIq3N/1K0eM/aY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tgTkaNFWJdXpMWpuHg2Mn+BndEoB/fw7lJPMtQFlQ/LFzxfXXcK/FuBPk/6nNUHGz+dk+WU78UsfQ8cSuTPuxYinOrX6AuWLVwySimcgWEYb77dpc2js7R+G7d8wqyaFyxhj4hQLO8bLu7Vq/TAygY/d2RO+wNuDFEIzYw6Kxqw= 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=JCaFB1ko; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=kW69CFbg; 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="JCaFB1ko"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="kW69CFbg" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100940; 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=RbgF2i9QvMxQBC8ft58I6SsiBpsx5sKDsa7ekiwBM3k=; b=JCaFB1kox795DpP4Sv+5dVuecVFLZ9h6nwj11L+L/Kf0E1GW7IMDhB21vfxpGYKbBSLm3O IkklTbDe1YibFfqZyyW32Xre+PWs0P8OW++loDjsQCviyrRS8DJqifsiNtifbjvX4cTdyF hlqZ4X8Vbx5JEEAl8zVDgxE0AP+GUiFzZRv7o5oxYSkzknWSic5MmrDwX26BJ/sEbxUALd lfa40Imo73jPTHCqa/kvicg/gSHCghigfv7GxKJAaSU6r+0iWKTHaXV9xBkn0cjTVXnwHJ flGs9fB+WauaZEZVCDJKHM5pqgoSlDAKhsXgyxZaUFg7LfYt8IEwx2cg6N5IIA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100940; 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=RbgF2i9QvMxQBC8ft58I6SsiBpsx5sKDsa7ekiwBM3k=; b=kW69CFbg5PWj+9FlGl4CRU2ZtdJ4UMR9Z4j80m30OyMlpUg+uapZZeTbEnwXGc+MnLrJZZ bkcqTOPOHyP10rDA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jassi Brar Subject: [PATCH 23/44] mailbox: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:59 +0100 Message-Id: <3fe81b988c439f1bf52be74368268dd113728a69.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 BAE271F7576 for ; Mon, 28 Oct 2024 07:35:42 +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=1730100945; cv=none; b=ajFkxn3WXlXRCWywJyp6x7AOEBr83Ao64d31R1FF4AGVdvpW/8huB3Z8LV3uyu4mmonkwGtxhJzTV6ncx3/RCEta1HgUHY+aCAjBhvo7Rx1hC/krL0S3iUYZuNU6v87S2a9G9rGuur83CjVtFJNVrEbQfg0HDNZ5+h3+2fLm/sk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100945; c=relaxed/simple; bh=oDeujpoBqZWZizA02W+hknPR2VCps+F+DQ9APeuhWvs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GWnyHmZx1fKQ74wPQVFAYwkqJqQVOTQVrRHU7tXTYq1E08BRagYRRD42/qSfXLheQsAJYVI51bgdAI2/FikipdjzYT/fpi8w704iCFH3lMs/e9TcVYaK2k03srMkRAeEh58pMozGjeUzgsM8qSxDK60OVNErd6PjouMjqxMD/AE= 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=WtW31ZX9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=1zInMeUx; 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="WtW31ZX9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1zInMeUx" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100941; 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=75QZv1QektY+iXyS9vVN8n9LCzJqE7Lsc4cQ8j41z4E=; b=WtW31ZX9VzBnBjqla2slWXAsaKpXT1RJ3LXiEtZ8anOYXQjPQzMfYqaD2AUV2pX0C/D6OE DqvxPH4dJe7tg7hRtvh292aSA6njAVLKrNdLy0/Ptje7g4Y+K7pgaGwp1/V0H8W2m/46Fk SGAjTCw9y2DnuCexafeBoB/dulU1QZ+KIkbGxhSC17VFg041r9SKZ7Q3mLTVAwNQgXMpW4 Npi+fN5PAURzDrcTg3U/2Mx6EceK/ncEuNaZrIqZPD1yRuGxc5WtXnalVMEcd2MVuuYeBW Csrc2m9FbWxby6i+TaieWV227F2jjsrHuW9SC1wla6XASoAUbdWt4MJN6iYXkw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100941; 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=75QZv1QektY+iXyS9vVN8n9LCzJqE7Lsc4cQ8j41z4E=; b=1zInMeUxCBLvFo4XC6I56e8euEGAnwZLSkRQ465mr9VDjbYF/qQSVE94H4QBNeYiG1DX/I saBI/ou6QMEDl/BQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Pavel Machek Subject: [PATCH 24/44] leds: trigger: pattern: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:00 +0100 Message-Id: <9e97d867e4a289cd3c7aa081302d439e656f138b.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 378581F9406 for ; Mon, 28 Oct 2024 07:35:43 +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=1730100945; cv=none; b=js0GfLmdllUvDZdEAxh1uUEhm83ijqRZjaW5jkhd4OODf7ZBtpbrXL7Fm5UtwyVytd0sQG23FxFGYi4Brj27FpY/YHLvbx5PHdZ8o/klQ5a8Lh8HHJy5DXpBqyLNUZpPKKhQfGQJpCqy5iuPC6YyiBrllo7cvvaF7saOKPIPFCw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100945; c=relaxed/simple; bh=/4Nuqcj3kTNRKFyUA6wT7QZz40iowVq9/OLs+YcyEGw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eF/7BVT8hXXsSsAxrh1XBl2Nax848aTQJXKG7JL2YsRPyCx17oHAi8g0PTU8u3Yhrn1nG0sm7RuzLgoBZBZN8pv4SwQ+ByS1IHEHoyP0+XYJ+KVRlTrh89SPGmxzzCSwPT14ga9P7gTrtqvHlsMeaR+VUJoPiDqrrUaSDGc9GjA= 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=c7HY9wTQ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yW99dwKJ; 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="c7HY9wTQ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yW99dwKJ" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100941; 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=9Ec7C/cA57wjWbNibU2/Vqg9GEPP3jYR70BfJS1OAeY=; b=c7HY9wTQ6rrb/VZaMOBjpjLBs4YUCSumOMF9Gjqxr6o6rhYEtRuB90KrV7nQwvACIeqmhp PpiFrILdgeaA0xmCjzKvim4tdCKCIh1+j8dRW8ifWZ+T1S5FiCbKMS8NIwu6Oli7BwOwzV C1W4iIjUbmoMnwMalsD4KuindBa7SrlmkPDFyZdRlw7lCxDZkkgqMLwnce7RaCW1mgAGq+ cHLlp1O8t9j31oN5b2lH93J9scufIrivJmPISXNZIFByBje8mtNfJdrdcTsAFIPgvzEGJe DVUQGhRSayS1dLM0atl28dkpyMLCX2qM+lsqUdUm5HKv32xS64p7M5PUrelh5g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100941; 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=9Ec7C/cA57wjWbNibU2/Vqg9GEPP3jYR70BfJS1OAeY=; b=yW99dwKJBuzX3GCj4h54VNcTImSFtvtMB3lR+bJbeKZqrduLgElYHtfYFhl9IHlAJA/FFp IcdDxHKuU0pkIBBQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Dmitry Torokhov Subject: [PATCH 25/44] Input: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35: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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 380fe8dab3b0..224cfd0062a1 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -592,9 +592,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; @@ -630,9 +629,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 Mon Nov 25 10:54:53 2024 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 83F7F1FA247 for ; Mon, 28 Oct 2024 07:35:43 +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=1730100946; cv=none; b=c3BcmCPdcoPsAYxhGkms/Z5dPcpoUoXTrOfOYmGs3mHFRK3YUGzjgqqW+nYkpTvbN/DGh6/3LyjyW4hBXJ4AcqUp4zOVm9OvOzces3e3IJAvWOkJ3RpPXbCZ8i11tH7aroeUf0GVkIh/rgQTJTXJT7wjLdQrAANtxmVNjM08JUo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100946; c=relaxed/simple; bh=EdgLF+69z/CGFE2jZ9Kv7yN+UmZ7c70icomEwXkRQ9A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iFkRDTMOo87QQHWbb30ke8wM3wTChEZwcaD3tkB0CuD7O2nofMl/8Zfpht4XLx920j9AYuUhO15yXdfuXL91zzQ72HB5RSiXDyoGDSzgx6jkTpHTvn8ZyjOhY8RnIu6Acz6IKhBR3q28f7Meq3XBMC+GyoifXTpf4ItAZ6bhYSI= 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=4zn/ctHU; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DvOWG/1g; 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="4zn/ctHU"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DvOWG/1g" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100942; 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=eoiFWKtoup9C86Z8bmgOdqqWAr4blrjshDetktRQrH0=; b=4zn/ctHUBX+NmqStWfbTRIpcWnILuHKxV/jLudT8xN4Ntq2HnrNOzUSBuv3Lsas6nKXN6a ojw+BdaL596bVfsCJhNzdPcymj57hNUwrvKM4V1mQJKfpfPkZg+1YjDM38C+xMyZDidxIk uWXcwlpThiAKJKQ4eGeDHuOsXfy/lP4QXl66f9OrZoRoMUQcqLoPXeiJIkys5a6U94zOl4 GS/ggHWDJKRbVeh4+TBbYEbpzCz84bxOY2e5e7BnrzZyigvlVQqlDmALyX4sL2eAETx4G9 qOdz5WRVIB2h4o97eWQ7xCY2ly99VLz4i55fQ7fqk9OAmclR/Y5V8/ytREb/eQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100942; 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=eoiFWKtoup9C86Z8bmgOdqqWAr4blrjshDetktRQrH0=; b=DvOWG/1gPLjGi4wshb6/4FKcMQZgQQzSmB90eGQSQm6hPNsoqGqtDqS5kl2i7ScuYNiOWo aEDSev89j5advPDg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jonathan Cameron Subject: [PATCH 26/44] iio: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:02 +0100 Message-Id: <516b30771b0d627d6b7461611cbf476aa1fa0e6c.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Jonathan Cameron Acked-by: Zack Rusin --- Cc: Jonathan Cameron --- 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 311d97001249..87c86d752293 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 Mon Nov 25 10:54:53 2024 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 4A7601D9592 for ; Mon, 28 Oct 2024 07:35:43 +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=1730100947; cv=none; b=jPUTm0rGwe6Y3oJ58+AeMs9m4Fx0Nolk8B8CCviBlZunf2bcxaseRI0IJXYp2zhg/yFIDqPVZztpgbDbMRaZBcdpFL0H+OW/PAVGSOMBWQM3KNpKeLwfdB+4N+EyhJz7ItZnR1JbpjpQJ3czCOb589EmSWS98BaCwFRQXEAZgBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100947; c=relaxed/simple; bh=uo0UBotNAOOrFI7BXUpj6mVFpoIhs6Iz9NQiYAbjsMY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=J1a4Ex8FNd9cfsqx1DV84w/FtWjLe1L/8vGQaicEGn66+F016Fc7v4JakhWyAy/SbpEQHy+evM3HJKhE/zmqVxJ/3iouTJhbh1NtEEG4MqmEwbqeEMxxWZb0bCHCflWGmgeN+bujjrRBxJ7KkbJ3LJ6Bs1xRkYik2/WwePAlmY0= 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=QDvG0fS/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=zN03OVNF; 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="QDvG0fS/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zN03OVNF" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100942; 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=bXo8Vnu1FJr88iLh2NTVp3EoV5Lz8sXeO0n/sEXre9E=; b=QDvG0fS/ywXuRSSpcdPrkBjk/CzZXC4F2VrV76z6Mqvd18HnXtfNVjzVYU73L3LTLTm+Eu Yo3gxw7YC35hvJziJR8gONiM38MV0k/Xe5oweIOGEFEQk//OG06lTBI+N7Q97w+A/Hwy+y Iuy1G9fN0opygRfZzJ1WuphNsWI1w/8GzosUTex9O81ZxfKAk2KN+3x4lWw0RMCclbrzyI U4su64cWvueY5WsXKpuLNr9Mh1asQQG8P7okP5TNNkLPJRBs6nI4Gc/UNJkyjO6w3gMCvr kw0yywtRWZhihN4EzWucs22X5/AbrGd96v16fr2/KuVMdkZq0EQSlEVpIHb+vw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100942; 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=bXo8Vnu1FJr88iLh2NTVp3EoV5Lz8sXeO0n/sEXre9E=; b=zN03OVNFugHZ4hmlVnnrpsG3i2yBln2HcR+god28USo+Epo5f7VtwOK3S+X7DwpMFBJbRc LBhc6UYMQW4ZfqDw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Andi Shyti Subject: [PATCH 27/44] i2c: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:03 +0100 Message-Id: <89bade198d679a579a929add8aed1f5431aa03c5.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 98539313cbc9..47f3ea4dc79d 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1417,8 +1417,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 Mon Nov 25 10:54:53 2024 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 A9C331FF5EE for ; Mon, 28 Oct 2024 07:35:44 +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=1730100947; cv=none; b=L46QI4kEOgBJk1Y01bOvaIWc9KgJ7tvFgbmUpH1idnuw7iCjs1gfH+Tq7eEKq4wJHJ3eWDWCabIkGAoK0Ga43CJhVXkhVgyIjKuoQ0Qqq6mJcZvMwa19IbRlA8ME5vAez5jIc4wBPPyz0bMwhCC0Dz41FUS2WQcsfF1VO3J/7XU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100947; c=relaxed/simple; bh=NK+oDY6MZkIBi20Thz8oDGFhAMJ0KNb+mrKMcXJWunI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=V3WLnXa62cW44bNAQic1urNu54qaHx9cxZ8y9nRUDtkb0OzWtIbDVXmXRr32fEw6WgsvgZYKNZGGdnG1ex7Ke07wLc7q3YQvbBxIo93tCnMX7+/RY0X1Tx3igiO+v1T3WVxbepSAAjo5tJS8TSX45krQQ4/YOlPbhACpNLbzT5A= 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=2BlLuMWs; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=pOXFDH9m; 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="2BlLuMWs"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pOXFDH9m" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100942; 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=12+NsosUTlLwSgzZpkxNdegUdpKN5EkTxqaOkWrT2+E=; b=2BlLuMWsXNf0vNQlh85Y2zTSjprmcMfYvUm4pMu03hj2yHGTOip80Gi3OXAokcE45R/Zka bRESMFQPCzw1OSbHF0yhLX4esIt2bU8wjsZ1Q078UtBvWMIn9fIKj/eyhOZz5iK8VRznmK rw63fqtgmLz1TID+y2ae9nq2zul1Np1SwpX+E/MXJD/su7nQt/zEne09mWg3mwErjbzcbz 6z/hib+Q6IVGfVOXBK6PI9sxynmweeHFuycgupJZJwKheAJmxADIYHfYNARxzDG8JdMCq5 U+Ks9npfPyo7/sIJMY0DIoefTyT47ZqtfJ+YoMW+Rz+EKeyioWBClwaJp0fV4A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100942; 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=12+NsosUTlLwSgzZpkxNdegUdpKN5EkTxqaOkWrT2+E=; b=pOXFDH9mgiRZHL8sGz1AaiS2YnOxqGAEyMxusodarJjhonuP7IV4UTxEkCs5vOWWqtwHjp 9ONIOUgFokwF5CAQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Alexander Shishkin Subject: [PATCH 28/44] stm class: heartbeat: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:04 +0100 Message-Id: <377d15868b1a4da1d524ab7989b78f2fa13a754c.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 54D891FF7DE for ; Mon, 28 Oct 2024 07:35:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100948; cv=none; b=Hb3MRez9lU6rXioW/SzkL/vBGd9mCzJXSC7NIZ7LIOHKOLVpEm4EYHUeijzaWKATRcpVOxCTOb7dusbjwjTJanwyD6DWZUBuZzsL9+4Cp1xR3V4N4bSOYFabXI2axTLMTTmPkPDZAR6VdnCpCK6z+cjlHG29rbNLg3A3Uh92ltU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100948; c=relaxed/simple; bh=Cq0ZzGu90SucZ8ajRc3od8UJWqbgFmp+Py2FeFdl0CY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VWQbGjLRpFffFZvDQLc8kxE4vSTwJjoMhTUKMB1QsC6a/fKiCjKpzMgeceWG/CK+o5MoNeHoh8pYsSQscoIMk/jtgCCq4ylm7AKIo6qnRDBYvHaXdC66Brzc6x8OakYSekGSzR8QU9t9q4NYBJLxV+LDY3hSlvn2G9NWozW8cvY= 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=Pzgx8mhv; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=musIYBWa; 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="Pzgx8mhv"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="musIYBWa" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100943; 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=iEI2R8CFsxxO8R3+8zaBmsgZn012uBT8pRI4pMPBjzQ=; b=Pzgx8mhv6ZUVyj2g9o0d1CJi1vrO1uiyG0Q9GYVQ/X4uQKtI8+nZpucLKMfhe2rvVZBCeh kIvFxJQvZFYcgsLCc9pVZx5uopznfymmnz0fIwwGnJnWZfwnVyrAn0Jl+KSjc6gF5wMCdy PabFHuh05prA6rnWfFWGIpGmUo0MA3uwo5nb9cuRA1X7qUVAPX9OcEO23BNoxNmCRT+XW+ aOYIH+h0O7m8Vlr8wWIr3wglrcy8nQoUIFgDrkDZDP6BKRwdnzEg7kDJclPJJQBFXyV2wY tms0uTH1srF00OoLIz10Hp/aaR9x1yBSZBYKpN3gh2QLqvX9v1PWqHHAoDEYvQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100943; 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=iEI2R8CFsxxO8R3+8zaBmsgZn012uBT8pRI4pMPBjzQ=; b=musIYBWarZ9xT5ao6lENWmIRFqCUCS8NovER9/6RsEwHj3mHK3VjE4FP0blHRD7/MxqUdH gHuXKlktcKb8AjAg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Alex Deucher Subject: [PATCH 29/44] drm/amdgpu: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:05 +0100 Message-Id: <3caf17b166eadf57ff9b10f49895519759ae8ed5.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- Cc: Alex Deucher --- 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 d4c2afafbb73..9f78dd176057 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 Mon Nov 25 10:54:53 2024 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 31BD51FF7C7 for ; Mon, 28 Oct 2024 07:35:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100947; cv=none; b=K1t6rV8+j0LZX88f3pt4B3zctcj6pq9SUW8ybwgpG7Za0sxd33LE+nUzF7TptRg3p9LqJ8CLxRCGjBsTJ3peoA/bb2Cq/POK4Ei01aXvI7fuznqYFUjVbqLmhJi10u1VwWQf+6wclqf2RFubru8hqaZslx9r1PQcGAHjgQzvNhE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100947; c=relaxed/simple; bh=PHW3uWUFg3kPDXSMJT3XFZrMVuxH+JEUmKjcZc6HOow=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VH3rMv7YARPdC28QY2oz0xCTY85GXEInepBM6xt7ldiw1gF90hkdzSj351p60ud/6tb1aQLgC9reCMGlU6PFU9+LD2jEuQf0Fv70VXT7+ZBnqrl+dGyXmi+q40x1qFFH6OxblhZe+XjGHHn25ukScM7BTMSRfus+l0xL10hM//E= 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=H6TVH1G3; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xxxT2y7m; 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="H6TVH1G3"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xxxT2y7m" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100943; 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=oQvlrZTQO/eppjto19VpVjTAhhmXdR6H5TyrBCfrBFQ=; b=H6TVH1G3unPhA6f/SalYvNMRqlq87vb4VsvHGMSaT3G+oxPqzzgV1VwE8lxzYNTDgNJhUC pPnVQkQVJyP+j1KaQ9c9Vku+e1QPTZgpzD+JT81/mV1Y101D3HDqV/v3BC1VheqV7D1rvs yTm8WSOnm8sKxbh8lRis1tsinyWC8++1LSEGjFn2zYHMAiiw5t8f7LhprKd3GmfiOw/Jgh cT4ap1uyCR6PJWxThCFFywBXqhUWPcgc2R1GB+mm5riJ4Fbk/5Zor9p4WedNObLQyFDk3y ydF/pnrVEAv2xp0Bbcyux+XtDzYwzMHRelvtyrlx2x/iTHDKsriqY6306W7qSw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100943; 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=oQvlrZTQO/eppjto19VpVjTAhhmXdR6H5TyrBCfrBFQ=; b=xxxT2y7m4brZMjIE/83kH8bN1BePRUBsFOXvhF7FfrAEhUGGjJGzisIh0g//8GfeceUFt8 FLL2R5rZ5bWwmZCw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jani Nikula Subject: [PATCH 30/44] drm/i915/huc: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:06 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- Cc: Jani Nikula --- 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 2d9152eb7282..1c1582aef8b9 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 Mon Nov 25 10:54:53 2024 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 C57E61D959E for ; Mon, 28 Oct 2024 07:35:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100948; cv=none; b=DNY+BSgFBdD4zdZt4DyOEqle8vHoSRr60iR62AnnmRvWst62nhyjQSPKJnSiL2DtgZQmaPBlfDJ0uLULsNehOPh9Ia7QdlqxaJ6zPWNVSomRMe6oE4aR90tB1rMk77PziKUJK7NGLPdjNtW8M4SR4qIFsS21WGH2PdwBX3FQ54E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100948; c=relaxed/simple; bh=PAgFHu0Asgi4dB6XXNFVWXBQkZak9/WYPuGFM5/xz6k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=vEtHF1qqjq9bimLGxFc6PyY9tFDbnr30KGgO+QjCyN9oJDBGC9M1KxPr0ch/XlykMD49iR5im/gHkYWxm6ZYDUSgJqvXC8tHrQ6+VZVawST8FD1Ts8DC72xS6Hth6g/IHdCoe1QmS16QV5tj4N8kpaq9WgdtPw2SSn9cK8+3d3Q= 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=kKlA4hCW; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=2XRLCu06; 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="kKlA4hCW"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2XRLCu06" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100944; 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=3yfx4w0eTC0A4FJ0ettAAD2eMSeGPaC/JFUMPU2GvCA=; b=kKlA4hCWY4n04CZUrP0qavj3M85fqvpUyVjkxm4dwc+biD8ay2ItRhXUNBOG4z1kj+zWug s+HNrs6WQ0E20f7jY460VWlAJop65+od1DHxnI4K4drXBibS008xLiXJJXZUEGPK1L5Djx pOZ+usGVTQzkAp+3+uqGXuTXSBc1fUPcrnHZoil87G/+1csivqwa5YuT69fG1R2gMPehij TDWi+weYfr0bzGK8RZtIe8HowiWXcHVvv9LZ7OAAiJC9PsvSwpiiiRUe08o/dwoqGlYbzw mgpZZxpm/IENKx8tNF6JyOPjyse2zmEt3WAjV3OoNECJG1mqRiYqLA54Mmi/7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100944; 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=3yfx4w0eTC0A4FJ0ettAAD2eMSeGPaC/JFUMPU2GvCA=; b=2XRLCu06QnDW2ewnovqTDrfEfrQm4gsiGp0gpMxn2OVqZkhfG5Tpxgp0yQpLL5YhomZoh3 A4+UhVENfh/vAhAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jani Nikula Subject: [PATCH 31/44] drm/i915/gvt: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:07 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- Cc: Jani Nikula --- 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 c66d6d3177c8..0e80251d2666 100644 --- a/drivers/gpu/drm/i915/gvt/display.c +++ b/drivers/gpu/drm/i915/gvt/display.c @@ -575,8 +575,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 Mon Nov 25 10:54:53 2024 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 72AAD200C8F for ; Mon, 28 Oct 2024 07:35:46 +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=1730100949; cv=none; b=QHhQf2PPib2qKVyhyEnJDYZCm9kAPegscUN93kfioBb1pTmLjxPCCLvDOIlatPhR4tab44qNNkSKXtZ5jqgOCvz8i9UOUCM7049fDnGDRHi9CDspChEV45+FDFSP1wxXoRmx54fb04rY+wzOVVX42TiBrhnguV0b/4Jg9LMZ8VQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100949; c=relaxed/simple; bh=nEONyEsUSCrrS0hsgsyrJ2ySafG5OgnOcI8JTHw7cKU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uBQfFrEvQyuEaWI9vxzPAjvsBiK0wQwz7lfEqe0g+DQuwKl00F8mItnL81qpE6yWK6x83BUpd+sR3R3hf4XzyU58LW7Rq1D1p2pH4VLMTV+/ksTMCReDaTZFqn4au112tXralw9GUTqwmbCt/CHPrjSlZumlE94GGysYH9dzmFQ= 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=4Qw3/rFe; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Y4og0OaC; 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="4Qw3/rFe"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Y4og0OaC" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100944; 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=hbNTGlA+VNHMHDaobMkh+EYsbe82kvdxQksahuPMkMs=; b=4Qw3/rFeyoZR3AiiBmp05TPuxIJCWl1zKk6nP2aUwCGRguC0XZ2wG9zFQT+MSB3bWm08HA k5My+aeS84R+TRwLW/PKHLYCk3FcQmx7LkHgDs5xj9U0iXkgXgnZr/bKSQwOHzoMBH2Jjx ZlHGSelyBNNJYJ0KKJTrRLdJgiBGPz9+xn1b9XDNomh73qtAInVzSIC6+nn8l9HBISzhBq tKMzwJS5tksaVeANuOX0m7+TY7WrBIPdKai9sXBSA5/A9C+nhXSrC5L0y/2YqlQpxsSwG7 FrK1NQxeXziijjoSWipod5YfTc8ncxnyNW5ni0rNLRCMmRFtxiTklK7qBT/oQw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100944; 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=hbNTGlA+VNHMHDaobMkh+EYsbe82kvdxQksahuPMkMs=; b=Y4og0OaCBnUVUwaii38xxHQxp3PeeIaq4St8yRY/Ln7bPF26mpIDAXNx/9CJQM7V8Wt4oN NvuWtbN0lHBBOGBA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jani Nikula Subject: [PATCH 32/44] drm/i915/perf: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:08 +0100 Message-Id: <4b53da59b57bd6beacc5ab6e3cb069eec380391f.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- Cc: Jani Nikula --- 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 2406cda75b7b..e82a47ceed68 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 Mon Nov 25 10:54:53 2024 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 05A9C1FCF55 for ; Mon, 28 Oct 2024 07:35:46 +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=1730100949; cv=none; b=I+RDnGDIJIoC43OZl2Fh+QFwj8QGpUQp/FhcsDzzd8vkHlsWGXE3s4m6z8wLEQuqUvsETlAsY/hQIghSUcyqzAm+rl/r4z7h+CeuvyT/I8ya+L8trqnQ+QfzA1iF19gYH5Z+Zj1S2U2iMoi41Q+bkv0wU9Q1lYAC/fbwwys/LjA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100949; c=relaxed/simple; bh=AWSVZQgoP9kXrcbFkBzuEvgcEPi19n6xXY+bsGa07ko=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qdeInhTIRLkoKT8gw2JpFBEcQjtGKfEo+2ycg/upxeTuiRj32OpxOY9NYihNl0vlgohAYLxQRMeBU02s2OJmpycUzn1Vow8Wl+X9SeoaNkx4oh2v83F5mB/y+cFTE+Kfx/4NCjKnHSPGj7pFGomv/pu6rp7pJHYQ2V7NGW6aoWI= 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=KDybhfYW; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=COKvd61i; 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="KDybhfYW"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="COKvd61i" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100945; 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=C4TIKGEqD8IhbwKVaKp0wp1yEQXuyYuEtg9Rh1iAhiY=; b=KDybhfYWFKzyoKS4XKrRCwwZyqU1m1ORvHB8Yi+PUD5aOTxGDhppMfqdFeD6N9Y1a6cIwh ULj5hPj6GGzzzGCokBoMBt6dHZqJ+ZgY7HGO4RflVuxXI8s5qIfA8zxNbC8pr86WepJViz w8Jnlr8E5yozq+wUPJn22Awwe+KHubwP67aS2cptSdCa6Shz+RgnABWZLVCK0UVCANrxjW zFT4/imkZ6w5YxHSgtqCJBfHAFggsjmOH5ncc+3s8aGgBJCcjH88BPdJxiNLvhdNbufcPR RVBcCf8WjTqRrKjJ0sCMT0z2QpVfRpU6nnK/oBGEeSjjnFcwyYi4AaDPiH9LGw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100945; 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=C4TIKGEqD8IhbwKVaKp0wp1yEQXuyYuEtg9Rh1iAhiY=; b=COKvd61iF9L7Jqv6ZyiLW1GPXwCXRGwQrdzuXxGNUNhv1kNmvXZF+W/KIHucqPyXjf6JGl CO9k1Q6X9FQojRAg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jani Nikula Subject: [PATCH 33/44] drm/i915/pmu: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:09 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- Cc: Jani Nikula --- 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 21eb0c5b320d..5f5210a8f58b 100644 --- a/drivers/gpu/drm/i915/i915_pmu.c +++ b/drivers/gpu/drm/i915/i915_pmu.c @@ -1261,8 +1261,7 @@ void i915_pmu_register(struct drm_i915_private *i915) } =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 Mon Nov 25 10:54:53 2024 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 A826020103B for ; Mon, 28 Oct 2024 07:35:47 +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=1730100950; cv=none; b=hRrDGZPaM0dDHMw2CvOqq0bIxJHE5HeansY6pHVgH2yT2+7ECj0WEpfUpVktpaleukzPPSd0EzTwXYmvbZT6bUjTMOwtfxZ4HewBpAijktGDMRpH2BKlsfJ8bN3gV7rixpNQx4pIudoThbICS4M9gvlIacP9PVTy7sUwzdncmY0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100950; c=relaxed/simple; bh=v0RPT0OMep2K6Mo6s2uR2d1ekab+Ly2Ar/Ea5HBqeiw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BM2xgawR+Oxqqw/5Ed7F0JLPPWGpJw7M6spqNeK0d3g8Ae7DuB4FxHxlwtbWOlcp9UXkbY9bjBID1SEK+q20GqpUYMcFlHwqpG/OmICS3/G8Jk6do1r/+pHUzEV/OFXswPMPlDwIY1FKqwttq1P2a5ax+YijTaDMjGKmUmi+oZg= 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=Hzxhe8ij; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=32lwbkQz; 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="Hzxhe8ij"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="32lwbkQz" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100945; 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=rWHQDyubjZWA+hi6pNCvcOiea7GiWMjj2xs2Oakz3bo=; b=Hzxhe8ij4ZEGz0obSse4rDgIPWvEBRr4cajuIhko29oTpbm5/4F1e5AIBhvIAwgRf7DUBd rwejuP7qFjYF4t0u2nJ3LfDKE+KnG0WnqvGeI97J187WdBcgdESBGEyunlPqV8e14CEcFq e9x9ww/n3BhY+LKLNocpOa4oyjJU14N5HKV3xn0WGI/G/6RaWwGh8nmmGLxalMjsMiSPWk AAExKd3puteWk0Ib5Sei5Ishq7JhbIjbQM7PE8WfGQWOb/D2stdAOm7raDKVjgfdL/Ibdp EeaSleID8Q7BOM//X6IXC+VL1aQsapDA3o+2L+jQo2pmfq271Fs10IS2VSGMNg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100945; 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=rWHQDyubjZWA+hi6pNCvcOiea7GiWMjj2xs2Oakz3bo=; b=32lwbkQzr9NCNuObcApg1ny8tWmex7Zl4RX+dDU5FIpP92hQBpQwicRzLzDer+2ycbnLqh WZ1C7HFh6u5N/CDQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jani Nikula Subject: [PATCH 34/44] drm/i915/uncore: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:10 +0100 Message-Id: <4e2d3f9085781c67f94002cb91694c0f813614f9.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- Cc: Jani Nikula --- 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 6aa179a3e92a..f68e76c5c883 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -2098,8 +2098,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 Mon Nov 25 10:54:53 2024 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 DC0932010E3 for ; Mon, 28 Oct 2024 07:35:47 +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=1730100950; cv=none; b=dNLAAfim96StC3A//unTgpeu7sYQ5zl1UfuysYZY/fZADQ1v9NcuMH+1Jd9IgNIHd/oOckETVzMdAmsZA/V2FUxGFwMAljvr7tnv7rlEX2UePlgrWmbcnhOXjeezEUCz4QSTinPun9mR5dN9rUYk2jm1TI0dCpXBWjajD/DiXzw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100950; c=relaxed/simple; bh=vWG2uHH01sJ9W2jiPIkagHVlUuZh6PLgpKQ8r9ArHz0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aUXvTqbNN4jePzeoq0AlPMtaC8bCml8L/XIpMjufXe+usoPir1LvsXjw1GvV5qOkOP59t/xn8Z6oz9RhQaNkwk2DH8VJ6nIQ9k1TV33nXopzVR9ErT81E3CUfqMGMNDmxTXO87lKJB5Xiy9GVOnAciOnbklr6Z1dtcb4FrPO9I8= 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=dKE1tGt8; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=fQ2K/j3k; 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="dKE1tGt8"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="fQ2K/j3k" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100946; 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=Bf/hLOIb0vZTjqh1LvbKYEJqnLzJOGg6pXdqyiM/rK8=; b=dKE1tGt8myM/uLYGLdeOSW3a/Lnn6oWxiMq2I31w1NdQ4MHiH0qw9XoI4AUdj3hLpOiWN4 wcNzsxS+YwGNq82jVwkjC6rr2OHAQE2/u8uCO0Bn5dMMhttJIApBsRr2U0+PKL2i4r3Qwp jrUmY36WuhgwMBvXngALZnLZZT5KILAn5yXkqrZcC1IuHfFHdST2vSyhyM6o+rHDcJaHp+ +Ivskg88txPGJcr2d6ut2kM7DmpI+XClDweuiBXNno0itqEX/IBWCa/TefWdqDhLSq4Wd9 oL7ALf9kn93ZaN5/F+ZhyVVTbGEXYGy9wT/5mM7QYY1b2HNu/faE4T3+/hdvhQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100946; 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=Bf/hLOIb0vZTjqh1LvbKYEJqnLzJOGg6pXdqyiM/rK8=; b=fQ2K/j3kAJvoiSPwtrqyOVT41SKsp3UGpdA4GTEkrMdNbXlQeMBHeF8Q9br6tLqbR7Mx1l v08+Nw20sCEEbtCA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jani Nikula Subject: [PATCH 35/44] drm/i915/request: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35: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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- Cc: Jani Nikula --- 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 Mon Nov 25 10:54:53 2024 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 6B21320125B for ; Mon, 28 Oct 2024 07:35:48 +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=1730100951; cv=none; b=VYgi64q1oLacJY0eXNxppsLto8sTJoEt3P5PNntR11NRcPxCoKrk+0X1uUKxk86V9HGaQ5BprzM4ScSQYdTRc3g0PFgg5m1004Xw9wJnjZ5fABJ2TWdh7u8AMSXT0z6aB1KuMEJb9JrnjoMgGR/2j5p6VHZgJm2jSsbnEpY5uZ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100951; c=relaxed/simple; bh=ziGJB9RfdWeVAvhVRtaw6OVZJOe2lPhiDj35hkfOaFU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NKMZ0TecXBopRrrZoE0LeOltbAO4Ebf/7jbx4V2tgo4TrDrXVP3iQ9O8OuceScf143f6TKnBs+Im96xxFZKe/tLWF4ottZ8O634tL/2PXd0Nsn5VGExC6PRUm1aCUbdyETkPWJrOmaRgUvybJDFnnnJtc5xArgh7esoEHYmOU6E= 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=AECKOGxO; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=2WLYZgs/; 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="AECKOGxO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2WLYZgs/" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100946; 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=QEaa61gEWvaXPE5nExFqV/bQDWHuntReKn5oI83gkQo=; b=AECKOGxOS8ACO1ZOa5QOyusWJFLZqfGkZRKIbB8i960Sbk7ezvgNPBb0aG1s3tzizLQ/VI jgta6bjOTzsETj85ybgdaWyBuzAeQcDqlo57leBeGRR4EUO+cPplFpa7TFHYdbtPPbLuLC Mwdsaco+RlsSMqCzGPsMyI/xTcjBad/TIEGOINz4qU6Sdj6ykl6udWEmfRZ6p04rpJZWTS rZXy3hWnNereOrVzGBeWyM3cdvgZf1jecrg4I0BRAEsYlkMBYEPRiIPIlHUJBTboCqcseW BEk7qbe/Nkn4mpjt7VwCLMl/3qI0XFikKQIQj7l60yRZJzr+P+YeGRwVhp/TzA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100946; 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=QEaa61gEWvaXPE5nExFqV/bQDWHuntReKn5oI83gkQo=; b=2WLYZgs/2YTVJp+ubDi+Az+EcaobMHdn1NjH/jLk+/ZRs70qvN4GsnoDW1VSEWCJ+2xZhO +non0N1cM0rxYACA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Rob Clark Subject: [PATCH 36/44] drm/msm: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35: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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 AD6892003BC for ; Mon, 28 Oct 2024 07:35:48 +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=1730100951; cv=none; b=TuxN4u65XyxOcqoH2hH10IReNw4aLjJMOFEigNAegLS/2g6mwA742/SYbCJBnxAxI0O3U/ZM+f+0TvNy8o49RUJ5/pmyOb7jh83pIn+iEXd70vYWrR3/GsZcz4nlWgRx8U6gPwHokzz8FuBJCld1UKv3BhxfE89x0+el68u2Mm0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100951; c=relaxed/simple; bh=2L87yKzfKyMKw8+5UaRKGSrkTGRbqUeV2f3PF5rM1dI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=R3PpSZHorhwixUUUJrxOxodNN8ipgsGJ0dxySjLWdKJAI6vKQXXQ6uLV/qq+8PYzaG4A6JHqAAEsxdTpPSJlx3MegyF0U4Bc1Redvy69F7O9158choYyEXcWxOxnV9whl6Itkn0IFP4k43itj8ZpuyYR6zw4cOHjbpEHQc9KBCs= 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=F7BcJlR/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=5M2dejIY; 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="F7BcJlR/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="5M2dejIY" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100947; 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=O8d3OfLdkqv8+1iS6fWrwba52dBXcVxfzWfwjSPUgLM=; b=F7BcJlR/YFBJZySNfCdHTBNyzaY1Ihn0dzWCHiJ8L0kOYxtGiCwycR+pfoZEcCEGRrZYRW uC2/0q4Lr2PkwmrUz0DD3fTbo3vND+Cx9R8hExQIt5FpZzGV69OdzOHOxSfvNJuFqYjiOy lS9BD0Akr4/3PRPbJvwp1rK78CGXqtTzPERoqLi+z0S3/hRdb920kj9j58oBtg9FKEifXj BS/hlfPIhsVfkvZu5ipG3lQol6rBCFncSht1Dl5boRun21aGOUbPutsK9a82QDRqsoQy2P d8JjyrUebh1SJGYYUEFk4SLkTTaGJIFxFvEUhkrEqxj29t2gPoC+1fuIE/nXeg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100947; 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=O8d3OfLdkqv8+1iS6fWrwba52dBXcVxfzWfwjSPUgLM=; b=5M2dejIYOhYwSPfK7A9gX3V918id0aTv1hPOnHhhymcguY3f/H7QKG75ORzHm0GN8Mc4us MQT/eyGahn4KkkDA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Rodrigo Siqueira Subject: [PATCH 37/44] drm/vkms: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:13 +0100 Message-Id: <64f5441d590902cf1c897bf336d1d3e3fb5ac567.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 40b4d084e3ce..5fb597bfdcaf 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -66,8 +66,8 @@ static int vkms_enable_vblank(struct drm_crtc *crtc) =20 drm_calc_timestamping_constants(crtc, &crtc->mode); =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 Mon Nov 25 10:54:53 2024 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 ED29020127A for ; Mon, 28 Oct 2024 07:35:48 +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=1730100951; cv=none; b=LzqBjmBX8Z/VwGqqOWxHI/M+znoB901fmt1RlhzB/OjvhdUWsV16RFpV4xtVnra0gQEQ9HNeiBOnKBtJZzv5BKKlGMGNrQU7XIYMKPn5fR8DRm2MqmJ5/fJT5sbjjCauVkUou3xnpdAic6dpFKbCcKK/06PVKsa8uRZptg87KkA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100951; c=relaxed/simple; bh=vPGZvGlbPtskt2lK/AjYDSxjaGWBno2DNvg/vnO+qUs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=h4LiS4bLqmVVqK41eQlJPdfQbpTG2WzkOyndJep6iC031eSrxqqwa0QUlif7YsdHIpWz9Rloh+TfNwxPEvpmhx9YLtw5lofSBXkPEZo2iTuh9hn6dshlsIsoYaK9glJpgK1gCbg3bLPSdbAzjOTbE6jzndID8MJL4CHp2bwvFew= 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=MxDe5a4W; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=9dKlZs5h; 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="MxDe5a4W"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="9dKlZs5h" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100947; 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=VS1859LQxqyTAz1K0RecplOSM81fFsQLMRyLdDYxYys=; b=MxDe5a4WYlp83mDeR7avYEQosuTgknKXUT8q5leKuaD3VtFZIaoTYIS4T9ens9bVyVrj3g P7bk7Tbjm/I70dH6Le5e77CdmncuSuprbJkWFAsct6KWIjCAqa7vv+U38UkqGt7yojpX7r XlncpXre0yoDv2ioZea0Z+zbQhdnuZtSbFrcstvshUj6y09TNkTmzbCFQU984vGXwxO+nW hfpbJncdzJQGRUQhx1O7ccI+DibKID8MTJqfy7miBrPMDwRaVNCuxWy0Gw4tvQmHTlPd6B fcDBu37OTXUAHm8Zo5rIvRUTWkcIkYLDTIYWD43lko4UEs16OQBk40CSvrhLng== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100947; 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=VS1859LQxqyTAz1K0RecplOSM81fFsQLMRyLdDYxYys=; b=9dKlZs5h6QT9drx29CAofTWFMeFfjpoGITnrWeaI1BP30pO0KM/lRHVDvR0/wQ64yx84ob 4Wfut1xs3wqcxXAA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Lucas De Marchi Subject: [PATCH 38/44] drm/xe/oa: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:14 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Lucas De Marchi Acked-by: Zack Rusin --- Cc: Lucas De Marchi --- 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 eae38a49ee8e..600eaaee8a72 100644 --- a/drivers/gpu/drm/xe/xe_oa.c +++ b/drivers/gpu/drm/xe/xe_oa.c @@ -1437,8 +1437,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 Mon Nov 25 10:54:53 2024 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 417E12022D0 for ; Mon, 28 Oct 2024 07:35:49 +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=1730100952; cv=none; b=hSyd7b7m1E3fyYekn4dONVfRc3aNc9VfoHtLmr11O4p/oWUm2l6SUC47aof72bJmcWkfu/8dtDmAiLX4xFXp2E3Pbp6jHS9d1jeR4U9GbSBGAwvqZvdXsZuT4Hye7r0NkTH6H9E5TjGDVw1dDr/H22aeh+Bo7+oBNKsx3b/LKAM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100952; c=relaxed/simple; bh=7iC6RRwCdYvoSDxFq+nQQAXmQ+GO0wLJI95huJvUd1o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Pv3lEd6Lb/NGlg0W/lnedbTsskc1U13liO2WT3YnYox5EWzKsMlgcafupWGXHlZPBgPIwx2LshSZ4TQHRDN66Ux8X/0pz0RXotRu/uUltR/G0XgiRXuYQnw0STMYxEgdx37s8fQGHjAKDSJKSElg9ytwMhRq/n3OlydTCfUgkt4= 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=oqszeuMK; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=2hCEve9H; 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="oqszeuMK"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2hCEve9H" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100947; 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=0m/zDMXphPDUZpg9M7CeUXorU39VZMKmmy3e7t0Ov7Q=; b=oqszeuMKBYsdoHNxzDX9Av8s0OUKO1yY5zRXtJVPaiJQzyxlE/61Sx0q0ielkd3drxvEMg W5Dt7q4tOeUQUreHD8qTuDEAjDzkEYkXkysLP39PdnDVxQ/b0ecgZdH4KZU3AjS0m9/USs nagz4oWvaEk5rB4wPaZs6bgv6ShYp9qna3QZG92bqP/7c7rlqVcp6Q5QTWz11dXNfQIXWT TVdnahu8pC8xwaKXcxHyKgqpayo6aAsl4KytFE0Pm1TBTKgFCohWft5TWbMNpMhCHT96LV 4I3Kc2UGCs6E/mlHw2jR/oyq0qO1Z+qct0PjLqpX1ncP4b2Px13PYBaL1Bwk8w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100947; 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=0m/zDMXphPDUZpg9M7CeUXorU39VZMKmmy3e7t0Ov7Q=; b=2hCEve9HvhsTnsDp/dww051IDuUdJsi3tKhn5NhrySUWx7TZ1+lVLmA4dvQCRYV8tegniS OG2yZonJ2fmhOwDA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Zack Rusin Subject: [PATCH 39/44] drm/vmwgfx: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:15 +0100 Message-Id: <318d94dc21f04ba85a29031a8973a4a3b76f3cf2.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- Cc: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 EA357202626 for ; Mon, 28 Oct 2024 07:35:49 +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=1730100952; cv=none; b=oBzqSdjqLWJU2qSxs5aFlvGaDJRtN9p8uEETXty4Wm6Y457dsHFy2pjnZxFjQ6gWWmPECNKoV4Dwi0d7+qzeVyLTxRKh3pybji8g7onkBijK99rsczbmnnshST8yG60rqkhzdUkjOzq3tvuwIRGvgPCjNevj2G7KNdxNsw6zEtw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100952; c=relaxed/simple; bh=iGuubNd75L4gJtaY4+cT6xHSUMdLacBg8Z6kJiSkeXY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RmfZu2qDCI2gsjn8s9uNRpXafVRGelsKao9i5kBsU8DftWmV01iFBaAqGoppLRC/bA71NOrCwvWFAkW8ZHB1RjfPtKU+RccWN7f0r3x/2JyYQPndBBWdIhyeJeC5u8Ze0Urg1kveXq4Z7QXtDl9DjYjhhsF5+HG0ESHwxQG1q+0= 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=lVNGM9EO; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=dyjJPUnN; 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="lVNGM9EO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dyjJPUnN" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100948; 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=2yA05yfHMXuaBAIIxgU6jPpHHlnYMJ0AqN6uP9A4P8k=; b=lVNGM9EOQSam/Z5KkgX6o7dS2kKF4npic9k9PvN1KDoGqZrMPKVgDoV5Gt+dy2vDMLA1UM KhTtHzJOk7xGwK7FuSFz1/p1JRzIdZr1/iQJrXVSh5ARK+fkOd2lGYmW3217vr3nsV71se 4YLKB5gt0lwRIcreRoKCJS4pX6QbdiogbeAjZvlRMSsNZrTXxyueG9RUDTcoBkXFrexsLG EXh6UWHDfHy5PYVK/cR0IN8KcWv4WnqdhoGcm7OC530AubkQXZn5RACUgh8HtEi6bSI4KZ ZivYGfqkONlsKJ3KiFYZFZ4Cpk3XzCsL9WhhQdWobcw6SUsTP3+poln5IG+SWQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100948; 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=2yA05yfHMXuaBAIIxgU6jPpHHlnYMJ0AqN6uP9A4P8k=; b=dyjJPUnNBbMsuvDiXYLrRg+pt1svwus5KseYsExnbuqSLknmUgGito5uItni34Nq0Bk2m6 BzXFbXUhaqCzn4Aw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , "Michael S. Tsirkin" Subject: [PATCH 40/44] virtio: mem: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:16 +0100 Message-Id: <2df859f20f7922bdb99a7368effb558bad372629.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 b0b871441578..a74ff1418282 100644 --- a/drivers/virtio/virtio_mem.c +++ b/drivers/virtio/virtio_mem.c @@ -2855,8 +2855,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 Mon Nov 25 10:54:53 2024 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 6C17D202646 for ; Mon, 28 Oct 2024 07:35:50 +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=1730100953; cv=none; b=V68YRgVMVfJigYtM76fxEUgrLZOre+NW7wpCST6qFcq3wDT7WqPZkm6hqU4bew6MC4ml+wB34C2xjZaJamrqB1q1kRxCueJMFTiQgtUDxxrDlhaX3beb+oThOhA4E34L+OmMmkvySGhQZtyNR4esk9cfC/x/j4l6R/H9gXNowXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100953; c=relaxed/simple; bh=s86+jwvVGQkywluQ+jtGbWhLIvyPeVuJVFuJfE9PoQQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=N/5ja67NFOLgT/UwKImfDdfyEz6odl6knE9smpADECxrnmUdhfx8hZsZKrCVc0TZ3lfC1Mfhk8OD7jCBVlUm3arsqA0eQvs8PqGd6hyRgHV8NbpcBcwGq+DSBmTkhprtzO54vgoxqqSZMXLC2wbt/F0sm7v2AzbRt/48xJH95rg= 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=ZOoBsKHO; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=UL8Uq496; 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="ZOoBsKHO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="UL8Uq496" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100948; 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=1ZgMzIqO4ieBnomo8nG9x2WYQXCUfDw+hlHKe86zbQQ=; b=ZOoBsKHO38xnH5rS/KG4zuinD+qWH5vOuDco9RhmUKkgIZymyC3gipbbnwiX94q7gbC7lv CvkVXVVGHgVqyivc8YIZEmt5qL3Taq+llUKF3ZMKu5/ME9DIFnM/gkyJD0YqrlWj+Jy82D /dkhOReQ+U9lVhNABc+GzMEgeQtN3euTlNlDDUmL/DDeiNEFXqDAgUCLTduFwrDK/P5Gz5 02jUcIZirjRGk5DJqHSqotnG/0pJfnYxChih7XKA+1eWByE+O9/t9qauYHaXgoGFTYje52 NauGdXbCliJH4rRgMYUy0hL+PiNbN+vZAZV8BDUlWFv00hL75eZ3r39y8YrPYw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100948; 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=1ZgMzIqO4ieBnomo8nG9x2WYQXCUfDw+hlHKe86zbQQ=; b=UL8Uq496JL7txN8CK+FvY170EpMoa4AgTgdzx/pEB3HS+Or62ksp8BfZ096C180iamkqRV 9BYK/tBhz0k9tjBQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jason Gunthorpe Subject: [PATCH 41/44] RDMA: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35: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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 DA9BF20265F for ; Mon, 28 Oct 2024 07:35:50 +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=1730100953; cv=none; b=QSm2GgrupRbpUjgVD9/5b3L2KWXL5nYDDzyY+T459dK6cIxMDdI64Yc1utB8l7G8l5C3nSHth1/30peskFAWpMoAs1TLc49xX5km1honQ671CGA2d2c0SK0u0TYu5M/4qDJOHOse3141W6JpWqszTkuFEAKH4hlWTmg3fr5dLxw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100953; c=relaxed/simple; bh=hoyqZIZCv5MJ7Kj0VkxJqB9LMUHDHxf67C5AktmKBRw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=UQJviinN5jpsHfbwNBCDCZDQdXa06acaKd/Nvdm2ashDm3yfPMkM3/oErMB2SR0gIRxexXX9+ASNOitJhOJVcH0L01r6hkNdiCPQHqI7+cZRm0vRGAtZG1atpwUDcY6xIEUTDYR3BBKW520OwUQVZIgGF9rjMCVLhXJLaZJhGNA= 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=XIqkwEHi; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rcpBA6L+; 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="XIqkwEHi"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rcpBA6L+" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100949; 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=x01u9Fk/s1XQy+TFU41e2Vj5FMlNRRmu2G+U5PHZCso=; b=XIqkwEHiEZZS/qpHeHInLKTuIFASwpf/5Q/t9dyaIFmepBnhIM9WrBaqoG7lPOvEXmpIO2 AFzQC6+2werpJKaB2HroZqfyOKzKiH8HHb6MtgeEbVJJHZQnXxgV+8p5IFK5/0ud1cZpaB sfqnZws8jefXrcFIUmOjcnxqCRBnl0wGaj2hDSjHEznKTlHHkMnq7JMv02ZBldSmu0NqXW lN9KDRJDioB/PdoQamXr7jdAlu/hp7MUIMWJ7YEL9GSFV4oCjSjiDSWs/D5xq441+JdM9G 5TSVUFb55RhIDwa9xvLnk12OI943WcsL6x0QmKzvQEtzyQEMl2f38cTNO39A8g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100949; 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=x01u9Fk/s1XQy+TFU41e2Vj5FMlNRRmu2G+U5PHZCso=; b=rcpBA6L+GCROq36zxZ0PKEuewfntB8JkQ/4IHiQgKqmqKUo2+RqL+AFt8TbomPR2x0iOm3 wZrn9wiax4n2y2Bw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Subject: [PATCH 42/44] pwm: gpio: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:18 +0100 Message-Id: <9f43677f484a559c36fd4fd9b1dd3cef0d4b20b4.1729865485.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 5504C202F71 for ; Mon, 28 Oct 2024 07:35:51 +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=1730100954; cv=none; b=nkwGJdg2n1yWavFQjDZcOGktTKBb8McsWo3/N6ugiPLsi4H5Xqkdu3X41oXGn6IBM3td4R26pLTTFyK+9YVxpU79QfqKPHcDZBlWNx06fWBO+AeJyxE5ZFjCd4vscNKdDpSHzV40uf42tyWxbI4WbfwoI2ZouDM2wd8Us2/SIYM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100954; c=relaxed/simple; bh=62MlML62bulsh4zIiOicJWp/5lyl/lygrh/lR3b4Z/U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mgLv2iAPd0K/rURkmjBl5PnmXgG16vRNN7wRnn9sEImNb279G8FbzQ2iLl/LzPql0nbdu2Z8ZMD+zpYXNKC4qfTAcblTwboYeVY03TkgNIE8z7aFjjlWQy8kKKfo4opByyXpexK13VnbPhihQK7nyK4TbM3FXH/AN1xJ1aoM1RA= 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=Z9Glj9pV; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=c0NT6D1i; 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="Z9Glj9pV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="c0NT6D1i" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100949; 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=8QyqQUbnikQg4eROcOGQiXWEgcyxMlrBn4MILmLynAI=; b=Z9Glj9pVhUNF2U47RH4VOTNJm0cNQL0oIgbVEma9qzBY8RjtEe1EeGu5hR9RAv3H2dFqtq TEwoQ7/GYbV32kUFvvb8HjZpv5bVI6lpDJXYHRyhk7Nq83H72ikrnx+E2OcD1b8NT8UXxp CfB6LCyg1tQ46Wtv7iyhqvBCC2TyPx1IXvv0EQ9mb9FQ7Skof4cM8YH0Of5T6+e1URtGS6 eJ1ac16Qgrc754so3vg8QHzXaMr7GrmXCHh3HT6w2+LUyWQXB1emXDK2I6iJ+4bnQAkVb+ PzEJdz1FfCMuFwmwxs5DZyhAqx7jpX/fW1g6khQq8JuUkaTPx0wLW+oZlX7Xlg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100949; 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=8QyqQUbnikQg4eROcOGQiXWEgcyxMlrBn4MILmLynAI=; b=c0NT6D1i64q/dNj5KYKnOtX7GTGCskKLhCyGbK/HCcmG9mu8f0n2+2svrCUlRB+/jBnOGE w5lxm/HEOIGpxGAQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Takashi Iwai Subject: [PATCH 43/44] ASoC: fsl: imx-pcm-fiq: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35: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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 Mon Nov 25 10:54:53 2024 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 C55DA202F9E for ; Mon, 28 Oct 2024 07:35:51 +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=1730100954; cv=none; b=lIWp6B4eftgZQv0y545YSurQ3KOEF0wQ1Q43q1X7rP2T1NMsQpu+UB48r/iXN4NlkhV1gASH76xb2XituuGeCLaj+fzlMLZ0mkGp9dHda8Vm/wfdPbuhscXgSnL7y4qd+TyeOwAA3qwS0/HVRqH2qFtDDf8fWRLpFATCUx95CyQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100954; c=relaxed/simple; bh=cntlSwMjndeYGfNblFynIUDsp5kX3z4EV7tsbwvRhQM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dh5vOd9VzC0M/3cZng/cjzM8r7VMWvR6sSp1C61iUxtv75aYU623/ZSLiepzZuFT4H2Bq620gWOMq4qFnZpnHItmf2nXjxwMs2e+7Q8XtmdshgeaYNmoFbnabEcX15MB9ohOquK2L09kDzMh++BDzSSbJbU6RAoeyjMxSYPgkPo= 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=RoJCq8Y9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=t/jKjCfI; 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="RoJCq8Y9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="t/jKjCfI" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100950; 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=5BIy9+AZJOkVMok8NrBSJhjeT8JcmYVXmj+uS2bpLPU=; b=RoJCq8Y9dCoUG3Kq547zP1KRVf5BK91krNHJx2hN6CF5WzbGbSwiT8UYxs3bDxZ0vwNcCd E8VlQQb1oYUQzSG6o5iS+jlPQ2DpwMA+xef0H1IDrdY04T8Zw4lA5dYWZwVYD6ZfHly7Xe Ml51nuY4qYqt6LfJZHjBvfF0ntY0wAdupoUS23UB3paHpfGYYOXkfSErOHReljc8sLVTIM tBU2p93WWqHJomlXgjJsdX2vaz/kryiSWdSNyWKHJ0JvXV4dVZDl7TVvmlJkky/vkeELt8 ALsBcwRE9swuEG2vPchPmAzDwL7tRZuqtFGCw8b97NiHcnwoX4xZqEHld+8q0g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100950; 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=5BIy9+AZJOkVMok8NrBSJhjeT8JcmYVXmj+uS2bpLPU=; b=t/jKjCfIqPmUEupagOIlKonVEW8DH8kbpdZdVyLqXxALftHxggimhwxfQwM3hEJiAyaIou n/PgtmBk1+/YclBg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Takashi Iwai Subject: [PATCH 44/44] ALSA: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:20 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Acked-by: Jani Nikula Acked-by: Zack Rusin --- 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 e7b6ce7bd086..4fb88c3a4902 100644 --- a/sound/sh/sh_dac_audio.c +++ b/sound/sh/sh_dac_audio.c @@ -313,8 +313,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