diff mbox series

[1/2] scsi:qla1280: remove unnessary same condition check

Message ID 1533177901-19514-2-git-send-email-zhongjiang@huawei.com (mailing list archive)
State Rejected
Headers show
Series remove double test condition | expand

Commit Message

zhong jiang Aug. 2, 2018, 2:45 a.m. UTC
doulbe test in a expression is redundant. so just remove one of
them.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/scsi/qla1280.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Bart Van Assche Aug. 2, 2018, 3:22 a.m. UTC | #1
On Thu, 2018-08-02 at 10:45 +0800, zhong jiang wrote:
> doulbe test in a expression is redundant. so just remove one of
> them.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  drivers/scsi/qla1280.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
> index 390775d..8e6f156 100644
> --- a/drivers/scsi/qla1280.c
> +++ b/drivers/scsi/qla1280.c
> @@ -1504,7 +1504,6 @@ static void qla1280_mailbox_timeout(struct timer_list *t)
>  	/* Issue SCSI reset, if we can't reset twice then bus is dead */
>  	for (bus = 0; bus < ha->ports; bus++) {
>  		if (!ha->bus_settings[bus].disable_scsi_reset &&
> -		    qla1280_bus_reset(ha, bus) &&
>  		    qla1280_bus_reset(ha, bus))
>  			ha->bus_settings[bus].scsi_bus_dead = 1;
>  	}

Same question here: does qla1280_bus_reset() have any side effects?

Bart.
diff mbox series

Patch

diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 390775d..8e6f156 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -1504,7 +1504,6 @@  static void qla1280_mailbox_timeout(struct timer_list *t)
 	/* Issue SCSI reset, if we can't reset twice then bus is dead */
 	for (bus = 0; bus < ha->ports; bus++) {
 		if (!ha->bus_settings[bus].disable_scsi_reset &&
-		    qla1280_bus_reset(ha, bus) &&
 		    qla1280_bus_reset(ha, bus))
 			ha->bus_settings[bus].scsi_bus_dead = 1;
 	}