From 1771e9fb67e2d6df29acb0ee8349c3833a212754 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Sat, 25 Jul 2020 00:10:14 +0200 Subject: media: 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/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/cec/core/cec-adap.c | 2 +- drivers/media/cec/core/cec-pin.c | 6 +++--- drivers/media/cec/usb/pulse8/pulse8-cec.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/media/cec') diff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c index 4efe8014445e..80fd5165f658 100644 --- a/drivers/media/cec/core/cec-adap.c +++ b/drivers/media/cec/core/cec-adap.c @@ -1928,7 +1928,7 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg, */ if (!adap->passthrough && from_unregistered) return 0; - /* Fall through */ + fallthrough; case CEC_MSG_GIVE_DEVICE_VENDOR_ID: case CEC_MSG_GIVE_FEATURES: case CEC_MSG_GIVE_PHYSICAL_ADDR: diff --git a/drivers/media/cec/core/cec-pin.c b/drivers/media/cec/core/cec-pin.c index 660fe111f540..f006bd8eec63 100644 --- a/drivers/media/cec/core/cec-pin.c +++ b/drivers/media/cec/core/cec-pin.c @@ -417,7 +417,7 @@ static void cec_pin_tx_states(struct cec_pin *pin, ktime_t ts) wake_up_interruptible(&pin->kthread_waitq); break; } - /* fall through */ + fallthrough; case CEC_ST_TX_DATA_BIT_0_HIGH: case CEC_ST_TX_DATA_BIT_0_HIGH_SHORT: case CEC_ST_TX_DATA_BIT_0_HIGH_LONG: @@ -445,7 +445,7 @@ static void cec_pin_tx_states(struct cec_pin *pin, ktime_t ts) wake_up_interruptible(&pin->kthread_waitq); break; } - /* fall through */ + fallthrough; case CEC_ST_TX_DATA_BIT_HIGH_CUSTOM: if (tx_last_bit(pin)) { /* Error Injection: just stop sending after this bit */ @@ -459,7 +459,7 @@ static void cec_pin_tx_states(struct cec_pin *pin, ktime_t ts) break; } pin->tx_bit++; - /* fall through */ + fallthrough; case CEC_ST_TX_START_BIT_HIGH: case CEC_ST_TX_START_BIT_HIGH_SHORT: case CEC_ST_TX_START_BIT_HIGH_LONG: diff --git a/drivers/media/cec/usb/pulse8/pulse8-cec.c b/drivers/media/cec/usb/pulse8/pulse8-cec.c index beae6aa12638..e4d8446b87da 100644 --- a/drivers/media/cec/usb/pulse8/pulse8-cec.c +++ b/drivers/media/cec/usb/pulse8/pulse8-cec.c @@ -389,7 +389,7 @@ static irqreturn_t pulse8_interrupt(struct serio *serio, unsigned char data, pulse8->new_rx_msg[0] = pulse8->buf[1]; break; } - /* fall through */ + fallthrough; case MSGCODE_FRAME_DATA: if (pulse8->new_rx_msg_len < CEC_MAX_MSG_SIZE) pulse8->new_rx_msg[pulse8->new_rx_msg_len++] = -- cgit v1.2.3-59-g8ed1b