Commit d735b13f authored by Jan Kiszka's avatar Jan Kiszka

cobalt/posix: Address -Wimplicit-fallthrough

A compatible keyword is "fallthrough", use that and add it one missing
spot in cobalt_sched_policy_param. Doesn't make all gcc versions happy
yet, but that's a compiler issue. At least gcc-9 is fine.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 00e5e030
......@@ -392,7 +392,7 @@ int sys32_put_siginfo(void __user *u_si, const struct siginfo *si,
case SI_QUEUE:
case SI_MESGQ:
ret |= __xn_put_user(ptr_to_compat(si->si_ptr), &u_p->si_ptr);
/* falldown wanted. */
/* fallthrough */
case SI_USER:
ret |= __xn_put_user(si->si_pid, &u_p->si_pid);
ret |= __xn_put_user(si->si_uid, &u_p->si_uid);
......
......@@ -58,6 +58,7 @@ cobalt_sched_policy_param(union xnsched_policy_param *param,
* levels. Otherwise, SCHED_NORMAL is scheduled by
* xnsched_class_rt at priority level #0.
*/
/* fallthrough */
case SCHED_WEAK:
#ifdef CONFIG_XENO_OPT_SCHED_WEAK
if (prio < XNSCHED_WEAK_MIN_PRIO ||
......@@ -75,7 +76,7 @@ cobalt_sched_policy_param(union xnsched_policy_param *param,
tslice = ts2ns(&param_ex->sched_rr_quantum);
if (tslice == XN_INFINITE && tslice_r)
tslice = *tslice_r;
/* falldown wanted */
/* fallthrough */
case SCHED_FIFO:
if (prio < XNSCHED_FIFO_MIN_PRIO ||
prio > XNSCHED_FIFO_MAX_PRIO)
......@@ -248,7 +249,7 @@ int set_tp_config(int cpu, union sched_config *config, size_t len)
case sched_tp_install:
if (config->tp.nr_windows > 0)
break;
/* Fallback wanted. */
/* fallthrough */
case sched_tp_uninstall:
gps = NULL;
goto set_schedule;
......
......@@ -234,7 +234,7 @@ static int signal_put_siginfo(void __user *u_si, const struct siginfo *si,
case SI_QUEUE:
case SI_MESGQ:
ret |= __xn_put_user(si->si_ptr, &u_p->si_ptr);
/* falldown wanted. */
/* fallthrough */
case SI_USER:
ret |= __xn_put_user(si->si_pid, &u_p->si_pid);
ret |= __xn_put_user(si->si_uid, &u_p->si_uid);
......
......@@ -49,7 +49,7 @@ void cobalt_copy_siginfo(int code,
case SI_QUEUE:
case SI_MESGQ:
dst->si_value = src->si_value;
/* falldown wanted. */
/* fallthrough */
case SI_USER:
dst->si_pid = src->si_pid;
dst->si_uid = src->si_uid;
......
......@@ -374,7 +374,7 @@ int rtcan_raw_ioctl_dev(struct rtdm_fd *fd, int request, void *arg)
case SIOCGCANBAUDRATE:
case SIOCGCANCUSTOMBITTIME:
get = 1;
/* Falldown wanted. */
/* fallthrough */
case SIOCSCANMODE:
case SIOCSCANCTRLMODE:
case SIOCSCANBAUDRATE:
......
......@@ -142,6 +142,7 @@ static void rtcan_peak_pci_del_chan(struct rtcan_device *dev,
printk("Removing %s %s device %s\n",
peak_pci_board_name, dev->ctrl_name, dev->name);
rtcan_sja1000_unregister(dev);
/* fallthrough */
case 5:
pita_icr_high = readw(board->conf_addr + PITA_ICR + 2);
if (board->channel == CHANNEL_SLAVE) {
......@@ -150,13 +151,17 @@ static void rtcan_peak_pci_del_chan(struct rtcan_device *dev,
pita_icr_high &= ~0x0002;
}
writew(pita_icr_high, board->conf_addr + PITA_ICR + 2);
/* fallthrough */
case 4:
iounmap((void *)board->base_addr);
/* fallthrough */
case 3:
if (board->channel != CHANNEL_SLAVE)
iounmap((void *)board->conf_addr);
/* fallthrough */
case 2:
rtcan_dev_free(dev);
/* fallthrough */
case 1:
break;
}
......
......@@ -1032,6 +1032,7 @@ static int bufp_ioctl(struct rtdm_fd *fd,
COMPAT_CASE(_RTIOC_BIND):
if (rtdm_in_rt_context())
return -ENOSYS; /* Try downgrading to NRT */
/* fallthrough */
default:
ret = __bufp_ioctl(fd, request, arg);
}
......
......@@ -915,6 +915,7 @@ static int iddp_ioctl(struct rtdm_fd *fd,
COMPAT_CASE(_RTIOC_BIND):
if (rtdm_in_rt_context())
return -ENOSYS; /* Try downgrading to NRT */
/* fallthrough */
default:
ret = __iddp_ioctl(fd, request, arg);
}
......
......@@ -1078,6 +1078,7 @@ static int xddp_ioctl(struct rtdm_fd *fd,
COMPAT_CASE(_RTIOC_BIND):
if (rtdm_in_rt_context())
return -ENOSYS; /* Try downgrading to NRT */
/* fallthrough */
default:
ret = __xddp_ioctl(fd, request, arg);
}
......
......@@ -126,6 +126,7 @@ e1000_set_phy_type(struct e1000_hw *hw)
hw->phy_type = e1000_phy_igp;
break;
}
/* fallthrough */
case IGP03E1000_E_PHY_ID:
hw->phy_type = e1000_phy_igp_3;
break;
......@@ -139,7 +140,7 @@ e1000_set_phy_type(struct e1000_hw *hw)
hw->phy_type = e1000_phy_gg82563;
break;
}
/* Fall Through */
/* fallthrough */
default:
/* Should never have loaded on this device */
hw->phy_type = e1000_phy_undefined;
......@@ -5869,6 +5870,7 @@ e1000_rar_set(struct e1000_hw *hw,
case e1000_80003es2lan:
if (hw->leave_av_bit_off == TRUE)
break;
/* fallthrough */
default:
/* Indicate to hardware the Address is Valid. */
rar_high |= E1000_RAH_AV;
......
......@@ -607,7 +607,8 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
dev_spec->sgmii_active = true;
break;
}
/* fall through for I2C based SGMII */
/* for I2C based SGMII: */
/* fallthrough */
case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES:
/* read media type from SFP EEPROM */
ret_val = igb_set_sfp_media_type_82575(hw);
......@@ -1669,6 +1670,7 @@ static s32 igb_setup_serdes_link_82575(struct e1000_hw *hw)
case E1000_CTRL_EXT_LINK_MODE_1000BASE_KX:
/* disable PCS autoneg and support parallel detect only */
pcs_autoneg = false;
/* fallthrough */
default:
if (hw->mac.type == e1000_82575 ||
hw->mac.type == e1000_82576) {
......
......@@ -682,6 +682,7 @@ s32 igb_copper_link_setup_m88_gen2(struct e1000_hw *hw)
phy_data |= M88E1000_PSCR_AUTO_X_1000T;
break;
}
/* fallthrough */
case 0:
default:
phy_data |= M88E1000_PSCR_AUTO_X_MODE;
......
......@@ -3550,6 +3550,7 @@ bool igb_has_link(struct igb_adapter *adapter)
case e1000_media_type_copper:
if (!hw->mac.get_link_status)
return true;
/* fallthrough */
case e1000_media_type_internal_serdes:
hw->mac.ops.check_for_link(hw);
link_active = !hw->mac.get_link_status;
......
......@@ -427,6 +427,7 @@ ssize_t rt_udp_recvmsg(struct rtdm_fd *fd, struct user_msghdr *u_msg,
switch (ret) {
default:
ret = -EBADF; /* socket has been closed */
/* fallthrough */
case -EWOULDBLOCK:
case -ETIMEDOUT:
case -EINTR:
......
......@@ -331,6 +331,7 @@ static ssize_t rt_packet_recvmsg(struct rtdm_fd *fd, struct user_msghdr *u_msg,
switch (ret) {
default:
ret = -EBADF; /* socket has been closed */
/* fallthrough */
case -EWOULDBLOCK:
case -ETIMEDOUT:
case -EINTR:
......
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