mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org,
	Uwe Kleine-Konig <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH] watchdog: imx: error out on negative timeouts
Date: Mon, 02 Feb 2015 20:50:38 +0900	[thread overview]
Message-ID: <20150202205038.451E.AA925319@jp.panasonic.com> (raw)
In-Reply-To: <20150202110432.GA12209@pengutronix.de>


On Mon, 2 Feb 2015 12:04:32 +0100
Sascha Hauer <s.hauer@pengutronix.de> wrote:

> On Mon, Feb 02, 2015 at 11:49:57AM +0100, Uwe Kleine-Konig wrote:
> > Hello,
> > 
> > On Tue, Jan 27, 2015 at 02:41:01PM +0100, Uwe Kleine-Konig wrote:
> > > I'm not sure where a negative timeout could come from but making the
> > > code more robust for no additional runtime cost is good nevertheless.
> > > 
> > > Signed-off-by: Uwe Kleine-Konig <u.kleine-koenig@pengutronix.de>
> > > ---
> > >  drivers/watchdog/imxwd.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c
> > > index 31c3d0d85353..66e9f6848f74 100644
> > > --- a/drivers/watchdog/imxwd.c
> > > +++ b/drivers/watchdog/imxwd.c
> > > @@ -87,7 +87,7 @@ static int imx21_watchdog_set_timeout(struct imx_wd *priv, int timeout)
> > >  
> > >  	dev_dbg(priv->dev, "%s: %d\n", __func__, timeout);
> > >  
> > > -	if (!timeout || timeout > 128)
> > > +	if (timeout <= 0 || timeout > 128)
> > >  		return -EINVAL;
> > This patch is broken because reset_cpu (in the same source file) calls
> > set_timeout with timeout=-1 to reset the cpu immediatly. The wd command
> > only parses non-negative values, so from there nothing strange should be
> > expected.
> > 
> > Returning -EINVAL on timeout=0 (which means "disable watchdog") is OK
> > because the imx21 watchdog cannot be stopped.
> > 
> > So in short: please drop this patch from next.
> 
> Did that.
> 


Forgive my newbie questions.

I have been studied barebox for one month and a half,
I think I could roughly understand the next branch policy in this community,
but could you help me to make it a little bit clearer?


I guess the barebox/next is similar to the linux-next repository.

Similar points are:
 [1] barebox/next is not fast-forwarded
     (Developers should work with "git rebase --onto" as we do in linux-next
 [2] barebox/next represents the source tree that is *probably* merged into the master branch
     after the next release.
     (Perhaps, barebox might not have what we call Merge Window,
      but I notice topic branches are merged right after every-month release.)


On the other hand, I notice some differences

[3] All the topic branches are locally maintained by Sascha, so they are never pushed
    to the public repository.
[4] Some commits in topic branches might be dropped rather than being git-reverted
    if they turned out to be bad.
    (i.e. commit ID becomes a fixed value when it is merge into the master branch.)


If [4] is true, we should not describe the commit ID in the following commits
until it is merged into the master branch.   (Or we should be very careful when we do so.)

We often write something like
"Since commit xxxxxxxxxxxx, the foo function has not been working. Blah Blah ..."
in bug-fix patches.
But xxxxxxxxxxxx may change if the preceding commit is dropped or modified.


Is this statement correct?


Best Regards
Masahiro Yamada


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-02-02 11:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 13:41 Uwe Kleine-König
2015-01-28  9:15 ` Sascha Hauer
2015-02-02 10:49 ` Uwe Kleine-König
2015-02-02 11:04   ` Sascha Hauer
2015-02-02 11:50     ` Masahiro Yamada [this message]
2015-02-02 12:16       ` Sascha Hauer
2015-02-03  6:14         ` Masahiro Yamada
2015-02-03  7:44           ` Sascha Hauer

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=20150202205038.451E.AA925319@jp.panasonic.com \
    --to=yamada.m@jp.panasonic.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /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