* [patch 1/3] WATCHDOG: Fix NULL usage in s3c2410_wdt driver.
2008-06-22 21:36 [patch 0/3] s3c2410 watchdog fixes for next kernel release Ben Dooks
@ 2008-06-22 21:36 ` Ben Dooks
2008-06-22 22:35 ` Alan Cox
2008-06-22 21:36 ` [patch 2/3] WATCHDOG: Clean out header of " Ben Dooks
2008-06-22 21:36 ` [patch 3/3] WATCHDOG: Fix s3c2410_wdt driver coding style issues Ben Dooks
2 siblings, 1 reply; 9+ messages in thread
From: Ben Dooks @ 2008-06-22 21:36 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-arm-kernel, wim, Ben Dooks
[-- Attachment #1: simtec/simtec-drivers-s3c2410-wdt-fixnull.patch --]
[-- Type: text/plain, Size: 774 bytes --]
Fix comparison of a pointer to 0, instead of using
NULL for a invalid pointer.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Index: linux-2.6.26-rc5-quilt1/drivers/watchdog/s3c2410_wdt.c
===================================================================
--- linux-2.6.26-rc5-quilt1.orig/drivers/watchdog/s3c2410_wdt.c 2008-06-07 23:08:39.000000000 +0100
+++ linux-2.6.26-rc5-quilt1/drivers/watchdog/s3c2410_wdt.c 2008-06-07 23:09:54.000000000 +0100
@@ -377,7 +377,7 @@ static int s3c2410wdt_probe(struct platf
}
wdt_base = ioremap(res->start, size);
- if (wdt_base == 0) {
+ if (wdt_base == NULL) {
dev_err(dev, "failed to ioremap() region\n");
ret = -EINVAL;
goto err_req;
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
^ permalink raw reply [flat|nested] 9+ messages in thread* [patch 2/3] WATCHDOG: Clean out header of s3c2410_wdt driver.
2008-06-22 21:36 [patch 0/3] s3c2410 watchdog fixes for next kernel release Ben Dooks
2008-06-22 21:36 ` [patch 1/3] WATCHDOG: Fix NULL usage in s3c2410_wdt driver Ben Dooks
@ 2008-06-22 21:36 ` Ben Dooks
2008-06-22 22:35 ` Alan Cox
2008-06-22 21:36 ` [patch 3/3] WATCHDOG: Fix s3c2410_wdt driver coding style issues Ben Dooks
2 siblings, 1 reply; 9+ messages in thread
From: Ben Dooks @ 2008-06-22 21:36 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-arm-kernel, wim, Ben Dooks
[-- Attachment #1: simtec/simtec-drivers-s3c2410-wdt-cleanup1.patch --]
[-- Type: text/plain, Size: 1265 bytes --]
Remove the changelog from the top of the driver, which
is redundant as this information is more accurately
represented from the revision control holding the
file.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Index: linux-2.6.26-rc5-quilt1/drivers/watchdog/s3c2410_wdt.c
===================================================================
--- linux-2.6.26-rc5-quilt1.orig/drivers/watchdog/s3c2410_wdt.c 2008-06-07 23:10:16.000000000 +0100
+++ linux-2.6.26-rc5-quilt1/drivers/watchdog/s3c2410_wdt.c 2008-06-07 23:10:54.000000000 +0100
@@ -21,18 +21,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Changelog:
- * 05-Oct-2004 BJD Added semaphore init to stop crashes on open
- * Fixed tmr_count / wdt_count confusion
- * Added configurable debug
- *
- * 11-Jan-2005 BJD Fixed divide-by-2 in timeout code
- *
- * 25-Jan-2005 DA Added suspend/resume support
- * Replaced reboot notifier with .shutdown method
- *
- * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
*/
#include <linux/module.h>
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 2/3] WATCHDOG: Clean out header of s3c2410_wdt driver.
2008-06-22 21:36 ` [patch 2/3] WATCHDOG: Clean out header of " Ben Dooks
@ 2008-06-22 22:35 ` Alan Cox
2008-06-22 23:06 ` Ben Dooks
0 siblings, 1 reply; 9+ messages in thread
From: Alan Cox @ 2008-06-22 22:35 UTC (permalink / raw)
To: Ben Dooks; +Cc: linux-kernel, linux-arm-kernel, wim, Ben Dooks
On Sun, 22 Jun 2008 22:36:50 +0100
Ben Dooks <ben-linux@fluff.org> wrote:
> Remove the changelog from the top of the driver, which
> is redundant as this information is more accurately
> represented from the revision control holding the
> file.
>
> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
NAK. This is going to clash with the big pile of changes stuck in the
maintainers in queue.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 2/3] WATCHDOG: Clean out header of s3c2410_wdt driver.
2008-06-22 22:35 ` Alan Cox
@ 2008-06-22 23:06 ` Ben Dooks
2008-06-23 9:22 ` Alan Cox
0 siblings, 1 reply; 9+ messages in thread
From: Ben Dooks @ 2008-06-22 23:06 UTC (permalink / raw)
To: Alan Cox; +Cc: Ben Dooks, linux-kernel, linux-arm-kernel, wim
On Sun, Jun 22, 2008 at 11:35:16PM +0100, Alan Cox wrote:
> On Sun, 22 Jun 2008 22:36:50 +0100
> Ben Dooks <ben-linux@fluff.org> wrote:
>
> > Remove the changelog from the top of the driver, which
> > is redundant as this information is more accurately
> > represented from the revision control holding the
> > file.
> >
> > Signed-off-by: Ben Dooks <ben-linux@fluff.org>
>
> NAK. This is going to clash with the big pile of changes stuck in the
> maintainers in queue.
Then why, as the original driver authour and current maintainer
do I not get told about this? This isn't the first time I've come
to apply this sort of thing and find that someone else has slipped
in an 'trivial' change such as whitespace that breaks an entire
patch series.
Do people not bother to check who wrote the driver or who is the
current maintainer before doing these things?
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 2/3] WATCHDOG: Clean out header of s3c2410_wdt driver.
2008-06-22 23:06 ` Ben Dooks
@ 2008-06-23 9:22 ` Alan Cox
0 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2008-06-23 9:22 UTC (permalink / raw)
To: Ben Dooks; +Cc: Ben Dooks, linux-kernel, linux-arm-kernel, wim
O> > NAK. This is going to clash with the big pile of changes stuck in the
> > maintainers in queue.
>
> Then why, as the original driver authour and current maintainer
> do I not get told about this? This isn't the first time I've come
> to apply this sort of thing and find that someone else has slipped
> in an 'trivial' change such as whitespace that breaks an entire
> patch series.
> Do people not bother to check who wrote the driver or who is the
> current maintainer before doing these things?
Yes - and posted patch series to the lists. The entire watchdog tree went
systematically through the cleanup process. Then I've queued a small
series of patches which are a proposed rework of Wim's idea about
changing the API for watchdogs entirely.
It has slipped back out of sight of most people for ages because Wim has
been attending to other things so it has been queued for about 3 weeks.
Alan
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 3/3] WATCHDOG: Fix s3c2410_wdt driver coding style issues
2008-06-22 21:36 [patch 0/3] s3c2410 watchdog fixes for next kernel release Ben Dooks
2008-06-22 21:36 ` [patch 1/3] WATCHDOG: Fix NULL usage in s3c2410_wdt driver Ben Dooks
2008-06-22 21:36 ` [patch 2/3] WATCHDOG: Clean out header of " Ben Dooks
@ 2008-06-22 21:36 ` Ben Dooks
2008-06-22 22:34 ` Alan Cox
2 siblings, 1 reply; 9+ messages in thread
From: Ben Dooks @ 2008-06-22 21:36 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-arm-kernel, wim, Ben Dooks
[-- Attachment #1: simtec/simtec-drivers-s3c2410-wdt-cleanup2.patch --]
[-- Type: text/plain, Size: 1308 bytes --]
Fixup coding style issues in the s3c2410_wdt driver.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Index: linux-2.6.26-rc5-quilt1/drivers/watchdog/s3c2410_wdt.c
===================================================================
--- linux-2.6.26-rc5-quilt1.orig/drivers/watchdog/s3c2410_wdt.c 2008-06-07 23:12:18.000000000 +0100
+++ linux-2.6.26-rc5-quilt1/drivers/watchdog/s3c2410_wdt.c 2008-06-07 23:14:31.000000000 +0100
@@ -199,7 +199,7 @@ static int s3c2410wdt_set_heartbeat(int
static int s3c2410wdt_open(struct inode *inode, struct file *file)
{
- if(down_trylock(&open_lock))
+ if (down_trylock(&open_lock))
return -EBUSY;
if (nowayout)
@@ -237,7 +237,7 @@ static ssize_t s3c2410wdt_write(struct f
/*
* Refresh the timer.
*/
- if(len) {
+ if (len) {
if (!nowayout) {
size_t i;
@@ -256,6 +256,7 @@ static ssize_t s3c2410wdt_write(struct f
s3c2410wdt_keepalive();
}
+
return len;
}
@@ -356,7 +357,7 @@ static int s3c2410wdt_probe(struct platf
return -ENOENT;
}
- size = (res->end-res->start)+1;
+ size = (res->end - res->start) + 1;
wdt_mem = request_mem_region(res->start, size, pdev->name);
if (wdt_mem == NULL) {
dev_err(dev, "failed to get memory region\n");
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
^ permalink raw reply [flat|nested] 9+ messages in thread