* [PATCH -next] scsi: hisi_sas: Remove set but not used variable 'dq_list'
@ 2018-10-26 7:07 YueHaibing
2018-10-26 8:17 ` John Garry
2018-11-06 3:44 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2018-10-26 7:07 UTC (permalink / raw)
To: john.garry, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi, YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c: In function 'start_delivery_v1_hw':
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:907:20: warning:
variable 'dq_list' set but not used [-Wunused-but-set-variable]
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c: In function 'start_delivery_v2_hw':
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c:1671:20: warning:
variable 'dq_list' set but not used [-Wunused-but-set-variable]
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c: In function 'start_delivery_v3_hw':
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:889:20: warning:
variable 'dq_list' set but not used [-Wunused-but-set-variable]
It never used since introduction in commit
fa222db0b036 ("scsi: hisi_sas: Don't lock DQ for complete task sending")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 --
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 --
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 --
3 files changed, 6 deletions(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index f0e457e..8df822a 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -904,11 +904,9 @@ static void start_delivery_v1_hw(struct hisi_sas_dq *dq)
{
struct hisi_hba *hisi_hba = dq->hisi_hba;
struct hisi_sas_slot *s, *s1, *s2 = NULL;
- struct list_head *dq_list;
int dlvry_queue = dq->id;
int wp;
- dq_list = &dq->list;
list_for_each_entry_safe(s, s1, &dq->list, delivery) {
if (!s->ready)
break;
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
index cc36b64..77a85ea 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
@@ -1670,11 +1670,9 @@ static void start_delivery_v2_hw(struct hisi_sas_dq *dq)
{
struct hisi_hba *hisi_hba = dq->hisi_hba;
struct hisi_sas_slot *s, *s1, *s2 = NULL;
- struct list_head *dq_list;
int dlvry_queue = dq->id;
int wp;
- dq_list = &dq->list;
list_for_each_entry_safe(s, s1, &dq->list, delivery) {
if (!s->ready)
break;
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index bd4ce38..a369450 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -886,11 +886,9 @@ static void start_delivery_v3_hw(struct hisi_sas_dq *dq)
{
struct hisi_hba *hisi_hba = dq->hisi_hba;
struct hisi_sas_slot *s, *s1, *s2 = NULL;
- struct list_head *dq_list;
int dlvry_queue = dq->id;
int wp;
- dq_list = &dq->list;
list_for_each_entry_safe(s, s1, &dq->list, delivery) {
if (!s->ready)
break;
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] scsi: hisi_sas: Remove set but not used variable 'dq_list'
2018-10-26 7:07 [PATCH -next] scsi: hisi_sas: Remove set but not used variable 'dq_list' YueHaibing
@ 2018-10-26 8:17 ` John Garry
2018-11-06 3:44 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: John Garry @ 2018-10-26 8:17 UTC (permalink / raw)
To: YueHaibing, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi
On 26/10/2018 08:07, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/hisi_sas/hisi_sas_v1_hw.c: In function 'start_delivery_v1_hw':
> drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:907:20: warning:
> variable 'dq_list' set but not used [-Wunused-but-set-variable]
>
> drivers/scsi/hisi_sas/hisi_sas_v2_hw.c: In function 'start_delivery_v2_hw':
> drivers/scsi/hisi_sas/hisi_sas_v2_hw.c:1671:20: warning:
> variable 'dq_list' set but not used [-Wunused-but-set-variable]
>
> drivers/scsi/hisi_sas/hisi_sas_v3_hw.c: In function 'start_delivery_v3_hw':
> drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:889:20: warning:
> variable 'dq_list' set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in commit
> fa222db0b036 ("scsi: hisi_sas: Don't lock DQ for complete task sending")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: John Garry <john.garry@huawei.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] scsi: hisi_sas: Remove set but not used variable 'dq_list'
2018-10-26 7:07 [PATCH -next] scsi: hisi_sas: Remove set but not used variable 'dq_list' YueHaibing
2018-10-26 8:17 ` John Garry
@ 2018-11-06 3:44 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-11-06 3:44 UTC (permalink / raw)
To: YueHaibing; +Cc: john.garry, jejb, martin.petersen, linux-kernel, linux-scsi
YueHaibing,
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/hisi_sas/hisi_sas_v1_hw.c: In function 'start_delivery_v1_hw':
> drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:907:20: warning:
> variable 'dq_list' set but not used [-Wunused-but-set-variable]
Applied to 4.20/scsi-fixes. Thank you!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-06 3:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26 7:07 [PATCH -next] scsi: hisi_sas: Remove set but not used variable 'dq_list' YueHaibing
2018-10-26 8:17 ` John Garry
2018-11-06 3:44 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).