Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752348AbbESBMf (ORCPT ); Mon, 18 May 2015 21:12:35 -0400 Received: from mail-ob0-f170.google.com ([209.85.214.170]:35853 "EHLO mail-ob0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280AbbESBMc (ORCPT ); Mon, 18 May 2015 21:12:32 -0400 MIME-Version: 1.0 In-Reply-To: <20150518201445.GA21230@roeck-us.net> References: <=fu.wei@linaro.org> <20150518172329.GA17202@roeck-us.net> <2729872.Fp4939suL0@wuerfel> <20150518201445.GA21230@roeck-us.net> Date: Tue, 19 May 2015 09:12:31 +0800 Message-ID: Subject: Re: [PATCH 4/6] Watchdog: introdouce "pretimeout" into framework From: Fu Wei To: Guenter Roeck Cc: Arnd Bergmann , 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2066 Lines: 62 Hi Arnd, Guenter, yes, that is brilliant idea!! I will try to do so , that solve the compatibility problem , so I guess we can try this time :-) On 19 May 2015 at 04:14, Guenter Roeck wrote: > On Mon, May 18, 2015 at 10:03:52PM +0200, Arnd Bergmann wrote: >> 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. >> > Excellent idea. > > Guenter -- Best regards, Fu Wei Software Engineer Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch Ph: +86 21 61221326(direct) Ph: +86 186 2020 4684 (mobile) Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/