* [PATCH] scsi: isci: remove redundant check on in_connection_align_insertion_frequency
@ 2018-04-25 10:58 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-04-25 10:58 UTC (permalink / raw)
To: Intel SCU Linux support, Artur Paszkiewicz,
James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The sanity check on u->in_connection_align_insertion_frequency is being
performed twice and hence the first check can be removed since it is
redundant. Cleans up cppcheck warning:
drivers/scsi/ibmvscsi/ibmvscsi.c:1711: (warning) Identical inner 'if'
condition is always true.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/isci/init.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index 922e3e56c90d..05cf4daf8788 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -433,9 +433,6 @@ static enum sci_status sci_user_parameters_set(struct isci_host *ihost,
(u->max_speed_generation > SCIC_SDS_PARM_NO_SPEED)))
return SCI_FAILURE_INVALID_PARAMETER_VALUE;
- if (u->in_connection_align_insertion_frequency < 3)
- return SCI_FAILURE_INVALID_PARAMETER_VALUE;
-
if ((u->in_connection_align_insertion_frequency < 3) ||
(u->align_insertion_frequency == 0) ||
(u->notify_enable_spin_up_insertion_frequency == 0))
--
2.17.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] scsi: isci: remove redundant check on in_connection_align_insertion_frequency
@ 2018-04-25 10:58 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-04-25 10:58 UTC (permalink / raw)
To: Intel SCU Linux support, Artur Paszkiewicz,
James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The sanity check on u->in_connection_align_insertion_frequency is being
performed twice and hence the first check can be removed since it is
redundant. Cleans up cppcheck warning:
drivers/scsi/ibmvscsi/ibmvscsi.c:1711: (warning) Identical inner 'if'
condition is always true.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/isci/init.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index 922e3e56c90d..05cf4daf8788 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -433,9 +433,6 @@ static enum sci_status sci_user_parameters_set(struct isci_host *ihost,
(u->max_speed_generation > SCIC_SDS_PARM_NO_SPEED)))
return SCI_FAILURE_INVALID_PARAMETER_VALUE;
- if (u->in_connection_align_insertion_frequency < 3)
- return SCI_FAILURE_INVALID_PARAMETER_VALUE;
-
if ((u->in_connection_align_insertion_frequency < 3) ||
(u->align_insertion_frequency = 0) ||
(u->notify_enable_spin_up_insertion_frequency = 0))
--
2.17.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: isci: remove redundant check on in_connection_align_insertion_frequency
2018-04-25 10:58 ` Colin King
@ 2018-05-02 3:32 ` Martin K. Petersen
-1 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2018-05-02 3:32 UTC (permalink / raw)
To: Colin King
Cc: Intel SCU Linux support, Artur Paszkiewicz,
James E . J . Bottomley, Martin K . Petersen, linux-scsi,
kernel-janitors, linux-kernel
Colin,
> The sanity check on u->in_connection_align_insertion_frequency is
> being performed twice and hence the first check can be removed since
> it is redundant. Cleans up cppcheck warning:
>
> drivers/scsi/ibmvscsi/ibmvscsi.c:1711: (warning) Identical inner 'if'
> condition is always true.
Applied to 4.18/scsi-queue. Thanks.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: isci: remove redundant check on in_connection_align_insertion_frequency
@ 2018-05-02 3:32 ` Martin K. Petersen
0 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2018-05-02 3:32 UTC (permalink / raw)
To: Colin King
Cc: Intel SCU Linux support, Artur Paszkiewicz,
James E . J . Bottomley, Martin K . Petersen, linux-scsi,
kernel-janitors, linux-kernel
Colin,
> The sanity check on u->in_connection_align_insertion_frequency is
> being performed twice and hence the first check can be removed since
> it is redundant. Cleans up cppcheck warning:
>
> drivers/scsi/ibmvscsi/ibmvscsi.c:1711: (warning) Identical inner 'if'
> condition is always true.
Applied to 4.18/scsi-queue. Thanks.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-02 3:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 10:58 [PATCH] scsi: isci: remove redundant check on in_connection_align_insertion_frequency Colin King
2018-04-25 10:58 ` Colin King
2018-05-02 3:32 ` Martin K. Petersen
2018-05-02 3:32 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.