login
Header Space

 
 

Re: WARNING: at drivers/base/sys.c:183 sysdev_driver_register+0x7a

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rafael J. Wysocki <rjw@...>
Cc: Ingo Molnar <mingo@...>, Len Brown <lenb@...>, <linux-kernel@...>
Date: Wednesday, May 7, 2008 - 2:16 am

On Wed, 2008-05-07 at 00:39 +0200, Rafael J. Wysocki wrote:

No, it was fixed by:

commit db176c6ed8974fae94328ad5ac9e70b094ff22fd
Author: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Date:   Wed May 7 04:02:53 2008 +0900

    Fix bogus warning in sysdev_driver_register()
    
            if ((drv->entry.next != drv->entry.prev) ||
                (drv->entry.next != NULL)) {
    
    warns list_empty(&drv->entry).
    
    Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
    Cc: Greg KH <gregkh@suse.de>
    Cc: Len Brown <lenb@kernel.org>
    [ Version 2 totally redone based on suggestions from Linus & Greg ]
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 4fbb56b..358bb0b 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -175,8 +175,7 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv)
 	}
 
 	/* Check whether this driver has already been added to a class. */
-	if ((drv->entry.next != drv->entry.prev) ||
-	    (drv->entry.next != NULL)) {
+	if (drv->entry.next && !list_empty(&drv->entry)) {
 		printk(KERN_WARNING "sysdev: class %s: driver (%p) has already"
 			" been registered to a class, something is wrong, but "
 			"will forge on!\n", cls->name, drv);




--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: WARNING: at drivers/base/sys.c:183 sysdev_driver_registe..., Mike Galbraith, (Wed May 7, 2:16 am)
speck-geostationary