From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754216AbdA3TdO (ORCPT ); Mon, 30 Jan 2017 14:33:14 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:34329 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754470AbdA3TdK (ORCPT ); Mon, 30 Jan 2017 14:33:10 -0500 Date: Mon, 30 Jan 2017 11:31:18 -0800 From: Guenter Roeck To: Hartley Sweeten Cc: "linux-watchdog@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Wim Van Sebroeck Subject: Re: [PATCH 1/2] watchdog: ep93xx_wdt: cleanup and let the core handle the heartbeat Message-ID: <20170130193118.GD11199@roeck-us.net> References: <20170130165548.40965-1-hsweeten@visionengravers.com> <20170130165548.40965-2-hsweeten@visionengravers.com> <20170130185529.GA11199@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 30, 2017 at 07:09:55PM +0000, Hartley Sweeten wrote: > On Monday, January 30, 2017 11:55 AM, Guenter Roeck wrote: > > On Mon, Jan 30, 2017 at 09:55:47AM -0700, H Hartley Sweeten wrote: > >> Cleanup this driver and remove the 200ms heartbeat timer. The core now > >> has the ability to handle the heartbeat. > >> > >> Signed-off-by: H Hartley Sweeten > >> Cc: Wim Van Sebroeck > >> Cc: Guenter Roeck > > Hi Guenter, > > I wasn't sure this patch was going to get delivered correctly. I got an "Undeliverable" > bounce due to possible spoofing. I am trying to figure out why right now. > Interesting. If you find out, please let me know. Either case, I am subscribed to the watchdog mailing list, so should get all e-mail sent to it. I also have a patchwork instance running, so I see it there as well if the watchdog mailing list is copied. > Anyway... > > > > >> -#define WDT_VERSION "0.4" > >> - > >> -/* default timeout (secs) */ > >> -#define WDT_TIMEOUT 30 > >> - > > > > Personally I like those constants, even if used only once (I know, it is a good > > candidate for bikeshedding). Two reasons: 1) It is already there, and 2) It > > helps seeing the default without having to dig into the code. > > I assume the WDT_VERSION can go away... > Yes, that is pretty much useless. > As far as the WDT_TIMEOUT, I have no problem leaving it. I was just trying to remove > some cruft. > > >> static bool nowayout = WATCHDOG_NOWAYOUT; > >> module_param(nowayout, bool, 0); > >> MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); > >> > >> -static unsigned int timeout = WDT_TIMEOUT; > >> -module_param(timeout, uint, 0); > >> -MODULE_PARM_DESC(timeout, > >> - "Watchdog timeout in seconds. (1<=timeout<=3600, default=" > >> - __MODULE_STRING(WDT_TIMEOUT) ")"); > >> - > > > > Are you sure you want to take away the means to set the timeout with > > a module parameter ? You could easily retain the module parameter > > and call watchdog_init_timeout(wdd, timeout, dev). The parameter should > > then be initialized with 0, though, to have the watchdog core take the > > timeout from devicetree if provided. > > Again, I have no problem leaving this. I personally don't use it but someone else > might. I'm not sure if the ep93xx will ever get converted to devicetree but I > might figure it one eventually. > Thinking more about it, we should really leave the module parameter in. As you say, someone else may be using it, and we should not change the interface to user space. Using watchdog_init_timeout() is useful to check the range (not that it really matters here); that it reads a value from devicetree is an additional benefit. Thanks, Guenter