Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1244720

Re: [PATCH 6/6] watchdog: sama5d4: try to set timeout from device tree first

From Sylvain Rochet <sylvain.rochet@finsecur.com>
Newsgroups linux.kernel
Subject Re: [PATCH 6/6] watchdog: sama5d4: try to set timeout from device tree first
Date 2015-10-12 16:00 +0200
Message-ID <qiLNV-LL-55@gated-at.bofh.it> (permalink)
References <qhr4S-7fJ-7@gated-at.bofh.it> <qhr4S-7fJ-19@gated-at.bofh.it> <qiGbx-Yi-13@gated-at.bofh.it> <qiGuR-1Ag-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Wenyou,

On Mon, Oct 12, 2015 at 08:12:42AM +0000, Yang, Wenyou wrote:
> > -----Original Message-----
> > From: Alexandre Belloni [mailto:alexandre.belloni@free-electrons.com]
> > Sent: 2015年10月12日 15:50
> > To: Sylvain Rochet
> > Cc: Guenter Roeck; Boris BREZILLON; linux-kernel@vger.kernel.org; Ferre,
> > Nicolas; Desroches, Ludovic; linux-arm-kernel@lists.infradead.org; Yang,
> > Wenyou; Wim Van Sebroeck
> > Subject: Re: [PATCH 6/6] watchdog: sama5d4: try to set timeout from device tree
> > first
> > 
> > Hi Sylvain,
> > 
> > The rest of the series looks good to me, one comment below:
> > 
> > On 08/10/2015 at 23:34:34 +0200, Sylvain Rochet wrote :
> > > watchdog_init_timeout function doesn't try to get the "timeout-sec" DT
> > > property if timeout_parm is not zero. This change makes this DT
> > > property working for the sama5d4 watchdog driver.
> > >
> > 
> > While I'm not sure of the feasibility, I think that the module parameter should
> > override the DT property.
> 
> The patch should be right, the DT property overrides the module 
> parameter.
> 
> If the DT property is not a valid value, it uses the default value, 
> initialized with the module parameter at the beginning of probe.

Well, the principle of least surprise applied here means if you load the 
module with a timeout argument, you expect the timeout argument to be 
used and not the dt one. As such, it makes more sense to have the 
parameter value takes precedence over the dt value.

Sylvain
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] watchdog: sama5d4 and at91sam9: trivial rework Sylvain Rochet <sylvain.rochet@finsecur.com> - 2015-10-08 23:40 +0200
  [PATCH 5/6] watchdog: at91sam9: remove unused pdata support Sylvain Rochet <sylvain.rochet@finsecur.com> - 2015-10-08 23:40 +0200
  [PATCH 6/6] watchdog: sama5d4: try to set timeout from device tree first Sylvain Rochet <sylvain.rochet@finsecur.com> - 2015-10-08 23:40 +0200
    Re: [PATCH 6/6] watchdog: sama5d4: try to set timeout from device  tree first Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2015-10-12 10:00 +0200
      RE: [PATCH 6/6] watchdog: sama5d4: try to set timeout from device  tree first "Yang, Wenyou" <Wenyou.Yang@atmel.com> - 2015-10-12 10:20 +0200
        Re: [PATCH 6/6] watchdog: sama5d4: try to set timeout from device  tree first Sylvain Rochet <sylvain.rochet@finsecur.com> - 2015-10-12 16:00 +0200
      Re: [PATCH 6/6] watchdog: sama5d4: try to set timeout from device  tree first Sylvain Rochet <sylvain.rochet@finsecur.com> - 2015-10-12 11:10 +0200
  [PATCH 2/6] watchdog: at91sam9: use watchdog_get_drvdata instead of container_of Sylvain Rochet <sylvain.rochet@finsecur.com> - 2015-10-08 23:40 +0200
  [PATCH 4/6] watchdog: at91sam9: remove nowayout useless copy Sylvain Rochet <sylvain.rochet@finsecur.com> - 2015-10-08 23:40 +0200

csiph-web