Re: [PATCH -next 2/3] media: radio-wl1273: Remove an unnecessary ternary operator

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

 



On Fri, Aug 04, 2023 at 11:13:22AM +0800, Ruan Jinjie wrote:
> There is a ternary operator, the true or false judgement of which
> is unnecessary in C language semantics.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@xxxxxxxxxx>
> ---
>  drivers/media/radio/radio-wl1273.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
> index e8166eac9efe..f6b98c304b72 100644
> --- a/drivers/media/radio/radio-wl1273.c
> +++ b/drivers/media/radio/radio-wl1273.c
> @@ -1020,7 +1020,7 @@ static int wl1273_fm_set_rds(struct wl1273_device *radio, unsigned int new_mode)
>  	}
>  
>  	if (!r)
> -		radio->rds_on = (new_mode == WL1273_RDS_ON) ? true : false;
> +		radio->rds_on = new_mode == WL1273_RDS_ON;

Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@xxxxxxx>

Thanks.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux