From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751842AbbJLKHN (ORCPT ); Mon, 12 Oct 2015 06:07:13 -0400 Received: from mx-guillaumet.finsecur.com ([91.217.234.131]:52832 "EHLO guillaumet.finsecur.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751356AbbJLKHL (ORCPT ); Mon, 12 Oct 2015 06:07:11 -0400 Date: Mon, 12 Oct 2015 12:07:06 +0200 From: Sylvain Rochet To: Guenter Roeck , Boris BREZILLON , linux-kernel@vger.kernel.org, Nicolas Ferre , Ludovic Desroches , linux-arm-kernel@lists.infradead.org, Alexandre Belloni , Wenyou Yang , Wim Van Sebroeck Message-ID: <20151012100706.GA3088@gradator.net> References: <1444340074-15437-1-git-send-email-sylvain.rochet@finsecur.com> <1444340074-15437-4-git-send-email-sylvain.rochet@finsecur.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1444340074-15437-4-git-send-email-sylvain.rochet@finsecur.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 172.16.8.13 X-SA-Exim-Mail-From: sylvain.rochet@finsecur.com Subject: Re: [PATCH 3/6] watchdog: at91sam9: rename heartbeats into timeout where necessary X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on guillaumet.finsecur.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 08, 2015 at 11:34:31PM +0200, Sylvain Rochet wrote: > > @@ -344,7 +342,7 @@ static int __init at91wdt_probe(struct platform_device *pdev) > wdt->wdd.parent = &pdev->dev; > wdt->wdd.info = &at91_wdt_info; > wdt->wdd.ops = &at91_wdt_ops; > - wdt->wdd.timeout = WDT_HEARTBEAT; > + wdt->wdd.timeout = wdt_timeout; This wasn't a good idea, if wdt_timeout is set using a module parameter to a wrong value we end up using this wrong value. Setting the default to a valid hardwired value and checking if the proposed value is valid using watchdog_init_timeout is obviously the way to go. I will rework that in v2. Sylvain From mboxrd@z Thu Jan 1 00:00:00 1970 From: sylvain.rochet@finsecur.com (Sylvain Rochet) Date: Mon, 12 Oct 2015 12:07:06 +0200 Subject: [PATCH 3/6] watchdog: at91sam9: rename heartbeats into timeout where necessary In-Reply-To: <1444340074-15437-4-git-send-email-sylvain.rochet@finsecur.com> References: <1444340074-15437-1-git-send-email-sylvain.rochet@finsecur.com> <1444340074-15437-4-git-send-email-sylvain.rochet@finsecur.com> Message-ID: <20151012100706.GA3088@gradator.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Oct 08, 2015 at 11:34:31PM +0200, Sylvain Rochet wrote: > > @@ -344,7 +342,7 @@ static int __init at91wdt_probe(struct platform_device *pdev) > wdt->wdd.parent = &pdev->dev; > wdt->wdd.info = &at91_wdt_info; > wdt->wdd.ops = &at91_wdt_ops; > - wdt->wdd.timeout = WDT_HEARTBEAT; > + wdt->wdd.timeout = wdt_timeout; This wasn't a good idea, if wdt_timeout is set using a module parameter to a wrong value we end up using this wrong value. Setting the default to a valid hardwired value and checking if the proposed value is valid using watchdog_init_timeout is obviously the way to go. I will rework that in v2. Sylvain