mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mpcore_wdt.c bogus fpos check
@ 2005-11-18 16:05 Marcelo Tosatti
  2005-12-05 10:16 ` Russell King
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2005-11-18 16:05 UTC (permalink / raw)
  To: Alan Cox, Andrew Morton; +Cc: linux-kernel



Hi,

drivers/char/watchdog/mpcore_wdt.c write function contains a check for
(ppos != &file->f_pos). Such check used to make sense when a pointer to
file->f_pos was handed by vfs_write(), not a copy of it as it stands
now.

Has been broken since then... Don't have a device to test - does it work
at all?

mpc8xx_wdt.c is similarly broken (patch will be sent separately).

Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>

diff --git a/drivers/char/watchdog/mpcore_wdt.c b/drivers/char/watchdog/mpcore_wdt.c
index da631c1..c9f545e 100644
--- a/drivers/char/watchdog/mpcore_wdt.c
+++ b/drivers/char/watchdog/mpcore_wdt.c
@@ -180,10 +180,6 @@ static ssize_t mpcore_wdt_write(struct f
 {
 	struct mpcore_wdt *wdt = file->private_data;
 
-	/*  Can't seek (pwrite) on this device  */
-	if (ppos != &file->f_pos)
-		return -ESPIPE;
-
 	/*
 	 *	Refresh the timer.
 	 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mpcore_wdt.c bogus fpos check
  2005-11-18 16:05 [PATCH] mpcore_wdt.c bogus fpos check Marcelo Tosatti
@ 2005-12-05 10:16 ` Russell King
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King @ 2005-12-05 10:16 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Alan Cox, Andrew Morton, linux-kernel

On Fri, Nov 18, 2005 at 02:05:50PM -0200, Marcelo Tosatti wrote:
> Has been broken since then... Don't have a device to test - does it work
> at all?

mpcore is a recent addition to the kernel, and this got missed in my
review.  Thanks for spotting, applied.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-05 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-18 16:05 [PATCH] mpcore_wdt.c bogus fpos check Marcelo Tosatti
2005-12-05 10:16 ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®