linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wim Van Sebroeck <wim@iguana.be>
To: John Crispin <blogic@openwrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Ralph Hempel <ralph.hempel@lantiq.com>,
	linux-mips@linux-mips.org, linux-watchdog@vger.kernel.org
Subject: Re: [PATCH V6] MIPS: lantiq: add watchdog support
Date: Tue, 26 Apr 2011 14:42:12 +0200	[thread overview]
Message-ID: <20110426124212.GA17580@infomag.iguana.be> (raw)
In-Reply-To: <1303817863-19526-1-git-send-email-blogic@openwrt.org>

Hi John,

> +static int
> +ltq_wdt_open(struct inode *inode, struct file *file)
> +{
> +	if (ltq_wdt_in_use)
> +		return -EBUSY;
> +	ltq_wdt_in_use = 1;
> +	ltq_wdt_enable();
> +
> +	return nonseekable_open(inode, file);
> +}

I prefer to see a test_and_set_bit(ltq_wdt_in_use) and a ...

> +static int
> +ltq_wdt_release(struct inode *inode, struct file *file)
> +{
> +	if (ltq_wdt_ok_to_close)
> +		ltq_wdt_disable();
> +	else
> +		pr_err("ltq_wdt: watchdog closed without warning\n");
> +	ltq_wdt_ok_to_close = 0;
> +	ltq_wdt_in_use = 0;
> +
> +	return 0;
> +}

... clear_bit(ltq_wdt_in_use);

For the rest is looks ok for me. So Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

Kind regards,
Wim.


  reply	other threads:[~2011-04-26 12:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 11:37 [PATCH V6] MIPS: lantiq: add watchdog support John Crispin
2011-04-26 12:42 ` Wim Van Sebroeck [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-05-05 21:00 John Crispin
2011-05-11 17:15 ` Ralf Baechle

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=20110426124212.GA17580@infomag.iguana.be \
    --to=wim@iguana.be \
    --cc=blogic@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=ralph.hempel@lantiq.com \
    /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).