From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4B59C1D61AC for ; Mon, 28 Oct 2024 07:52:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730101957; cv=none; b=MPDE3g19wwXQo2Eia4rVNNX8idnwp9QvjLbBHoZOx8I5UUMQHwHj/N9RJ+EMO2Ld8VDktaMp/f9tVlyBoVBdiud1sLdjL1ov81T8jg5bSus6eza+fF4r0IiOjGmMP6ALNP5NRK9XZFtHpAC0sfrMsDz02ktNyBH96ikGeCzL95w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730101957; c=relaxed/simple; bh=05z+lhnRMfX7W99XMQIVuZC8ff5F/873Aco3qvM+mz4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Zff8bE86r/2mMD6YI2Igg1JThXmQYtIwd3HEnW4OsSBF9o+CgiPglo//FQd+apaMr1CJthCAJ7GvKO8m6iWEFW2Ykc87IfZ/4rA+t/aC4vyfP1qR246k1TEfX326JcyFxnNGfKAehEHIlMagBk958pvuu8TvV0tvIaAacLQVS88= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B36B8C4CEC3; Mon, 28 Oct 2024 07:52:35 +0000 (UTC) Date: Mon, 28 Oct 2024 03:52:32 -0400 From: Steven Rostedt To: Nam Cao Cc: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Subject: Re: [PATCH 24/31] tracing/osnoise: Switch to use hrtimer_setup() Message-ID: <20241028035232.0981c3ed@rorschach.local.home> In-Reply-To: <491c6ad7c82f8fc446d0727757e6b4267ac64417.1729864823.git.namcao@linutronix.de> References: <491c6ad7c82f8fc446d0727757e6b4267ac64417.1729864823.git.namcao@linutronix.de> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 28 Oct 2024 08:31:57 +0100 Nam Cao wrote: > 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. > Acked-by: Steven Rostedt (Google) -- Steve > Signed-off-by: Nam Cao > --- > Cc: Steven Rostedt > --- > kernel/trace/trace_osnoise.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c > index 1439064f65d6..e50f7a1aae6d 100644 > --- a/kernel/trace/trace_osnoise.c > +++ b/kernel/trace/trace_osnoise.c > @@ -1896,8 +1896,7 @@ static int timerlat_main(void *data) > tlat->count = 0; > tlat->tracing_thread = false; > > - hrtimer_init(&tlat->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD); > - tlat->timer.function = timerlat_irq; > + hrtimer_setup(&tlat->timer, timerlat_irq, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD); > tlat->kthread = current; > osn_var->pid = current->pid; > /* > @@ -2461,8 +2460,7 @@ static int timerlat_fd_open(struct inode *inode, struct file *file) > tlat = this_cpu_tmr_var(); > tlat->count = 0; > > - hrtimer_init(&tlat->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD); > - tlat->timer.function = timerlat_irq; > + hrtimer_setup(&tlat->timer, timerlat_irq, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD); > > migrate_enable(); > return 0;