Commit 49aecefc authored by matt mooney's avatar matt mooney Committed by Greg Kroah-Hartman

staging: usbip: add break to default case in switch statements

For consistency, a break statement is added to all default cases that
do not jump to a label.
Signed-off-by: default avatarmatt mooney <mfm@muteddisk.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5c6499d8
...@@ -594,7 +594,7 @@ static void stub_rx_pdu(struct usbip_device *ud) ...@@ -594,7 +594,7 @@ static void stub_rx_pdu(struct usbip_device *ud)
/* NOTREACHED */ /* NOTREACHED */
dev_err(dev, "unknown pdu\n"); dev_err(dev, "unknown pdu\n");
usbip_event_add(ud, SDEV_EVENT_ERROR_TCP); usbip_event_add(ud, SDEV_EVENT_ERROR_TCP);
return; break;
} }
} }
......
...@@ -91,6 +91,7 @@ void stub_complete(struct urb *urb) ...@@ -91,6 +91,7 @@ void stub_complete(struct urb *urb)
default: default:
usbip_uinfo("urb completion with non-zero status %d\n", usbip_uinfo("urb completion with non-zero status %d\n",
urb->status); urb->status);
break;
} }
/* link a urb to the queue of tx. */ /* link a urb to the queue of tx. */
......
...@@ -91,6 +91,7 @@ static void usbip_dump_pipe(unsigned int p) ...@@ -91,6 +91,7 @@ static void usbip_dump_pipe(unsigned int p)
break; break;
default: default:
printk(KERN_DEBUG "ERR"); printk(KERN_DEBUG "ERR");
break;
} }
printk(KERN_DEBUG "\n"); printk(KERN_DEBUG "\n");
...@@ -120,6 +121,7 @@ static void usbip_dump_usb_device(struct usb_device *udev) ...@@ -120,6 +121,7 @@ static void usbip_dump_usb_device(struct usb_device *udev)
break; break;
default: default:
printk(KERN_DEBUG " SPD_ERROR"); printk(KERN_DEBUG " SPD_ERROR");
break;
} }
printk(KERN_DEBUG " tt %p, ttport %d", udev->tt, udev->ttport); printk(KERN_DEBUG " tt %p, ttport %d", udev->tt, udev->ttport);
...@@ -187,6 +189,7 @@ static void usbip_dump_request_type(__u8 rt) ...@@ -187,6 +189,7 @@ static void usbip_dump_request_type(__u8 rt)
break; break;
default: default:
printk(KERN_DEBUG "------"); printk(KERN_DEBUG "------");
break;
} }
} }
...@@ -244,6 +247,7 @@ static void usbip_dump_usb_ctrlrequest(struct usb_ctrlrequest *cmd) ...@@ -244,6 +247,7 @@ static void usbip_dump_usb_ctrlrequest(struct usb_ctrlrequest *cmd)
break; break;
default: default:
printk(KERN_DEBUG "REQ(%02X) ", cmd->bRequest); printk(KERN_DEBUG "REQ(%02X) ", cmd->bRequest);
break;
} }
printk(KERN_DEBUG " "); printk(KERN_DEBUG " ");
...@@ -342,7 +346,8 @@ void usbip_dump_header(struct usbip_header *pdu) ...@@ -342,7 +346,8 @@ void usbip_dump_header(struct usbip_header *pdu)
break; break;
default: default:
/* NOT REACHED */ /* NOT REACHED */
usbip_udbg("UNKNOWN\n"); usbip_udbg("unknown command\n");
break;
} }
} }
EXPORT_SYMBOL_GPL(usbip_dump_header); EXPORT_SYMBOL_GPL(usbip_dump_header);
...@@ -537,9 +542,10 @@ void usbip_pack_pdu(struct usbip_header *pdu, struct urb *urb, int cmd, ...@@ -537,9 +542,10 @@ void usbip_pack_pdu(struct usbip_header *pdu, struct urb *urb, int cmd,
usbip_pack_ret_submit(pdu, urb, pack); usbip_pack_ret_submit(pdu, urb, pack);
break; break;
default: default:
/* NOT REACHED */
err("unknown command"); err("unknown command");
/* NOTREACHED */
/* BUG(); */ /* BUG(); */
break;
} }
} }
EXPORT_SYMBOL_GPL(usbip_pack_pdu); EXPORT_SYMBOL_GPL(usbip_pack_pdu);
...@@ -643,9 +649,10 @@ void usbip_header_correct_endian(struct usbip_header *pdu, int send) ...@@ -643,9 +649,10 @@ void usbip_header_correct_endian(struct usbip_header *pdu, int send)
correct_endian_ret_unlink(&pdu->u.ret_unlink, send); correct_endian_ret_unlink(&pdu->u.ret_unlink, send);
break; break;
default: default:
/* NOTREACHED */ /* NOT REACHED */
err("unknown command in pdu header: %d", cmd); err("unknown command in pdu header: %d", cmd);
/* BUG(); */ /* BUG(); */
break;
} }
} }
EXPORT_SYMBOL_GPL(usbip_header_correct_endian); EXPORT_SYMBOL_GPL(usbip_header_correct_endian);
......
...@@ -320,6 +320,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ...@@ -320,6 +320,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
usbip_dbg_vhci_rh(" ClearPortFeature: default %x\n", usbip_dbg_vhci_rh(" ClearPortFeature: default %x\n",
wValue); wValue);
dum->port_status[rhport] &= ~(1 << wValue); dum->port_status[rhport] &= ~(1 << wValue);
break;
} }
break; break;
case GetHubDescriptor: case GetHubDescriptor:
...@@ -451,6 +452,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ...@@ -451,6 +452,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
usbip_dbg_vhci_rh(" SetPortFeature: default %d\n", usbip_dbg_vhci_rh(" SetPortFeature: default %d\n",
wValue); wValue);
dum->port_status[rhport] |= (1 << wValue); dum->port_status[rhport] |= (1 << wValue);
break;
} }
break; break;
......
...@@ -247,10 +247,11 @@ static void vhci_rx_pdu(struct usbip_device *ud) ...@@ -247,10 +247,11 @@ static void vhci_rx_pdu(struct usbip_device *ud)
vhci_recv_ret_unlink(vdev, &pdu); vhci_recv_ret_unlink(vdev, &pdu);
break; break;
default: default:
/* NOTREACHED */ /* NOT REACHED */
usbip_uerr("unknown pdu %u\n", pdu.base.command); usbip_uerr("unknown pdu %u\n", pdu.base.command);
usbip_dump_header(&pdu); usbip_dump_header(&pdu);
usbip_event_add(ud, VDEV_EVENT_ERROR_TCP); usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment