From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755394AbdERI6C (ORCPT ); Thu, 18 May 2017 04:58:02 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:34019 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755007AbdERI5c (ORCPT ); Thu, 18 May 2017 04:57:32 -0400 MIME-Version: 1.0 In-Reply-To: <20170518084136.GA5331@lst.de> References: <20170516114812.10660-1-hch@lst.de> <20170516114812.10660-3-hch@lst.de> <20170518082448.GB3812@lst.de> <20170518084136.GA5331@lst.de> From: Arnd Bergmann Date: Thu, 18 May 2017 10:57:31 +0200 X-Google-Sender-Auth: dcCbZ8A--mXjILm3O-4dTbDnYFs Message-ID: Subject: Re: [PATCH 2/9] timers: provide a "modern" variant of timers To: Christoph Hellwig Cc: Thomas Gleixner , Mark Gross , Tejun Heo , linuxppc-dev , linux-s390 , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 18, 2017 at 10:41 AM, Christoph Hellwig wrote: > On Thu, May 18, 2017 at 10:24:48AM +0200, Christoph Hellwig wrote: >> > b) give the union a name (breaks any reference to timer_list->func in C code): >> > >> > + union { >> > + void (*func)(struct timer_list *timer); >> > + void (*function)(unsigned long); >> > + } u; >> >> I'll look into that, as it seems a lot safer, and places outside >> the timer code shouldn't really touch it (although I bet they do, >> so more fixes for this series..) > > Meh. All the old init_timer users set function directly, so > I guess we need to use the other approach. How expensive would it be to add another field to timer_list and just have both pointers? Arnd