public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: Joe Perches <joe@perches.com>, gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] staging: rtl8188eu: change return type of rtw_hal_xmit()
Date: Sun, 28 Oct 2018 09:57:55 +0100	[thread overview]
Message-ID: <eb1c3902-e282-2fe6-63dc-23795f2e2e6f@gmail.com> (raw)
In-Reply-To: <8fbc5be59d4d6d0216db2e9c47a74c45e709e1fd.camel@perches.com>

On 10/28/18 1:08 AM, Joe Perches wrote:
> On Sat, 2018-10-27 at 15:57 -0700, Joe Perches wrote:
>> On Sat, 2018-10-27 at 22:28 +0200, Michael Straube wrote:
>>> The function rtw_hal_xmit() returns true or false.
>>> Change the return type from s32 to bool.
>> []
>>> diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
>> []
>>> @@ -598,7 +598,7 @@ bool rtl8188eu_xmitframe_complete(struct adapter *adapt,
>>>    *	true	dump packet directly
>>>    *	false	enqueue packet
>>>    */
>>> -s32 rtw_hal_xmit(struct adapter *adapt, struct xmit_frame *pxmitframe)
>>> +bool rtw_hal_xmit(struct adapter *adapt, struct xmit_frame *pxmitframe)
>>>   {
>>>   	s32 res;
>>
>> Does "s32 res" need changing to bool too?
> 
> Perhaps all the functions regardless of types
> with returns of only _SUCCESS and _FAIL could be
> converted to bool.
> 

"s32 res" is not used for return value, so it does not need changing to bool.
But it could be converted too.

I'll keep that, and converting functions only returning _SUCCESS and _FAIL to
bool, in mind for future patches. Thanks.

Perhaps _SUCCESS / _FAIL could be replaced with true / false throughout the
driver to get rid of the defines? Or is that a bad idea?

Regards,
Michael



  reply	other threads:[~2018-10-28  8:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-27 20:28 [PATCH 1/5] staging: rtl8188eu: remove unnecessary ternary operator Michael Straube
2018-10-27 20:28 ` [PATCH 2/5] staging: rtl8188eu: change type of a struct field Michael Straube
2018-10-27 20:28 ` [PATCH 3/5] staging: rtl8188eu: change return type of rtl8188eu_xmitframe_complete() Michael Straube
2018-10-27 20:28 ` [PATCH 4/5] staging: rtl8188eu: change return type of rtw_hal_xmit() Michael Straube
2018-10-27 22:57   ` Joe Perches
2018-10-27 23:08     ` Joe Perches
2018-10-28  8:57       ` Michael Straube [this message]
2018-10-27 20:28 ` [PATCH 5/5] staging: rtl8188eu: cleanup long line in rtw_hal_xmit() Michael Straube

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=eb1c3902-e282-2fe6-63dc-23795f2e2e6f@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /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