lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b790e108-fa37-28bf-15c2-885ddb05572e@gmail.com>
Date:   Tue, 9 Nov 2021 15:23:57 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     cgel.zte@...il.com, Larry.Finger@...inger.net,
        phil@...lpotter.co.uk, gregkh@...uxfoundation.org,
        straube.linux@...il.com, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org,
        Changcheng Deng <deng.changcheng@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] staging: r8188eu: remove unneeded variable

On 11/9/21 15:18, Dan Carpenter wrote:
>> >   static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
>> >   {
>> > -	int res = _SUCCESS;
>> > -
>> >   	/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
>> >   	atomic_set(&pevtpriv->event_seq, 0);
>> >   	pevtpriv->evt_done_cnt = 0;
>> > @@ -72,7 +70,7 @@ static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
>> >   	pevtpriv->c2h_wk_alive = false;
>> >   	pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
>> > -	return res;
>> > +	return _SUCCESS;
>> >   }
>> 
>> Shouldn't it return just void then?
>> 
> 
> There is only one caller.  It should be folded into the caller and
> deleted.  Then the caller could be made void.
> 

Ah, I see. I've overlooked, that this function name starts with _ and 
the wrapper just does `return _rtw_init_evt_priv();`. Interesting 
approach...

I agree, that _rtw_init_evt_priv should be just renamed to 
rtw_init_evt_priv() and the old wrapper should be just removed



With regards,
Pavel Skripkin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ