From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751415AbdEUG5x (ORCPT ); Sun, 21 May 2017 02:57:53 -0400 Received: from verein.lst.de ([213.95.11.211]:42869 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750822AbdEUG5v (ORCPT ); Sun, 21 May 2017 02:57:51 -0400 Date: Sun, 21 May 2017 08:57:49 +0200 From: "'Christoph Hellwig'" To: David Laight Cc: "'Christoph Hellwig'" , Thomas Gleixner , Tejun Heo , "linuxppc-dev@lists.ozlabs.org" , Mark Gross , "linux-kernel@vger.kernel.org" , "linux-s390@vger.kernel.org" Subject: Re: [PATCH 2/9] timers: provide a "modern" variant of timers Message-ID: <20170521065749.GA13052@lst.de> References: <20170516114812.10660-1-hch@lst.de> <20170516114812.10660-3-hch@lst.de> <063D6719AE5E284EB5DD2968C1650D6DCFFFAA38@AcuExch.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DCFFFAA38@AcuExch.aculab.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 19, 2017 at 10:48:51AM +0000, David Laight wrote: > From: Christoph Hellwig > > Sent: 16 May 2017 12:48 > > > > The new callback gets a pointer to the timer_list itself, which can > > then be used to get the containing structure using container_of > > instead of casting from and to unsigned long all the time. > > What about sensible drivers that put some other value in the 'data' > field? They will add the equivalent of the data field into the containing structure of the timer. Just like we do for all other kernel interfaces using the container_of patter, which includes just about every primitive designed in the last 15 years.