lkml.org 
[lkml]   [2021]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] staging: r8188eu: os_dep: remove the goto statement
    From
    On 10/31/21 22:17, Saurav Girepunje wrote:
    >
    >
    > On 01/11/21 12:13 am, Pavel Skripkin wrote:
    >> On 10/31/21 21:10, Saurav Girepunje wrote:
    >>> Remove the goto statement from rtw_init_drv_sw(). In this function goto
    >>> can be replace by return statement. As on goto label exit, function
    >>> only return it is not performing any cleanup. Avoiding goto will
    >>> improve the function readability.
    >>>
    >>> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
    >>> ---
    >>>   drivers/staging/r8188eu/os_dep/os_intfs.c | 39 +++++++----------------
    >>>   1 file changed, 12 insertions(+), 27 deletions(-)
    >>>
    >>> diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
    >>> index 1418c9c4916c..4b409479108e 100644
    >>> --- a/drivers/staging/r8188eu/os_dep/os_intfs.c
    >>> +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
    >>> @@ -480,48 +480,34 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
    >>>   {
    >>>       u8    ret8 = _SUCCESS;
    >>>
    >>
    >>
    >> Btw, this variable can be removed completely then. It's used only for:
    >>
    >> ret8 = rtw_init_default_value(padapter);
    >>
    >> with your patch applied, but rtw_init_default_value() always returns _SUCCESS.
    >>
    > I think rtw_init_default_value should return void. It's return value is not useful.


    Sure, but you need to firstly remove
    `ret8 = rtw_init_default_value(padapter);` and then make it return bool
    to not break the build.


    With regards,
    Pavel Skripkin

    \
     
     \ /
      Last update: 2021-10-31 20:25    [W:5.991 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site