From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wS6vh48q7zDqZJ for ; Wed, 17 May 2017 05:29:20 +1000 (AEST) Subject: Re: [PATCH 2/9] timers: provide a "modern" variant of timers To: Christoph Hellwig , Thomas Gleixner Cc: Mark Gross , Tejun Heo , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170516114812.10660-1-hch@lst.de> <20170516114812.10660-3-hch@lst.de> From: Randy Dunlap Message-ID: Date: Tue, 16 May 2017 12:29:16 -0700 MIME-Version: 1.0 In-Reply-To: <20170516114812.10660-3-hch@lst.de> Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 05/16/17 04:48, Christoph Hellwig wrote: > diff --git a/include/linux/timer.h b/include/linux/timer.h > index e6789b8757d5..87afe52c8349 100644 > --- a/include/linux/timer.h > +++ b/include/linux/timer.h \ > @@ -126,6 +146,32 @@ static inline void init_timer_on_stack_key(struct timer_list *timer, > init_timer_on_stack_key((_timer), (_flags), NULL, NULL) > #endif > > +/** > + * prepare_timer - initialize a timer before first use > + * @timer: timer structure to prepare > + * @func: callback to be called when the timer expires > + * @flags %TIMER_* flags that control timer behavior missing ':' on @flags: > + * > + * This function initializes a timer_list structure so that it can > + * be used (by calling add_timer() or mod_timer()). > + */ > +static inline void prepare_timer(struct timer_list *timer, > + void (*func)(struct timer_list *timer), u32 flags) > +{ -- ~Randy