Commit 0d9b6d49 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Greg Kroah-Hartman
Browse files

usb: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through



Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200707195607.GA4198@embeddedor


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4e71e079
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -408,7 +408,7 @@ static ssize_t adsl_state_store(struct device *dev,
		case CXPOLL_STOPPING:
			/* abort stop request */
			instance->poll_state = CXPOLL_POLLING;
			/* fall through */
			fallthrough;
		case CXPOLL_POLLING:
		case CXPOLL_SHUTDOWN:
			/* don't start polling */
@@ -802,7 +802,7 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance,
	case CXPOLL_STOPPING:
		/* abort stop request */
		instance->poll_state = CXPOLL_POLLING;
		/* fall through */
		fallthrough;
	case CXPOLL_POLLING:
	case CXPOLL_SHUTDOWN:
		/* don't start polling */
+2 −2
Original line number Diff line number Diff line
@@ -2815,7 +2815,7 @@ static int cdns3_gadget_udc_start(struct usb_gadget *gadget,
		dev_err(priv_dev->dev,
			"invalid maximum_speed parameter %d\n",
			max_speed);
		/* fall through */
		fallthrough;
	case USB_SPEED_UNKNOWN:
		/* default to superspeed */
		max_speed = USB_SPEED_SUPER;
@@ -3056,7 +3056,7 @@ static int cdns3_gadget_start(struct cdns3 *cdns)
	default:
		dev_err(cdns->dev, "invalid maximum_speed parameter %d\n",
			max_speed);
		/* fall through */
		fallthrough;
	case USB_SPEED_UNKNOWN:
		/* default to superspeed */
		max_speed = USB_SPEED_SUPER;
+1 −1
Original line number Diff line number Diff line
@@ -2282,7 +2282,7 @@ static void usbtmc_interrupt(struct urb *urb)
	case -EOVERFLOW:
		dev_err(dev, "overflow with length %d, actual length is %d\n",
			data->iin_wMaxPacketSize, urb->actual_length);
		/* fall through */
		fallthrough;
	case -ECONNRESET:
	case -ENOENT:
	case -ESHUTDOWN:
+1 −1
Original line number Diff line number Diff line
@@ -427,7 +427,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
			i = maxp & (BIT(12) | BIT(11));
			maxp &= ~i;
		}
		/* fallthrough */
		fallthrough;
	default:
		maxpacket_maxes = high_speed_maxpacket_maxes;
		break;
+4 −4
Original line number Diff line number Diff line
@@ -564,7 +564,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
	case DeviceRequest | USB_REQ_GET_CONFIGURATION:
		tbuf[0] = 1;
		len = 1;
			/* FALLTHROUGH */
		fallthrough;
	case DeviceOutRequest | USB_REQ_SET_CONFIGURATION:
		break;
	case DeviceRequest | USB_REQ_GET_DESCRIPTOR:
@@ -633,7 +633,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
	case DeviceRequest | USB_REQ_GET_INTERFACE:
		tbuf[0] = 0;
		len = 1;
			/* FALLTHROUGH */
		fallthrough;
	case DeviceOutRequest | USB_REQ_SET_INTERFACE:
		break;
	case DeviceOutRequest | USB_REQ_SET_ADDRESS:
@@ -651,7 +651,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
		tbuf[0] = 0;
		tbuf[1] = 0;
		len = 2;
			/* FALLTHROUGH */
		fallthrough;
	case EndpointOutRequest | USB_REQ_CLEAR_FEATURE:
	case EndpointOutRequest | USB_REQ_SET_FEATURE:
		dev_dbg (hcd->self.controller, "no endpoint features yet\n");
@@ -2726,7 +2726,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
	case HCD_USB32:
		rhdev->rx_lanes = 2;
		rhdev->tx_lanes = 2;
		/* fall through */
		fallthrough;
	case HCD_USB31:
		rhdev->speed = USB_SPEED_SUPER_PLUS;
		break;
Loading