Skip to contentSkip to conversation

v2.6.32-rc8 fix - rc32434_wdt.c: correct size for ioremap_nocache

WATCHDOG Wim Van Sebroeck 1 participant 2 messages Dec 2, 2009 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

Hi Linus,

Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git

This will update the following files:

 drivers/watchdog/rc32434_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

with these Changes:

Author: H Hartley Sweeten <[email protected]>
Date:   Tue Nov 24 21:06:26 2009 -0500

[WATCHDOG] rc32434_wdt.c: use resource_size()

The size value passed to ioremap_nocache() is not correct. Use resource_size() to get the correct value.

The Changes can also be looked at on:

	http://www.kernel.org/git/?p=linux/kernel/git/wim/linux-2.6-watchdog.git;a=summary

For completeness, I added the overal diff below.

Greetings,
Wim.

================================================================================

drivers/watchdog/rc32434_wdt.c +1 -1
index f6cccc9..3764af1 100644
@@ -276,7 +276,7 @@ static int __devinit rc32434_wdt_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	wdt_reg = ioremap_nocache(r->start, r->end - r->start);
+	wdt_reg = ioremap_nocache(r->start, resource_size(r));
 	if (!wdt_reg) {
 		printk(KERN_ERR PFX "failed to remap I/O resources\n");
 		return -ENXIO;
#1 lore raw

[WATCHDOG] v2.6.32-rc8 fix - rc32434_wdt.c: correct size for ioremap_nocache & modulestring

Hi Linus,

Quoted 9 lines

Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git

This will update the following files:

 drivers/watchdog/rc32434_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Florian had another fix for the rc32434_wdt.c driver.

So this update will consist of:

 drivers/watchdog/rc32434_wdt.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

with these Changes:

Author: Florian Fainelli <[email protected]>
Date:   Wed Dec 2 13:21:23 2009 +0100

[PATCH] rc32434_wdt: fix compilation failure

This patch fixes the compilation failure of rc32434 due to a bad module parameter description.

Author: H Hartley Sweeten <[email protected]>
Date:   Tue Nov 24 21:06:26 2009 -0500

[WATCHDOG] rc32434_wdt.c: use resource_size()

The size value passed to ioremap_nocache() is not correct. Use resource_size() to get the correct value.

The Changes can also be looked at on:

	http://www.kernel.org/git/?p=linux/kernel/git/wim/linux-2.6-watchdog.git;a=summary

For completeness, I added the overal diff below.

Greetings,
Wim.

================================================================================

drivers/watchdog/rc32434_wdt.c +2 -2
index f6cccc9..bf12d06 100644
@@ -62,7 +62,7 @@ extern unsigned int idt_cpu_freq;
 static int timeout = WATCHDOG_TIMEOUT;
 module_param(timeout, int, 0);
 MODULE_PARM_DESC(timeout, "Watchdog timeout value, in seconds (default="
-		WATCHDOG_TIMEOUT ")");
+		__MODULE_STRING(WATCHDOG_TIMEOUT) ")");
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
@@ -276,7 +276,7 @@ static int __devinit rc32434_wdt_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	wdt_reg = ioremap_nocache(r->start, r->end - r->start);
+	wdt_reg = ioremap_nocache(r->start, resource_size(r));
 	if (!wdt_reg) {
 		printk(KERN_ERR PFX "failed to remap I/O resources\n");
 		return -ENXIO;