From nobody Mon Nov 25 12:30:40 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 80CAB1DA634 for ; Mon, 28 Oct 2024 07:34:53 +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=1730100896; cv=none; b=sN6tBQV6fLKCU10A29jIZgONNYpMGJCa/6iJV7+SvUKXe28XjO944KCarsLq9sYKN6eDTTztpE1FIceLRuOqsmfafpQg5pcAPjK20Aaww6I6CjlvrZ/Sw+XIxSdVQKKmTUaV0EdhTgGPDpK3ferLGr+dskwbKrMC51IYQ5omivM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100896; c=relaxed/simple; bh=IIbEppl4dS+chwmBL45RLcZjLxLuKIjbYMvPgSIRg+w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=C0qgRzKQJMS+xbFj0Utaq8FRlKbsfAn725IZz5VdKRKj/4gYb3Un7IhSwtiV7zzCUKUlRe5qFiqfPhWtl361f1go/ta+0G/BatbYH7dXCqZ3iIJB/GhsRrCeOywk/qHRf6wk+WnOd2QOGsxvkQyQtp4hx40uPppZiLpRp1SXqt4= 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=d6Clmt90; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WKiJKrfq; 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="d6Clmt90"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WKiJKrfq" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100891; 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=LJdI/mozZHXhIuU2am3kttDkMcd+QLHW2Wp2sHPuTUc=; b=d6Clmt90z4tM0ANE9itUdXnm1TKSEoiFc/5LwsB1i0dBsTb1hnTCuK3GdnRTQDO5s/DBd4 SkbX6F52AYVOzdC3CyH+fwKvcSXpy1Fl3z1YaI+SvA7LxyiNjiFTjmYmLESs8Quv1MLTv/ Z0wue0GsWc1afyS0lyF3M/XZgz8BaT1gewDrKesRFlFMSdjsPufDyt9qD933jj8xAkUM8I v6DmOP9BPYUGj/Mo2fBd7/ulwkxFPoFy1CTS4p7eIDs3QWD+jT1tGz4r+9CgYgTH8vQVNJ wLv2KlDWVSW0Ks0NOGQkCLYqbe1dgFvT1ti+GOXqhekNxjNgz1XeCkgN5YkzjQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100891; 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=LJdI/mozZHXhIuU2am3kttDkMcd+QLHW2Wp2sHPuTUc=; b=WKiJKrfqIRrEvd3kHACthQ4R1va8cfjJgpe3wZifAat/SnrDNO35tZFW5R4lvJnb6tO1Kg xEKi6yrblff+c2DA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 18/24] net: wwan: iosm: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:31 +0100 Message-Id: <5b39405467f80bb8e4c83108df12cd2f4a0193e6.1729865232.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 --- Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/wwan/iosm/iosm_ipc_imem.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/net/wwan/iosm/iosm_ipc_imem.c b/drivers/net/wwan/iosm/= iosm_ipc_imem.c index 829515a601b3..530a3ea47a1a 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_imem.c +++ b/drivers/net/wwan/iosm/iosm_ipc_imem.c @@ -1381,24 +1381,20 @@ struct iosm_imem *ipc_imem_init(struct iosm_pcie *p= cie, unsigned int device_id, /* The phase is set to power off. */ ipc_imem->phase =3D IPC_P_OFF; =20 - hrtimer_init(&ipc_imem->startup_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - ipc_imem->startup_timer.function =3D ipc_imem_startup_timer_cb; + hrtimer_setup(&ipc_imem->startup_timer, ipc_imem_startup_timer_cb, CLOCK_= MONOTONIC, + HRTIMER_MODE_REL); =20 - hrtimer_init(&ipc_imem->tdupdate_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - ipc_imem->tdupdate_timer.function =3D ipc_imem_td_update_timer_cb; + hrtimer_setup(&ipc_imem->tdupdate_timer, ipc_imem_td_update_timer_cb, CLO= CK_MONOTONIC, + HRTIMER_MODE_REL); =20 - hrtimer_init(&ipc_imem->fast_update_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - ipc_imem->fast_update_timer.function =3D ipc_imem_fast_update_timer_cb; + hrtimer_setup(&ipc_imem->fast_update_timer, ipc_imem_fast_update_timer_cb= , CLOCK_MONOTONIC, + HRTIMER_MODE_REL); =20 - hrtimer_init(&ipc_imem->td_alloc_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - ipc_imem->td_alloc_timer.function =3D ipc_imem_td_alloc_timer_cb; + hrtimer_setup(&ipc_imem->td_alloc_timer, ipc_imem_td_alloc_timer_cb, CLOC= K_MONOTONIC, + HRTIMER_MODE_REL); =20 - hrtimer_init(&ipc_imem->adb_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - ipc_imem->adb_timer.function =3D ipc_imem_adb_timer_cb; + hrtimer_setup(&ipc_imem->adb_timer, ipc_imem_adb_timer_cb, CLOCK_MONOTONI= C, + HRTIMER_MODE_REL); =20 if (ipc_imem_config(ipc_imem)) { dev_err(ipc_imem->dev, "failed to initialize the imem"); --=20 2.39.5