* [PATCH] scsi: hpsa: Remove the unused variable transMethod
@ 2023-03-17 5:49 Jiapeng Chong
2023-03-17 15:18 ` Don.Brace
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jiapeng Chong @ 2023-03-17 5:49 UTC (permalink / raw)
To: don.brace
Cc: jejb, martin.petersen, storagedev, linux-scsi, linux-kernel,
Jiapeng Chong, Abaci Robot
Variable transMethod is not effectively used, so delete it.
drivers/scsi/hpsa.c:9478:16: warning: variable 'transMethod' set but not used.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4554
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/scsi/hpsa.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index fec7e17747f7..2f2b46a95102 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -9475,8 +9475,6 @@ static void hpsa_free_performant_mode(struct ctlr_info *h)
static int hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h)
{
u32 trans_support;
- unsigned long transMethod = CFGTBL_Trans_Performant |
- CFGTBL_Trans_use_short_tags;
int i, rc;
if (hpsa_simple_mode)
@@ -9488,14 +9486,10 @@ static int hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h)
/* Check for I/O accelerator mode support */
if (trans_support & CFGTBL_Trans_io_accel1) {
- transMethod |= CFGTBL_Trans_io_accel1 |
- CFGTBL_Trans_enable_directed_msix;
rc = hpsa_alloc_ioaccel1_cmd_and_bft(h);
if (rc)
return rc;
} else if (trans_support & CFGTBL_Trans_io_accel2) {
- transMethod |= CFGTBL_Trans_io_accel2 |
- CFGTBL_Trans_enable_directed_msix;
rc = hpsa_alloc_ioaccel2_cmd_and_bft(h);
if (rc)
return rc;
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] scsi: hpsa: Remove the unused variable transMethod
2023-03-17 5:49 [PATCH] scsi: hpsa: Remove the unused variable transMethod Jiapeng Chong
@ 2023-03-17 15:18 ` Don.Brace
2023-03-24 20:57 ` Martin K. Petersen
2023-04-03 2:15 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Don.Brace @ 2023-03-17 15:18 UTC (permalink / raw)
To: jiapeng.chong
Cc: jejb, martin.petersen, storagedev, linux-scsi, linux-kernel, abaci
-----Original Message-----
From: Jiapeng Chong [mailto:jiapeng.chong@linux.alibaba.com]
Subject: [PATCH] scsi: hpsa: Remove the unused variable transMethod
Variable transMethod is not effectively used, so delete it.
drivers/scsi/hpsa.c:9478:16: warning: variable 'transMethod' set but not used.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4554
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Don Brace <don.brace@microchip.com>
Thanks for your patch.
---
drivers/scsi/hpsa.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index fec7e17747f7..2f2b46a95102 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -9475,8 +9475,6 @@ static void hpsa_free_performant_mode(struct ctlr_info *h) static int hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h) {
u32 trans_support;
- unsigned long transMethod = CFGTBL_Trans_Performant |
- CFGTBL_Trans_use_short_tags;
int i, rc;
if (hpsa_simple_mode)
@@ -9488,14 +9486,10 @@ static int hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h)
/* Check for I/O accelerator mode support */
if (trans_support & CFGTBL_Trans_io_accel1) {
- transMethod |= CFGTBL_Trans_io_accel1 |
- CFGTBL_Trans_enable_directed_msix;
rc = hpsa_alloc_ioaccel1_cmd_and_bft(h);
if (rc)
return rc;
} else if (trans_support & CFGTBL_Trans_io_accel2) {
- transMethod |= CFGTBL_Trans_io_accel2 |
- CFGTBL_Trans_enable_directed_msix;
rc = hpsa_alloc_ioaccel2_cmd_and_bft(h);
if (rc)
return rc;
--
2.20.1.7.g153144c
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: hpsa: Remove the unused variable transMethod
2023-03-17 5:49 [PATCH] scsi: hpsa: Remove the unused variable transMethod Jiapeng Chong
2023-03-17 15:18 ` Don.Brace
@ 2023-03-24 20:57 ` Martin K. Petersen
2023-04-03 2:15 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2023-03-24 20:57 UTC (permalink / raw)
To: Jiapeng Chong
Cc: don.brace, jejb, martin.petersen, storagedev, linux-scsi,
linux-kernel, Abaci Robot
Jiapeng,
> Variable transMethod is not effectively used, so delete it.
>
> drivers/scsi/hpsa.c:9478:16: warning: variable 'transMethod' set but
> not used.
Applied to 6.4/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: hpsa: Remove the unused variable transMethod
2023-03-17 5:49 [PATCH] scsi: hpsa: Remove the unused variable transMethod Jiapeng Chong
2023-03-17 15:18 ` Don.Brace
2023-03-24 20:57 ` Martin K. Petersen
@ 2023-04-03 2:15 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2023-04-03 2:15 UTC (permalink / raw)
To: don.brace, Jiapeng Chong
Cc: Martin K . Petersen, jejb, storagedev, linux-scsi, linux-kernel,
Abaci Robot
On Fri, 17 Mar 2023 13:49:40 +0800, Jiapeng Chong wrote:
> Variable transMethod is not effectively used, so delete it.
>
> drivers/scsi/hpsa.c:9478:16: warning: variable 'transMethod' set but not used.
>
>
Applied to 6.4/scsi-queue, thanks!
[1/1] scsi: hpsa: Remove the unused variable transMethod
https://git.kernel.org/mkp/scsi/c/d93523877e6f
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-04-03 2:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 5:49 [PATCH] scsi: hpsa: Remove the unused variable transMethod Jiapeng Chong
2023-03-17 15:18 ` Don.Brace
2023-03-24 20:57 ` Martin K. Petersen
2023-04-03 2:15 ` 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.