RE: [PATCH 6/6] scsi: storvsc: Remove redundant ternary operators
From: Michael Kelley
Date: Thu Sep 18 2025 - 00:06:43 EST
From: Liao Yuanhong <liaoyuanhong@xxxxxxxx> Sent: Tuesday, September 2, 2025 6:24 AM
>
> Remove redundant ternary operators to clean up the code.
>
> Signed-off-by: Liao Yuanhong <liaoyuanhong@xxxxxxxx>
> ---
> drivers/scsi/storvsc_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index d9e59204a9c3..7449743930d2 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -1941,8 +1941,8 @@ static int storvsc_probe(struct hv_device *device,
> int num_present_cpus = num_present_cpus();
> struct Scsi_Host *host;
> struct hv_host_device *host_dev;
> - bool dev_is_ide = ((dev_id->driver_data == IDE_GUID) ? true : false);
> - bool is_fc = ((dev_id->driver_data == SFC_GUID) ? true : false);
> + bool dev_is_ide = dev_id->driver_data == IDE_GUID;
> + bool is_fc = dev_id->driver_data == SFC_GUID;
> int target = 0;
> struct storvsc_device *stor_device;
> int max_sub_channels = 0;
> --
> 2.34.1
>
Reviewed-by: Michael Kelley <mhklinux@xxxxxxxxxxx>