mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PULL REQUEST] watchdog - v2.6.38-rc8
@ 2011-03-14 10:53 Wim Van Sebroeck
  0 siblings, 0 replies; 2+ messages in thread
From: Wim Van Sebroeck @ 2011-03-14 10:53 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Andrew Morton, LKML, Toralf Förster, Dan Carpenter,
	Axel Lin, Thomas Mingarelli, Linux Watchdog Mailing List

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/cpwd.c         |    2 +-
 drivers/watchdog/hpwdt.c        |    4 ++--
 drivers/watchdog/sch311x_wdt.c  |    2 +-
 drivers/watchdog/w83697ug_wdt.c |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

with these Changes:

Author: Axel Lin <axel.lin@gmail.com>
Date:   Wed Mar 2 11:49:44 2011 +0800

    watchdog: hpwdt: eliminate section mismatch warning
    
    hpwdt_init_nmi_decoding() is called in hpwdt_init_one error handling,
    thus remove the  __devexit annotation of hpwdt_exit_nmi_decoding().
    
    This patch fixes below warning:
    
    WARNING: drivers/watchdog/hpwdt.o(.devinit.text+0x36f): Section mismatch in reference from the function hpwdt_init_one() to the function .devexit.text:hpwdt_exit_nmi_decoding()
    The function __devinit hpwdt_init_one() references
    a function __devexit hpwdt_exit_nmi_decoding().
    This is often seen when error handling in the init function
    uses functionality in the exit path.
    The fix is often to remove the __devexit annotation of
    hpwdt_exit_nmi_decoding() so it may be used outside an exit section.
    
    Signed-off-by: Axel Lin <axel.lin@gmail.com>
    Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

Author: Wim Van Sebroeck <wim@iguana.be>
Date:   Mon Feb 21 19:28:58 2011 +0000

    watchdog: w83697ug_wdt: Fix set bit 0 to activate GPIO2
    
    outb_p(c || 0x01, WDT_EFDR); -> || should be |
    
    Reported-By: Toralf Förster <toralf.foerster@gmx.de>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

Author: Dan Carpenter <error27@gmail.com>
Date:   Wed Feb 23 23:26:01 2011 +0300

    watchdog: sch311x_wdt: fix printk condition
    
    "==" has higher precedence than "&".  Since
    if (sch311x_sio_inb(sio_config_port, 0x30) & (0x01 == 0)) is always
    false the message is never printed.
    
    Signed-off-by: Dan Carpenter <error27@gmail.com>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

Author: Wim Van Sebroeck <wim@iguana.be>
Date:   Mon Feb 21 19:09:40 2011 +0000

    watchdog: sch311x_wdt: Fix LDN active check
    
    if (sch311x_sio_inb(sio_config_port, 0x30) && 0x01 == 0) -> && should be &
    
    Reported-By: Toralf Förster <toralf.foerster@gmx.de>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

Author: Wim Van Sebroeck <wim@iguana.be>
Date:   Mon Feb 21 10:52:43 2011 +0000

    watchdog: cpwd: Fix buffer-overflow
    
    cppcheck-1.47 reports:
    [drivers/watchdog/cpwd.c:650]: (error) Buffer access out-of-bounds: p.devs
    
    The source code is
    	for (i = 0; i < 4; i++) {
    		misc_deregister(&p->devs[i].misc);
    
    where devs is defined as WD_NUMDEVS big and WD_NUMDEVS is equal to 3.
    So the 4 should be a 3 or WD_NUMDEVS.
    
    Reported-By: David Binderman
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

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.

================================================================================
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index eca855a..3de4ba0 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -646,7 +646,7 @@ static int __devexit cpwd_remove(struct platform_device *op)
 	struct cpwd *p = dev_get_drvdata(&op->dev);
 	int i;
 
-	for (i = 0; i < 4; i++) {
+	for (i = 0; i < WD_NUMDEVS; i++) {
 		misc_deregister(&p->devs[i].misc);
 
 		if (!p->enabled) {
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 24b966d..204a560 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -710,7 +710,7 @@ static int __devinit hpwdt_init_nmi_decoding(struct pci_dev *dev)
 	return 0;
 }
 
-static void __devexit hpwdt_exit_nmi_decoding(void)
+static void hpwdt_exit_nmi_decoding(void)
 {
 	unregister_die_notifier(&die_notifier);
 	if (cru_rom_addr)
@@ -726,7 +726,7 @@ static int __devinit hpwdt_init_nmi_decoding(struct pci_dev *dev)
 	return 0;
 }
 
-static void __devexit hpwdt_exit_nmi_decoding(void)
+static void hpwdt_exit_nmi_decoding(void)
 {
 }
 #endif /* CONFIG_HPWDT_NMI_DECODING */
diff --git a/drivers/watchdog/sch311x_wdt.c b/drivers/watchdog/sch311x_wdt.c
index 0461858..b61ab1c 100644
--- a/drivers/watchdog/sch311x_wdt.c
+++ b/drivers/watchdog/sch311x_wdt.c
@@ -508,7 +508,7 @@ static int __init sch311x_detect(int sio_config_port, unsigned short *addr)
 	sch311x_sio_outb(sio_config_port, 0x07, 0x0a);
 
 	/* Check if Logical Device Register is currently active */
-	if (sch311x_sio_inb(sio_config_port, 0x30) && 0x01 == 0)
+	if ((sch311x_sio_inb(sio_config_port, 0x30) & 0x01) == 0)
 		printk(KERN_INFO PFX "Seems that LDN 0x0a is not active...\n");
 
 	/* Get the base address of the runtime registers */
diff --git a/drivers/watchdog/w83697ug_wdt.c b/drivers/watchdog/w83697ug_wdt.c
index a6c12de..df2a64d 100644
--- a/drivers/watchdog/w83697ug_wdt.c
+++ b/drivers/watchdog/w83697ug_wdt.c
@@ -109,7 +109,7 @@ static int w83697ug_select_wd_register(void)
 	outb_p(0x08, WDT_EFDR); /* select logical device 8 (GPIO2) */
 	outb_p(0x30, WDT_EFER); /* select CR30 */
 	c = inb_p(WDT_EFDR);
-	outb_p(c || 0x01, WDT_EFDR); /* set bit 0 to activate GPIO2 */
+	outb_p(c | 0x01, WDT_EFDR); /* set bit 0 to activate GPIO2 */
 
 	return 0;
 }

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

* [GIT PULL REQUEST] watchdog - v2.6.38-rc8
@ 2011-03-09 21:39 Wim Van Sebroeck
  0 siblings, 0 replies; 2+ messages in thread
From: Wim Van Sebroeck @ 2011-03-09 21:39 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, LKML, Jiri Slaby

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/sbc_fitpc2_wdt.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

with these Changes:

Author: Jiri Slaby <jslaby@suse.cz>
Date:   Mon Feb 28 10:16:29 2011 +0100

    watchdog: sbc_fitpc2_wdt, fix crash on systems without DMI_BOARD_NAME
    
    Some systems don't provide DMI_BOARD_NAME in their DMI tables. Avoid
    crash in such situations in fitpc2_wdt_init.
    
    The fix is to check if the dmi_get_system_info return value is NULL.
    
    The oops:
    BUG: unable to handle kernel NULL pointer dereference at           (null)
    IP: [<ffffffff81253ae6>] strstr+0x26/0xa0
    PGD 3966e067 PUD 39605067 PMD 0
    Oops: 0000 [#1] SMP
    last sysfs file: /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map
    CPU 1
    Modules linked in: ...
    Pid: 1748, comm: modprobe Not tainted 2.6.37-22-default #1 /Bochs
    RIP: 0010:[<ffffffff81253ae6>]  [<ffffffff81253ae6>] strstr+0x26/0xa0
    RSP: 0018:ffff88003ad73f18  EFLAGS: 00010206
    RAX: 0000000000000000 RBX: 00000000ffffffed RCX: 00000000ffffffff
    RDX: ffffffffa003f4cc RSI: ffffffffa003f4c2 RDI: 0000000000000000
    ...
    CR2: 0000000000000000 CR3: 000000003b7ac000 CR4: 00000000000006e0
    ...
    Process modprobe (pid: 1748, threadinfo ffff88003ad72000, task ffff88002e6365c0)
    Stack: ...
    Call Trace:
     [<ffffffffa004201f>] fitpc2_wdt_init+0x1f/0x13c [sbc_fitpc2_wdt]
     [<ffffffff810002da>] do_one_initcall+0x3a/0x170
    ...
    Code: f3 c3 0f 1f 00 80 3e 00 53 48 89 f8 74 1b 48 89 f2 0f 1f 40 00 48 83 c2 01 80 3a 00 75 f7 49 89 d0 48 89 f8 49 29 f0 75 02 5b c3 <80> 3f 00 74 0e 0f 1f 44 00 00 48 83 c0 01 80 38 00 75 f7 49 89
    
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

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.

================================================================================
diff --git a/drivers/watchdog/sbc_fitpc2_wdt.c b/drivers/watchdog/sbc_fitpc2_wdt.c
index c7d67e9..7990625 100644
--- a/drivers/watchdog/sbc_fitpc2_wdt.c
+++ b/drivers/watchdog/sbc_fitpc2_wdt.c
@@ -201,11 +201,14 @@ static struct miscdevice fitpc2_wdt_miscdev = {
 static int __init fitpc2_wdt_init(void)
 {
 	int err;
+	const char *brd_name;
 
-	if (!strstr(dmi_get_system_info(DMI_BOARD_NAME), "SBC-FITPC2"))
+	brd_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+	if (!brd_name || !strstr(brd_name, "SBC-FITPC2"))
 		return -ENODEV;
 
-	pr_info("%s found\n", dmi_get_system_info(DMI_BOARD_NAME));
+	pr_info("%s found\n", brd_name);
 
 	if (!request_region(COMMAND_PORT, 1, WATCHDOG_NAME)) {
 		pr_err("I/O address 0x%04x already in use\n", COMMAND_PORT);

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

end of thread, other threads:[~2011-03-14 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-14 10:53 [GIT PULL REQUEST] watchdog - v2.6.38-rc8 Wim Van Sebroeck
  -- strict thread matches above, loose matches on Subject: below --
2011-03-09 21:39 Wim Van Sebroeck

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®