From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751433AbdJENp0 (ORCPT ); Thu, 5 Oct 2017 09:45:26 -0400 Received: from mga03.intel.com ([134.134.136.65]:10582 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280AbdJENpZ (ORCPT ); Thu, 5 Oct 2017 09:45:25 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,481,1500966000"; d="scan'208";a="157081346" Message-ID: <1507211119.3851.3.camel@linux.intel.com> Subject: Re: [PATCH] drm/i915: Convert timers to use timer_setup() From: Joonas Lahtinen To: Kees Cook , linux-kernel@vger.kernel.org Cc: Daniel Vetter , Jani Nikula , David Airlie , Chris Wilson , Tvrtko Ursulin , Oscar Mateo , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Thomas Gleixner Date: Thu, 05 Oct 2017 16:45:19 +0300 In-Reply-To: <20171005005407.GA23894@beast> References: <20171005005407.GA23894@beast> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.5 (3.24.5-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Cc: Jani Nikula > Cc: David Airlie > Cc: Chris Wilson > Cc: Joonas Lahtinen > Cc: Tvrtko Ursulin > Cc: Oscar Mateo > Cc: intel-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Cc: Thomas Gleixner > Signed-off-by: Kees Cook > @@ -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 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