mirror of https://gitee.com/openkylin/linux.git
usb: phy: 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: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200707200040.GA4525@embeddedor Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2da3b53c78
commit
4e71e07943
|
@ -331,7 +331,7 @@ static int ab8505_usb_link_status_update(struct ab8500_usb *ab,
|
||||||
switch (lsts) {
|
switch (lsts) {
|
||||||
case USB_LINK_ACA_RID_B_8505:
|
case USB_LINK_ACA_RID_B_8505:
|
||||||
event = UX500_MUSB_RIDB;
|
event = UX500_MUSB_RIDB;
|
||||||
/* Fall through */
|
fallthrough;
|
||||||
case USB_LINK_NOT_CONFIGURED_8505:
|
case USB_LINK_NOT_CONFIGURED_8505:
|
||||||
case USB_LINK_RESERVED0_8505:
|
case USB_LINK_RESERVED0_8505:
|
||||||
case USB_LINK_RESERVED1_8505:
|
case USB_LINK_RESERVED1_8505:
|
||||||
|
@ -352,7 +352,7 @@ static int ab8505_usb_link_status_update(struct ab8500_usb *ab,
|
||||||
|
|
||||||
case USB_LINK_ACA_RID_C_NM_8505:
|
case USB_LINK_ACA_RID_C_NM_8505:
|
||||||
event = UX500_MUSB_RIDC;
|
event = UX500_MUSB_RIDC;
|
||||||
/* Fall through */
|
fallthrough;
|
||||||
case USB_LINK_STD_HOST_NC_8505:
|
case USB_LINK_STD_HOST_NC_8505:
|
||||||
case USB_LINK_STD_HOST_C_NS_8505:
|
case USB_LINK_STD_HOST_C_NS_8505:
|
||||||
case USB_LINK_STD_HOST_C_S_8505:
|
case USB_LINK_STD_HOST_C_S_8505:
|
||||||
|
@ -371,7 +371,7 @@ static int ab8505_usb_link_status_update(struct ab8500_usb *ab,
|
||||||
case USB_LINK_ACA_RID_A_8505:
|
case USB_LINK_ACA_RID_A_8505:
|
||||||
case USB_LINK_ACA_DOCK_CHGR_8505:
|
case USB_LINK_ACA_DOCK_CHGR_8505:
|
||||||
event = UX500_MUSB_RIDA;
|
event = UX500_MUSB_RIDA;
|
||||||
/* Fall through */
|
fallthrough;
|
||||||
case USB_LINK_HM_IDGND_8505:
|
case USB_LINK_HM_IDGND_8505:
|
||||||
if (ab->mode == USB_IDLE) {
|
if (ab->mode == USB_IDLE) {
|
||||||
ab->mode = USB_HOST;
|
ab->mode = USB_HOST;
|
||||||
|
@ -444,7 +444,7 @@ static int ab8500_usb_link_status_update(struct ab8500_usb *ab,
|
||||||
switch (lsts) {
|
switch (lsts) {
|
||||||
case USB_LINK_ACA_RID_B_8500:
|
case USB_LINK_ACA_RID_B_8500:
|
||||||
event = UX500_MUSB_RIDB;
|
event = UX500_MUSB_RIDB;
|
||||||
/* Fall through */
|
fallthrough;
|
||||||
case USB_LINK_NOT_CONFIGURED_8500:
|
case USB_LINK_NOT_CONFIGURED_8500:
|
||||||
case USB_LINK_NOT_VALID_LINK_8500:
|
case USB_LINK_NOT_VALID_LINK_8500:
|
||||||
ab->mode = USB_IDLE;
|
ab->mode = USB_IDLE;
|
||||||
|
@ -461,7 +461,7 @@ static int ab8500_usb_link_status_update(struct ab8500_usb *ab,
|
||||||
case USB_LINK_ACA_RID_C_HS_8500:
|
case USB_LINK_ACA_RID_C_HS_8500:
|
||||||
case USB_LINK_ACA_RID_C_HS_CHIRP_8500:
|
case USB_LINK_ACA_RID_C_HS_CHIRP_8500:
|
||||||
event = UX500_MUSB_RIDC;
|
event = UX500_MUSB_RIDC;
|
||||||
/* Fall through */
|
fallthrough;
|
||||||
case USB_LINK_STD_HOST_NC_8500:
|
case USB_LINK_STD_HOST_NC_8500:
|
||||||
case USB_LINK_STD_HOST_C_NS_8500:
|
case USB_LINK_STD_HOST_C_NS_8500:
|
||||||
case USB_LINK_STD_HOST_C_S_8500:
|
case USB_LINK_STD_HOST_C_S_8500:
|
||||||
|
@ -481,7 +481,7 @@ static int ab8500_usb_link_status_update(struct ab8500_usb *ab,
|
||||||
|
|
||||||
case USB_LINK_ACA_RID_A_8500:
|
case USB_LINK_ACA_RID_A_8500:
|
||||||
event = UX500_MUSB_RIDA;
|
event = UX500_MUSB_RIDA;
|
||||||
/* Fall through */
|
fallthrough;
|
||||||
case USB_LINK_HM_IDGND_8500:
|
case USB_LINK_HM_IDGND_8500:
|
||||||
if (ab->mode == USB_IDLE) {
|
if (ab->mode == USB_IDLE) {
|
||||||
ab->mode = USB_HOST;
|
ab->mode = USB_HOST;
|
||||||
|
|
|
@ -911,10 +911,10 @@ int usb_otg_start(struct platform_device *pdev)
|
||||||
break;
|
break;
|
||||||
case FSL_USB2_PHY_UTMI_WIDE:
|
case FSL_USB2_PHY_UTMI_WIDE:
|
||||||
temp |= PORTSC_PTW_16BIT;
|
temp |= PORTSC_PTW_16BIT;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case FSL_USB2_PHY_UTMI:
|
case FSL_USB2_PHY_UTMI:
|
||||||
temp |= PORTSC_PTS_UTMI;
|
temp |= PORTSC_PTS_UTMI;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -581,11 +581,11 @@ static void otg_update_isp(struct isp1301 *isp)
|
||||||
/* HNP failed for some reason (A_AIDL_BDIS timeout) */
|
/* HNP failed for some reason (A_AIDL_BDIS timeout) */
|
||||||
notresponding(isp);
|
notresponding(isp);
|
||||||
|
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
case OTG_STATE_A_VBUS_ERR:
|
case OTG_STATE_A_VBUS_ERR:
|
||||||
isp->phy.otg->state = OTG_STATE_A_WAIT_VFALL;
|
isp->phy.otg->state = OTG_STATE_A_WAIT_VFALL;
|
||||||
pr_debug(" --> a_wait_vfall\n");
|
pr_debug(" --> a_wait_vfall\n");
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
case OTG_STATE_A_WAIT_VFALL:
|
case OTG_STATE_A_WAIT_VFALL:
|
||||||
/* FIXME usbcore thinks port power is still on ... */
|
/* FIXME usbcore thinks port power is still on ... */
|
||||||
clr |= OTG1_VBUS_DRV;
|
clr |= OTG1_VBUS_DRV;
|
||||||
|
@ -595,7 +595,7 @@ static void otg_update_isp(struct isp1301 *isp)
|
||||||
isp->phy.otg->state = OTG_STATE_A_WAIT_VRISE;
|
isp->phy.otg->state = OTG_STATE_A_WAIT_VRISE;
|
||||||
pr_debug(" --> a_wait_vrise\n");
|
pr_debug(" --> a_wait_vrise\n");
|
||||||
}
|
}
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
toggle(OTG_DRV_VBUS, OTG1_VBUS_DRV);
|
toggle(OTG_DRV_VBUS, OTG1_VBUS_DRV);
|
||||||
}
|
}
|
||||||
|
@ -945,10 +945,10 @@ static void isp_update_otg(struct isp1301 *isp, u8 stat)
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case OTG_STATE_B_IDLE:
|
case OTG_STATE_B_IDLE:
|
||||||
a_idle(isp, "idle");
|
a_idle(isp, "idle");
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
case OTG_STATE_A_IDLE:
|
case OTG_STATE_A_IDLE:
|
||||||
enable_vbus_source(isp);
|
enable_vbus_source(isp);
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
case OTG_STATE_A_WAIT_VRISE:
|
case OTG_STATE_A_WAIT_VRISE:
|
||||||
/* we skip over OTG_STATE_A_WAIT_BCON, since
|
/* we skip over OTG_STATE_A_WAIT_BCON, since
|
||||||
* the HC will transition to A_HOST (or
|
* the HC will transition to A_HOST (or
|
||||||
|
@ -1032,12 +1032,12 @@ static void isp_update_otg(struct isp1301 *isp, u8 stat)
|
||||||
OTG1_DP_PULLUP);
|
OTG1_DP_PULLUP);
|
||||||
dump_regs(isp, __func__);
|
dump_regs(isp, __func__);
|
||||||
#endif
|
#endif
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
case OTG_STATE_B_SRP_INIT:
|
case OTG_STATE_B_SRP_INIT:
|
||||||
b_idle(isp, __func__);
|
b_idle(isp, __func__);
|
||||||
l = omap_readl(OTG_CTRL) & OTG_XCEIV_OUTPUTS;
|
l = omap_readl(OTG_CTRL) & OTG_XCEIV_OUTPUTS;
|
||||||
omap_writel(l, OTG_CTRL);
|
omap_writel(l, OTG_CTRL);
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
case OTG_STATE_B_IDLE:
|
case OTG_STATE_B_IDLE:
|
||||||
if (otg->gadget && (isp_bstat & OTG_B_SESS_VLD)) {
|
if (otg->gadget && (isp_bstat & OTG_B_SESS_VLD)) {
|
||||||
#ifdef CONFIG_USB_OTG
|
#ifdef CONFIG_USB_OTG
|
||||||
|
|
|
@ -334,7 +334,7 @@ static void mv_otg_update_state(struct mv_otg *mvotg)
|
||||||
switch (old_state) {
|
switch (old_state) {
|
||||||
case OTG_STATE_UNDEFINED:
|
case OTG_STATE_UNDEFINED:
|
||||||
mvotg->phy.otg->state = OTG_STATE_B_IDLE;
|
mvotg->phy.otg->state = OTG_STATE_B_IDLE;
|
||||||
/* FALL THROUGH */
|
fallthrough;
|
||||||
case OTG_STATE_B_IDLE:
|
case OTG_STATE_B_IDLE:
|
||||||
if (otg_ctrl->id == 0)
|
if (otg_ctrl->id == 0)
|
||||||
mvotg->phy.otg->state = OTG_STATE_A_IDLE;
|
mvotg->phy.otg->state = OTG_STATE_A_IDLE;
|
||||||
|
|
Loading…
Reference in New Issue