* [PATCH] scsi: BusLogic: remove variable adapter_count
@ 2022-10-31 16:05 Colin Ian King
2022-10-31 16:13 ` Khalid Aziz
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Colin Ian King @ 2022-10-31 16:05 UTC (permalink / raw)
To: Khalid Aziz, James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
Variable adapter_count is just being incremented and it's never used
anywhere else. The variable and the increment are redundant so
remove it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/scsi/BusLogic.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
index f2abffce2659..f7b7ffda1161 100644
--- a/drivers/scsi/BusLogic.c
+++ b/drivers/scsi/BusLogic.c
@@ -2198,7 +2198,7 @@ static int blogic_slaveconfig(struct scsi_device *dev)
static int __init blogic_init(void)
{
- int adapter_count = 0, drvr_optindex = 0, probeindex;
+ int drvr_optindex = 0, probeindex;
struct blogic_adapter *adapter;
int ret = 0;
@@ -2368,10 +2368,8 @@ static int __init blogic_init(void)
list_del(&myadapter->host_list);
scsi_host_put(host);
ret = -ENODEV;
- } else {
+ } else
scsi_scan_host(host);
- adapter_count++;
- }
}
} else {
/*
--
2.37.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: BusLogic: remove variable adapter_count
2022-10-31 16:05 [PATCH] scsi: BusLogic: remove variable adapter_count Colin Ian King
@ 2022-10-31 16:13 ` Khalid Aziz
2022-11-08 3:01 ` Martin K. Petersen
2022-11-17 18:29 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Khalid Aziz @ 2022-10-31 16:13 UTC (permalink / raw)
To: Colin Ian King, James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
On 10/31/22 10:05, Colin Ian King wrote:
> Variable adapter_count is just being incremented and it's never used
> anywhere else. The variable and the increment are redundant so
> remove it.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/scsi/BusLogic.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Looks good to me.
Acked-by: Khalid Aziz <khalid@gonehiking.org>
>
> diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
> index f2abffce2659..f7b7ffda1161 100644
> --- a/drivers/scsi/BusLogic.c
> +++ b/drivers/scsi/BusLogic.c
> @@ -2198,7 +2198,7 @@ static int blogic_slaveconfig(struct scsi_device *dev)
>
> static int __init blogic_init(void)
> {
> - int adapter_count = 0, drvr_optindex = 0, probeindex;
> + int drvr_optindex = 0, probeindex;
> struct blogic_adapter *adapter;
> int ret = 0;
>
> @@ -2368,10 +2368,8 @@ static int __init blogic_init(void)
> list_del(&myadapter->host_list);
> scsi_host_put(host);
> ret = -ENODEV;
> - } else {
> + } else
> scsi_scan_host(host);
> - adapter_count++;
> - }
> }
> } else {
> /*
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: BusLogic: remove variable adapter_count
2022-10-31 16:05 [PATCH] scsi: BusLogic: remove variable adapter_count Colin Ian King
2022-10-31 16:13 ` Khalid Aziz
@ 2022-11-08 3:01 ` Martin K. Petersen
2022-11-17 18:29 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-11-08 3:01 UTC (permalink / raw)
To: Colin Ian King
Cc: Khalid Aziz, James E . J . Bottomley, Martin K . Petersen,
linux-scsi, kernel-janitors, linux-kernel
Colin,
> Variable adapter_count is just being incremented and it's never used
> anywhere else. The variable and the increment are redundant so
> remove it.
Applied to 6.2/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: BusLogic: remove variable adapter_count
2022-10-31 16:05 [PATCH] scsi: BusLogic: remove variable adapter_count Colin Ian King
2022-10-31 16:13 ` Khalid Aziz
2022-11-08 3:01 ` Martin K. Petersen
@ 2022-11-17 18:29 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-11-17 18:29 UTC (permalink / raw)
To: James E . J . Bottomley, linux-scsi, Khalid Aziz, Colin Ian King
Cc: Martin K . Petersen, kernel-janitors, linux-kernel
On Mon, 31 Oct 2022 16:05:12 +0000, Colin Ian King wrote:
> Variable adapter_count is just being incremented and it's never used
> anywhere else. The variable and the increment are redundant so
> remove it.
>
>
Applied to 6.2/scsi-queue, thanks!
[1/1] scsi: BusLogic: remove variable adapter_count
https://git.kernel.org/mkp/scsi/c/81cb3eb68af5
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-17 18:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 16:05 [PATCH] scsi: BusLogic: remove variable adapter_count Colin Ian King
2022-10-31 16:13 ` Khalid Aziz
2022-11-08 3:01 ` Martin K. Petersen
2022-11-17 18:29 ` 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.