[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171024100358.p5jsvxdfitt4dvt4@mwanda>
Date: Tue, 24 Oct 2017 13:03:59 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Kees Cook <keescook@...omium.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org, Johan Hovold <johan@...nel.org>,
linux-kernel@...r.kernel.org, greybus-dev@...ts.linaro.org
Subject: Re: [PATCH] staging: greybus: Convert timers to use timer_setup()
On Tue, Oct 24, 2017 at 01:25:50AM -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: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: "Bryan O'Donoghue" <pure.logic@...us-software.ie>
> Cc: Johan Hovold <johan@...nel.org>
> Cc: Alex Elder <elder@...nel.org>
> Cc: greybus-dev@...ts.linaro.org
> Cc: devel@...verdev.osuosl.org
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---
> drivers/staging/greybus/loopback.c | 14 ++++----------
> drivers/staging/greybus/operation.c | 7 +++----
> 2 files changed, 7 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
> index 08e255884206..045aaf81113a 100644
> --- a/drivers/staging/greybus/loopback.c
> +++ b/drivers/staging/greybus/loopback.c
> @@ -572,16 +572,11 @@ static void gb_loopback_async_operation_work(struct work_struct *work)
> gb_loopback_async_operation_put(op_async);
> }
>
> -static void gb_loopback_async_operation_timeout(unsigned long data)
> +static void gb_loopback_async_operation_timeout(struct timer_list *t)
> {
> - struct gb_loopback_async_operation *op_async;
> - u16 id = data;
> + struct gb_loopback_async_operation *op_async =
> + from_timer(op_async, t, timer);
>
Since this one needs to be re-sent any way, could you do this instead of
breaking up the line?
struct gb_loopback_async_operation *op_async;
op_async = from_timer(op_async, t, timer);
regards,
dan carpenter
Powered by blists - more mailing lists