lkml.org 
[lkml]   [2017]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drm/i915: Convert timers to use timer_setup()
From
Date
On Wed, 2017-10-04 at 17:54 -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: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Oscar Mateo <oscar.mateo@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Kees Cook <keescook@chromium.org>

<SNIP>

> @@ -32,9 +32,9 @@ static struct mock_request *first_request(struct mock_engine *engine)
> link);
> }
>
> -static void hw_delay_complete(unsigned long data)
> +static void hw_delay_complete(struct timer_list *t)
> {
> - struct mock_engine *engine = (typeof(engine))data;
> + struct mock_engine *engine = from_timer(engine, t, hw_delay);

The order is bit strange to me, it's not same as with container_of, but
I guess GCC will complain for getting it wrong. It's also slightly
different doing the typeof for you, so I guess it makes sense, so:

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Do you expect for us to merge or are you looking to merge all timer
changes from single tree?

Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation

\
 
 \ /
  Last update: 2017-10-05 15:45    [W:0.042 / U:0.072 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site