lkml.org 
[lkml]   [2023]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 05/12] staging: r8188eu: replace switch with if
    Date
    The switch statement in usb_write_port_complete has only one single case.
    Replace it with an if statement.

    Signed-off-by: Martin Kaiser <martin@kaiser.cx>
    ---
    drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 7 +------
    1 file changed, 1 insertion(+), 6 deletions(-)

    diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
    index 6fe5a4230291..257bcf496012 100644
    --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
    +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
    @@ -41,13 +41,8 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
    struct adapter *padapter = pxmitbuf->padapter;
    struct xmit_priv *pxmitpriv = &padapter->xmitpriv;

    - switch (pxmitbuf->flags) {
    - case HIGH_QUEUE_INX:
    + if (pxmitbuf->flags == HIGH_QUEUE_INX)
    rtw_chk_hi_queue_cmd(padapter);
    - break;
    - default:
    - break;
    - }

    if (padapter->bSurpriseRemoved || padapter->bDriverStopped ||
    padapter->bWritePortCancel)
    --
    2.30.2
    \
     
     \ /
      Last update: 2023-03-26 23:33    [W:3.077 / U:0.268 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site