public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: kbuild test robot <lkp@intel.com>,
	Amitkumar Karwar <akarwar@marvell.com>
Cc: kbuild-all@01.org, linux-bluetooth@vger.kernel.org,
	Nishant Sarmukadam <nishants@marvell.com>,
	linux-kernel@vger.kernel.org, Cathy Luo <cluo@marvell.com>,
	marcel@holtmann.org, Ganapathi Bhat <gbhat@marvell.com>
Subject: Re: [PATCH] Bluetooth: hci_uart: fix boolreturn.cocci warnings
Date: Mon, 15 Feb 2016 09:09:38 -0800	[thread overview]
Message-ID: <1455556178.4046.14.camel@perches.com> (raw)
In-Reply-To: <20160215162557.GA65463@lkp-hsx03>

On Tue, 2016-02-16 at 00:25 +0800, kbuild test robot wrote:
> drivers/bluetooth/hci_mrvl.c:411:9-10: WARNING: return of 0/1 in
> function 'mrvl_fw_loaded' with return type bool
> 
>  Return statements in functions returning bool should use
>  true/false instead of 1/0.
> Generated by: scripts/coccinelle/misc/boolreturn.cocci
> 
> CC: Ganapathi Bhat <gbhat@marvell.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
> 
>  hci_mrvl.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/drivers/bluetooth/hci_mrvl.c
> +++ b/drivers/bluetooth/hci_mrvl.c
> @@ -408,9 +408,9 @@ static bool mrvl_fw_loaded(struct hci_ua
>  	struct fw_data *fw_data = mrvl->fwdata;
>  
>  	if ((get_cts(hu->tty)) || (fw_data->fw_loaded))
> -		return 1;
> +		return true;
>  	else
> -		return 0;
> +		return false;
>  }

Nicer might be

	return get_cts(hu->tty) || fw_data->fw_loaded;
 
>  /* Set the baud rate */

  reply	other threads:[~2016-02-15 17:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15 15:29 [PATCH] Bluetooth: hci_uart: Support firmware download for Marvell Amitkumar Karwar
2016-02-15 16:25 ` kbuild test robot
2016-02-15 16:25 ` [PATCH] Bluetooth: hci_uart: fix boolreturn.cocci warnings kbuild test robot
2016-02-15 17:09   ` Joe Perches [this message]
2016-02-15 16:59 ` [PATCH] Bluetooth: hci_uart: Support firmware download for Marvell kbuild test robot
2016-02-15 19:54 ` kbuild test robot

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=1455556178.4046.14.camel@perches.com \
    --to=joe@perches.com \
    --cc=akarwar@marvell.com \
    --cc=cluo@marvell.com \
    --cc=gbhat@marvell.com \
    --cc=kbuild-all@01.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=marcel@holtmann.org \
    --cc=nishants@marvell.com \
    /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