mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
treewide: 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 <gustavoars@kernel.org>
This commit is contained in:
@@ -357,7 +357,7 @@ found:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/*FALLTHROUGH*/
|
||||
fallthrough;
|
||||
default:
|
||||
bridge->driver = &ali_generic_bridge;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ static void kcs_bmc_handle_data(struct kcs_bmc *kcs_bmc)
|
||||
switch (kcs_bmc->phase) {
|
||||
case KCS_PHASE_WRITE_START:
|
||||
kcs_bmc->phase = KCS_PHASE_WRITE_DATA;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
|
||||
case KCS_PHASE_WRITE_DATA:
|
||||
if (kcs_bmc->data_in_idx < KCS_MSG_BUFSIZ) {
|
||||
|
||||
@@ -734,7 +734,7 @@ static long lp_ioctl(struct file *file, unsigned int cmd,
|
||||
ret = lp_set_timeout32(minor, (void __user *)arg);
|
||||
break;
|
||||
}
|
||||
/* fall through - for 64-bit */
|
||||
fallthrough; /* for 64-bit */
|
||||
case LPSETTIMEOUT_NEW:
|
||||
ret = lp_set_timeout64(minor, (void __user *)arg);
|
||||
break;
|
||||
@@ -762,7 +762,7 @@ static long lp_compat_ioctl(struct file *file, unsigned int cmd,
|
||||
ret = lp_set_timeout32(minor, (void __user *)arg);
|
||||
break;
|
||||
}
|
||||
/* fall through - for x32 mode */
|
||||
fallthrough; /* for x32 mode */
|
||||
case LPSETTIMEOUT_NEW:
|
||||
ret = lp_set_timeout64(minor, (void __user *)arg);
|
||||
break;
|
||||
|
||||
@@ -791,7 +791,7 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig)
|
||||
switch (orig) {
|
||||
case SEEK_CUR:
|
||||
offset += file->f_pos;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case SEEK_SET:
|
||||
/* to avoid userland mistaking f_pos=-9 as -EBADF=-9 */
|
||||
if ((unsigned long long)offset >= -MAX_ERRNO) {
|
||||
|
||||
@@ -286,7 +286,7 @@ static long nvram_misc_ioctl(struct file *file, unsigned int cmd,
|
||||
#ifdef CONFIG_PPC
|
||||
case OBSOLETE_PMAC_NVRAM_GET_OFFSET:
|
||||
pr_warn("nvram: Using obsolete PMAC_NVRAM_GET_OFFSET ioctl\n");
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case IOC_NVRAM_GET_OFFSET:
|
||||
ret = -EINVAL;
|
||||
#ifdef CONFIG_PPC_PMAC
|
||||
|
||||
Reference in New Issue
Block a user