public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Felipe Balbi <felipe.balbi@nokia.com>
Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	Tony Lindgren <tony@atomide.com>,
	Wim Van Sebroeck <wim@iguana.be>,
	Andrew Morton <akpm@linux-foundation.org>,
	"George G. Davis" <gdavis@mvista.com>
Subject: Re: [PATCH 1/5] watchdog: sync linux-omap changes
Date: Fri, 19 Sep 2008 23:40:19 +0100	[thread overview]
Message-ID: <20080919224019.GC9675@flint.arm.linux.org.uk> (raw)
In-Reply-To: <1221820359-8943-2-git-send-email-felipe.balbi@nokia.com>

You're getting there with this patch, but still not completely up to
snuff.

On Fri, Sep 19, 2008 at 01:32:35PM +0300, Felipe Balbi wrote:
> diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> index 3a11dad..e55f2cc 100644
> --- a/drivers/watchdog/omap_wdt.c
> +++ b/drivers/watchdog/omap_wdt.c
> @@ -39,6 +39,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/moduleparam.h>
>  #include <linux/clk.h>
> +
>  #include <linux/bitops.h>
>  #include <linux/io.h>
>  #include <linux/uaccess.h>

This hunk is unnecessary.

> @@ -218,19 +240,18 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
>  			return -EFAULT;
>  		omap_wdt_adjust_timeout(new_margin);
>  
> -		spin_lock(&wdt_lock);
> -		omap_wdt_disable();
> -		omap_wdt_set_timeout();
> -		omap_wdt_enable();
> +		omap_wdt_disable(wdev);
> +		omap_wdt_set_timeout(wdev);
> +		omap_wdt_enable(wdev);
>  
> -		omap_wdt_ping();
> -		spin_unlock(&wdt_lock);
> +		omap_wdt_ping(wdev);

This is removing the spin lock which should remain.

>  		/* Fall */
>  	case WDIOC_GETTIMEOUT:
>  		return put_user(timer_margin, (int __user *)arg);
>  	default:
>  		return -ENOTTY;
>  	}
> +	return 0;

And this return statement shouldn't be required.

Apart from those three points, nice work.

  parent reply	other threads:[~2008-09-19 22:40 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19 10:32 [PATCH 0/5] omap watchdog updaes Felipe Balbi
2008-09-19 10:32 ` [PATCH 1/5] watchdog: sync linux-omap changes Felipe Balbi
2008-09-19 10:32   ` [PATCH 2/5] watchdog: another ioremap() fix Felipe Balbi
2008-09-19 10:32     ` [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c Felipe Balbi
2008-09-19 10:32       ` [PATCH 4/5] watchdog: move omap_wdt.h to include/linux/watchdog Felipe Balbi
2008-09-19 10:32         ` [PATCH 5/5] watchdog: introduce platform_data and remove cpu conditional code Felipe Balbi
2008-09-19 19:04           ` Russell King - ARM Linux
2008-09-19 21:33             ` Felipe Balbi
2008-09-19 22:51               ` Russell King - ARM Linux
2008-09-20 15:03                 ` Wim Van Sebroeck
2008-09-20  5:48               ` Wim Van Sebroeck
2008-09-19 10:56         ` [PATCH 4/5] watchdog: move omap_wdt.h to include/linux/watchdog Alan Cox
2008-09-19 11:06           ` Felipe Balbi
2008-09-19 12:52             ` Alan Cox
2008-09-20  0:41       ` [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c David Brownell
2008-09-20  8:13         ` Russell King - ARM Linux
2008-09-20 15:32           ` David Brownell
2008-09-20 16:11             ` Russell King - ARM Linux
2008-09-20 17:18               ` David Brownell
2008-09-20 18:00                 ` Russell King - ARM Linux
2008-09-21 18:41                   ` Tony Lindgren
2008-09-22  2:01                     ` David Brownell
2008-09-22  1:45                   ` David Brownell
2008-09-22  7:59                     ` Russell King - ARM Linux
2008-09-22  9:30                       ` Tony Lindgren
2008-09-20 17:01             ` Alan Cox
2008-09-19 22:40   ` Russell King - ARM Linux [this message]
2008-09-20  0:20   ` [PATCH 1/5] watchdog: sync linux-omap changes David Brownell
2008-09-20  0:39   ` David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2008-09-18 22:23 [RFC] [PATCH 0/5] omap watchdog fixes Felipe Balbi
2008-09-18 22:23 ` [PATCH 1/5] watchdog: sync linux-omap changes Felipe Balbi
2008-09-18 23:05   ` Russell King - ARM Linux
2008-09-18 23:11     ` Felipe Balbi
2008-09-18 23:20       ` Russell King - ARM Linux
2008-09-19  8:43       ` Wim Van Sebroeck

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=20080919224019.GC9675@flint.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=felipe.balbi@nokia.com \
    --cc=gdavis@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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