From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754812AbbERUE6 (ORCPT ); Mon, 18 May 2015 16:04:58 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:55246 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754700AbbERUEw (ORCPT ); Mon, 18 May 2015 16:04:52 -0400 From: Arnd Bergmann To: Guenter Roeck Cc: Fu Wei , Suravee Suthikulpanit , Linaro ACPI Mailman List , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Wei Fu , G Gregory , Al Stone , Hanjun Guo , Timur Tabi , Ashwin Chaugule , vgandhi@codeaurora.org, wim@iguana.be, Jon Masters , Leo Duran , Jon Corbet Subject: Re: [PATCH 4/6] Watchdog: introdouce "pretimeout" into framework Date: Mon, 18 May 2015 22:03:52 +0200 Message-ID: <2729872.Fp4939suL0@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150518172329.GA17202@roeck-us.net> References: <=fu.wei@linaro.org> <20150518172329.GA17202@roeck-us.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:tURLD3OyhhFoEJv5p5bcOD7Se6CaN2M94/TqHqIW6SKzpUNpyuU j8acAnAJRkwzCDKFy9Yh0Dz7Q2ekt4YiLqxfGxCkkKIVOmZTyIhhdpk4mHCq16OlFToCVIm 0XJyn+TYEM7v6f587f4LolnYLK1ok5dh097Z4szfX/8mf6pFfBSlk9yqa5qdVLf4IkfEFn3 Y+/JE5yHI5WbRZX2nQzHw== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 18 May 2015 10:23:30 Guenter Roeck wrote: > > > > integrate watchdog_init_pretimeout and watchdog_init_timeout will be a > > little hard, > > we may need to change this API to : > > > > watchdog_init_timeouts(struct watchdog_device *wdd, unsigned int timeout_parm, > > unsigned int pretimeout_parm, struct device *dev) > > > > then we need to update all the watchdog drivers which use this API, > > maybe we can do this in a individual patchset, after this pretimeout > > patch is merged. > > > > Is that OK ? any thought? > > > That is what I would recommend. > The API change is fine, but I don't think you need to change all drivers. Just add a small wrapper function in the header file doing the conversion: static inline int watchdog_init_timeout(struct watchdog_device *wdd, unsigned int timeout_parm, struct device *dev) { return watchdog_init_timeouts(wdd, timeout_parm, ~0ul, dev); } Then you can update the drivers that actually use the pretimeout to use the new function at some point, and leave all other drivers calling the wrapper function. Arnd