From: Pavel Skripkin <paskripkin@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: cgel.zte@gmail.com, Larry.Finger@lwfinger.net,
phil@philpotter.co.uk, gregkh@linuxfoundation.org,
straube.linux@gmail.com, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org,
Changcheng Deng <deng.changcheng@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] staging: r8188eu: remove unneeded variable
Date: Tue, 9 Nov 2021 15:23:57 +0300 [thread overview]
Message-ID: <b790e108-fa37-28bf-15c2-885ddb05572e@gmail.com> (raw)
In-Reply-To: <20211109121823.GJ2001@kadam>
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
next prev parent reply other threads:[~2021-11-09 12:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 11:53 cgel.zte
2021-11-09 12:09 ` Pavel Skripkin
2021-11-09 12:18 ` Dan Carpenter
2021-11-09 12:23 ` Pavel Skripkin [this message]
2021-11-10 8:12 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2021-11-12 13:18 cgel.zte
2021-11-12 16:31 ` Pavel Skripkin
2021-11-10 12:22 cgel.zte
2021-11-13 11:14 ` Greg KH
2021-11-02 7:32 cgel.zte
2021-11-02 8:23 ` Pavel Skripkin
2021-11-05 13:41 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b790e108-fa37-28bf-15c2-885ddb05572e@gmail.com \
--to=paskripkin@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=cgel.zte@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=deng.changcheng@zte.com.cn \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
--cc=zealci@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome