On 31/08/2007, Satyam Sharma <satyam@infradead.org> wrote: ...Arrgh, I messed that one up real good... Thank you for your keen eye Satyam :-) It's not the common case, but this is certainly not the only place in the kernel where we do it. Yeah, I should... Here's an updated patch that actually works as intended. In the iforce driver we currently get this warning drivers/input/joystick/iforce/iforce-packets.c: In function 'iforce_get_id_packet': drivers/input/joystick/iforce/iforce-packets.c:249: warning: unused variable 'status' if CONFIG_JOYSTICK_IFORCE_USB is not defined. The warning is easy to avoid by simply moving the variable inside the only case in the switch that actually use it. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> --- diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 3154ccd..2731057 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -246,13 +246,12 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data) int iforce_get_id_packet(struct iforce *iforce, char *packet) { - int status; - switch (iforce->bus) { - case IFORCE_USB: - + case IFORCE_USB: { #ifdef CONFIG_JOYSTICK_IFORCE_USB + int status; + iforce->cr.bRequest = packet[0]; iforce->ctrl->dev = iforce->usbdev; @@ -270,6 +269,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) usb_unlink_urb(iforce->ctrl); return -1; } + } #else dbg("iforce_get_id_packet: iforce->bus = USB!"); #endif -
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Andi Kleen | [PATCH x86] [0/16] Various i386/x86-64 changes |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Arjan van de Ven | Re: [GIT]: Networking |
