From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756924AbdJQCwU (ORCPT ); Mon, 16 Oct 2017 22:52:20 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:48119 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754419AbdJQCwT (ORCPT ); Mon, 16 Oct 2017 22:52:19 -0400 X-Google-Smtp-Source: AOwi7QDJFpJU+pO1mhh/IJmhIjMUTvxFWwypKHqs/JaFXLH8Yu+1A36mguyBqZcX5wTEm+D7i0o79Q== Date: Tue, 17 Oct 2017 12:52:04 +1000 From: Nicholas Piggin To: Kees Cook Cc: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/watchdog: Convert timers to use timer_setup() Message-ID: <20171017125204.728b3a95@roar.ozlabs.ibm.com> In-Reply-To: <20171016234710.GA102273@beast> References: <20171016234710.GA102273@beast> Organization: IBM X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Oct 2017 16:47:10 -0700 Kees Cook wrote: > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: Kees Cook Looks fine to me. Is this intended to be merged via the powerpc tree in the next merge window? Acked-by: Nicholas Piggin > --- > arch/powerpc/kernel/watchdog.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c > index 15e209a37c2d..50797528b5e1 100644 > --- a/arch/powerpc/kernel/watchdog.c > +++ b/arch/powerpc/kernel/watchdog.c > @@ -263,9 +263,8 @@ static void wd_timer_reset(unsigned int cpu, struct timer_list *t) > add_timer_on(t, cpu); > } > > -static void wd_timer_fn(unsigned long data) > +static void wd_timer_fn(struct timer_list *t) > { > - struct timer_list *t = this_cpu_ptr(&wd_timer); > int cpu = smp_processor_id(); > > watchdog_timer_interrupt(cpu); > @@ -292,7 +291,7 @@ static void start_watchdog_timer_on(unsigned int cpu) > > per_cpu(wd_timer_tb, cpu) = get_tb(); > > - setup_pinned_timer(t, wd_timer_fn, 0); > + timer_setup(t, wd_timer_fn, TIMER_PINNED); > wd_timer_reset(cpu, t); > } >