[PATCH] firmware: arm_scmi: fix boolconv.cocci warnings

Cristian Marussi cristian.marussi at arm.com
Sun Aug 8 08:07:41 PDT 2021


On Sun, Aug 08, 2021 at 01:31:27AM +0800, kernel test robot wrote:
> From: kernel test robot <lkp at intel.com>
> 
> drivers/firmware/arm_scmi/virtio.c:225:40-45: WARNING: conversion to bool not needed here
> 
>  Remove unneeded conversion to bool
> 
> Semantic patch information:
>  Relational and logical operators evaluate to bool,
>  explicit conversion is overly verbose and unneeded.
> 
> Generated by: scripts/coccinelle/misc/boolconv.cocci
> 
> CC: Igor Skalkin <igor.skalkin at opensynergy.com>
> Reported-by: kernel test robot <lkp at intel.com>
> Signed-off-by: kernel test robot <lkp at intel.com>
> ---
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git for-next/scmi
> head:   1e7cbfaa66d39e78bd24df0c78b55df68176b59e
> commit: 46abe13b5e3db187e52cd0de06c07bbce010726c [23/24] firmware: arm_scmi: Add virtio transport
> :::::: branch date: 2 days ago
> :::::: commit date: 2 days ago
> 
>  virtio.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/firmware/arm_scmi/virtio.c
> +++ b/drivers/firmware/arm_scmi/virtio.c
> @@ -222,7 +222,7 @@ static bool virtio_chan_available(struct
>  		return false;
>  	}
>  
> -	return vioch && !vioch->cinfo ? true : false;
> +	return vioch && !vioch->cinfo;
>  }
>  
>  static int virtio_chan_setup(struct scmi_chan_info *cinfo, struct device *dev,o

Hi Sudeep,

this seems obviously right, would you pick it up as it is on top of
for-next/scmi when you have time ?

Thanks,
Cristian



More information about the linux-arm-kernel mailing list