linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: boris brezillon <b.brezillon@overkiz.com>
Cc: Wim Van Sebroeck <wim@iguana.be>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	Ludovic Desroches <ludovic.desroches@atmel.com>,
	Yang Wenyou <Wenyou.Yang@atmel.com>,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [v2,1/4] watchdog: at91sam9_wdt: better watchdog support
Date: Wed, 2 Oct 2013 13:42:17 -0700	[thread overview]
Message-ID: <20131002204217.GA14148@roeck-us.net> (raw)
In-Reply-To: <524C79D2.5070708@overkiz.com>

On Wed, Oct 02, 2013 at 09:53:54PM +0200, boris brezillon wrote:
[ ... ]
> >>>>+
> >>>>+	if (!wdt->heartbeat) {
> >>>>+		dev_err(wdt->wdd.parent,
> >>>>+			": sorry, linux timer (%i Hz) cannot handle watchdog timeout (%i ms)\n",
> >>>>+			HZ, ticks_to_ms(value));
> >>>>+		return -EINVAL;
> >>>Isn't that a bit rude ? Why not set it to the minimum ?
> 
> I might have misunderstood your point.
> What is a bit rude ?
>  - the fact that the minimum heartbeat timeout has to be at less or
> equal to one-forth of
>    max heartbeat timeout
>  - the fact that heartbeat expressed in ticks has to be more than 0
>  - something else

That you don't auto-correct the heatbeat to the minimum but return -EINVAL instead.
I prefer to be user-friendly, which in this case would be to accept and handle
the <min, max> timeout values provided to the infrastructure and handle any
deviations / limitaions internally.

Or, in other words, I don't like it if the user ends up having to guess
valid parameter ranges.

Thanks,
Guenter

  reply	other threads:[~2013-10-02 20:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-21  7:19 [PATCH v2 0/4] watchdog: at91sam9_wdt: handle already configured wdt Boris BREZILLON
2013-06-21  7:21 ` [PATCH v2 1/4] watchdog: at91sam9_wdt: better watchdog support Boris BREZILLON
2013-10-02 16:12   ` [v2,1/4] " Guenter Roeck
2013-10-02 19:27     ` boris brezillon
2013-10-02 19:34       ` Guenter Roeck
2013-10-02 19:53         ` boris brezillon
2013-10-02 20:42           ` Guenter Roeck [this message]
2013-06-21  7:23 ` [PATCH v2 2/4] watchdog: at91sam9_wdt: update device tree doc Boris BREZILLON
2013-08-26 13:18   ` boris brezillon
2013-10-02 15:51   ` [v2,2/4] " Guenter Roeck
2013-10-02 16:42     ` boris brezillon
2013-10-03  8:08   ` [PATCH v2 2/4] " Fabio Porcedda
2013-10-03  8:23     ` boris brezillon
2013-10-03  8:26       ` Fabio Porcedda
2013-06-21  7:29 ` [PATCH v2 3/4] ARM: at91/dt: add sam9 watchdog default options to SoCs Boris BREZILLON
2013-06-21  7:31 ` Boris BREZILLON
2013-06-21  7:32 ` [PATCH v2 4/4] ARM: at91/dt: add watchdog properties to kizbox board Boris BREZILLON
2013-08-26 13:25 ` [PATCH v2 0/4] watchdog: at91sam9_wdt: handle already configured wdt boris brezillon
2013-08-27  0:43   ` Yang, Wenyou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131002204217.GA14148@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Wenyou.Yang@atmel.com \
    --cc=b.brezillon@overkiz.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=ludovic.desroches@atmel.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).