Search Linux Wireless

Re: [PATCH] ssb: driver_gige: use true and false for boolean values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 4 Aug 2018 19:04:53 -0500
"Gustavo A. R. Silva" <gustavo@xxxxxxxxxxxxxx> wrote:

> Return statements in functions returning bool should use true or false
> instead of an integer value.
> 
> This code was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>
> ---
>  drivers/ssb/driver_gige.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ssb/driver_gige.c b/drivers/ssb/driver_gige.c
> index e973405..ebee6b0 100644
> --- a/drivers/ssb/driver_gige.c
> +++ b/drivers/ssb/driver_gige.c
> @@ -242,7 +242,7 @@ static int ssb_gige_probe(struct ssb_device *sdev,
>  bool pdev_is_ssb_gige_core(struct pci_dev *pdev)
>  {
>  	if (!pdev->resource[0].name)
> -		return 0;
> +		return false;
>  	return (strcmp(pdev->resource[0].name, SSB_GIGE_MEM_RES_NAME) == 0);
>  }
>  EXPORT_SYMBOL(pdev_is_ssb_gige_core);

Looks good. Thanks.

Reviewed-by: Michael Buesch <m@xxxxxxx>


-- 
Michael

Attachment: pgp7XbZ4AZ43v.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux