[PATCH -mm] drivers/usb/serial/bus.c: Fix incompatible pointer type warning

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linux Kernel Mailing List <linux-kernel@...>
Cc: Greg Kroah-Hartman <greg@...>, <linux-usb-devel@...>
Date: Sunday, September 2, 2007 - 4:12 pm

drivers/usb/serial/bus.c: In function $B!F(Jusb_serial_bus_deregister$B!G(J:
drivers/usb/serial/bus.c:185:
warning: passing argument 1 of $B!F(Jfree_dynids$B!G(J from incompatible pointer type

Above build warning comes when CONFIG_HOTPLUG=n because argument of
free_dynids() in serial/bus.c is a struct usb_serial_driver, not a
struct usb_driver. This is not a runtime bug, because the function
is an empty stub and never dereferences the passed pointer anyway.

Signed-off-by: Satyam Sharma <satyam@infradead.org>

---

 drivers/usb/serial/bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.23-rc4-mm1/drivers/usb/serial/bus.c~fix	2007-09-02 20:33:18.000000000 +0530
+++ linux-2.6.23-rc4-mm1/drivers/usb/serial/bus.c	2007-09-02 20:39:06.000000000 +0530
@@ -154,7 +154,7 @@ static void free_dynids(struct usb_seria
 static struct driver_attribute drv_attrs[] = {
 	__ATTR_NULL,
 };
-static inline void free_dynids(struct usb_driver *drv)
+static inline void free_dynids(struct usb_serial_driver *drv)
 {
 }
 #endif
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[-mm patchset] War on warnings, Satyam Sharma, (Sun Sep 2, 4:02 pm)
[PATCH -mm] drivers/usb/serial/bus.c: Fix incompatible point..., Satyam Sharma, (Sun Sep 2, 4:12 pm)
[PATCH -mm] net/wireless/sysfs.c: Shut up build warning, Satyam Sharma, (Sun Sep 2, 4:11 pm)
[PATCH -mm] sisusbvga: Fix bug and build warnings, Satyam Sharma, (Sun Sep 2, 4:07 pm)
Re: [PATCH -mm] sisusbvga: Fix bug and build warnings, Satyam Sharma, (Sun Sep 2, 4:32 pm)
Re: [-mm patchset] War on warnings, Jesper Juhl, (Sun Sep 2, 4:04 pm)
Re: [-mm patchset] War on warnings, Satyam Sharma, (Sun Sep 2, 4:39 pm)