Commit 74b76256 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Johan Hovold

USB: serial: 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-throughSigned-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 6d0bdc42
...@@ -1046,7 +1046,7 @@ static void cypress_read_int_callback(struct urb *urb) ...@@ -1046,7 +1046,7 @@ static void cypress_read_int_callback(struct urb *urb)
return; return;
case -EPIPE: case -EPIPE:
/* Can't call usb_clear_halt while in_interrupt */ /* Can't call usb_clear_halt while in_interrupt */
/* FALLS THROUGH */ fallthrough;
default: default:
/* something ugly is going on... */ /* something ugly is going on... */
dev_err(dev, "%s - unexpected nonzero read status received: %d\n", dev_err(dev, "%s - unexpected nonzero read status received: %d\n",
...@@ -1195,7 +1195,7 @@ static void cypress_write_int_callback(struct urb *urb) ...@@ -1195,7 +1195,7 @@ static void cypress_write_int_callback(struct urb *urb)
return; return;
case -EPIPE: case -EPIPE:
/* Cannot call usb_clear_halt while in_interrupt */ /* Cannot call usb_clear_halt while in_interrupt */
/* FALLTHROUGH */ fallthrough;
default: default:
dev_err(dev, "%s - unexpected nonzero write status received: %d\n", dev_err(dev, "%s - unexpected nonzero write status received: %d\n",
__func__, status); __func__, status);
......
...@@ -1752,7 +1752,7 @@ static void process_rcvd_data(struct edgeport_serial *edge_serial, ...@@ -1752,7 +1752,7 @@ static void process_rcvd_data(struct edgeport_serial *edge_serial,
edge_serial->rxState = EXPECT_HDR2; edge_serial->rxState = EXPECT_HDR2;
break; break;
} }
/* Fall through */ fallthrough;
case EXPECT_HDR2: case EXPECT_HDR2:
edge_serial->rxHeader2 = *buffer; edge_serial->rxHeader2 = *buffer;
++buffer; ++buffer;
...@@ -1804,7 +1804,7 @@ static void process_rcvd_data(struct edgeport_serial *edge_serial, ...@@ -1804,7 +1804,7 @@ static void process_rcvd_data(struct edgeport_serial *edge_serial,
edge_serial->rxState = EXPECT_DATA; edge_serial->rxState = EXPECT_DATA;
break; break;
} }
/* Fall through */ fallthrough;
case EXPECT_DATA: /* Expect data */ case EXPECT_DATA: /* Expect data */
if (bufferLength < edge_serial->rxBytesRemaining) { if (bufferLength < edge_serial->rxBytesRemaining) {
rxLen = bufferLength; rxLen = bufferLength;
......
...@@ -499,7 +499,7 @@ static void kobil_set_termios(struct tty_struct *tty, ...@@ -499,7 +499,7 @@ static void kobil_set_termios(struct tty_struct *tty,
break; break;
default: default:
speed = 9600; speed = 9600;
/* fall through */ fallthrough;
case 9600: case 9600:
urb_val = SUSBCR_SBR_9600; urb_val = SUSBCR_SBR_9600;
break; break;
......
...@@ -332,7 +332,7 @@ static void upd78f0730_set_termios(struct tty_struct *tty, ...@@ -332,7 +332,7 @@ static void upd78f0730_set_termios(struct tty_struct *tty,
tty->termios.c_cflag &= ~CSIZE; tty->termios.c_cflag &= ~CSIZE;
tty->termios.c_cflag |= CS8; tty->termios.c_cflag |= CS8;
dev_warn(dev, "data size is not supported, using 8 bits\n"); dev_warn(dev, "data size is not supported, using 8 bits\n");
/* fall through */ fallthrough;
case CS8: case CS8:
request.params |= UPD78F0730_DATA_SIZE_8_BITS; request.params |= UPD78F0730_DATA_SIZE_8_BITS;
dev_dbg(dev, "%s - 8 data bits\n", __func__); dev_dbg(dev, "%s - 8 data bits\n", __func__);
......
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