lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <SN6PR02MB4157A1DF13DB4C28AAD47DA6D416A@SN6PR02MB4157.namprd02.prod.outlook.com>
Date: Thu, 18 Sep 2025 04:06:24 +0000
From: Michael Kelley <mhklinux@...look.com>
To: Liao Yuanhong <liaoyuanhong@...o.com>, "K. Y. Srinivasan"
	<kys@...rosoft.com>, Haiyang Zhang <haiyangz@...rosoft.com>, Wei Liu
	<wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>, "James E.J.
 Bottomley" <James.Bottomley@...senPartnership.com>, "Martin K. Petersen"
	<martin.petersen@...cle.com>, "open list:Hyper-V/Azure CORE AND DRIVERS"
	<linux-hyperv@...r.kernel.org>, "open list:SCSI SUBSYSTEM"
	<linux-scsi@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 6/6] scsi: storvsc: Remove redundant ternary operators

From: Liao Yuanhong <liaoyuanhong@...o.com> Sent: Tuesday, September 2, 2025 6:24 AM
> 
> Remove redundant ternary operators to clean up the code.
> 
> Signed-off-by: Liao Yuanhong <liaoyuanhong@...o.com>
> ---
>  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@...look.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ