RE: [PATCH v2 3/3] scsi: smartpqi: remove conditional before pqi_remove_device()

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

 



One small typo in the commit message pysical  should be physical.

Reviewed-by: Shane Seymour <shane.seymour@xxxxxxx>

> -----Original Message-----
> From: mwilck@xxxxxxxx [mailto:mwilck@xxxxxxxx]
> Sent: Wednesday, 17 June 2020 6:35 PM
> To: Don Brace <don.brace@xxxxxxxxxxxxx>; Martin K. Petersen
> <martin.petersen@xxxxxxxxxx>
> Cc: esc.storagedev@xxxxxxxxxxxxx; linux-scsi@xxxxxxxxxxxxxxx; Seymour,
> Shane M <shane.seymour@xxxxxxx>; Martin Wilck <mwilck@xxxxxxxx>
> Subject: [PATCH v2 3/3] scsi: smartpqi: remove conditional before
> pqi_remove_device()
> 
> From: Martin Wilck <mwilck@xxxxxxxx>
> 
> pqi_remove_device() checks if there's anything to remove, for both
> logical and SAS devices. So these conditionals are redundant.
> They may actually be wrong, because they would skip removing pysical
> devices which are not SMP expanders.
> 
> Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
> ---
>  drivers/scsi/smartpqi/smartpqi_init.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/smartpqi/smartpqi_init.c
> b/drivers/scsi/smartpqi/smartpqi_init.c
> index 87089b67ff74..7e4d5c5ea2b0 100644
> --- a/drivers/scsi/smartpqi/smartpqi_init.c
> +++ b/drivers/scsi/smartpqi/smartpqi_init.c
> @@ -1879,8 +1879,7 @@ static void pqi_update_device_list(struct
> pqi_ctrl_info *ctrl_info,
>  		} else {
>  			pqi_dev_info(ctrl_info, "removed", device);
>  		}
> -		if (pqi_is_device_added(device))
> -			pqi_remove_device(ctrl_info, device);
> +		pqi_remove_device(ctrl_info, device);
>  		list_del(&device->delete_list_entry);
>  		pqi_free_device(device);
>  	}
> @@ -2223,8 +2222,7 @@ static void pqi_remove_all_scsi_devices(struct
> pqi_ctrl_info *ctrl_info)
>  		if (!device)
>  			break;
> 
> -		if (pqi_is_device_added(device))
> -			pqi_remove_device(ctrl_info, device);
> +		pqi_remove_device(ctrl_info, device);
>  		pqi_free_device(device);
>  	}
>  }
> --
> 2.26.2




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux