diff mbox series

[SCSI] qla4xxx: remove unused count variable

Message ID 20230331175757.1860780-1-trix@redhat.com (mailing list archive)
State Accepted
Headers show
Series [SCSI] qla4xxx: remove unused count variable | expand

Commit Message

Tom Rix March 31, 2023, 5:57 p.m. UTC
clang with W=1 reports
drivers/scsi/qla4xxx/ql4_isr.c:475:11: error: variable
  'count' set but not used [-Werror,-Wunused-but-set-variable]
        uint32_t count = 0;
                 ^
This variable is not used so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/scsi/qla4xxx/ql4_isr.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Martin K. Petersen April 3, 2023, 1:49 a.m. UTC | #1
Tom,

> clang with W=1 reports
> drivers/scsi/qla4xxx/ql4_isr.c:475:11: error: variable
>   'count' set but not used [-Werror,-Wunused-but-set-variable]
>         uint32_t count = 0;
>                  ^
> This variable is not used so remove it.

Applied to 6.4/scsi-staging, thanks!
Martin K. Petersen April 12, 2023, 2:04 a.m. UTC | #2
On Fri, 31 Mar 2023 13:57:57 -0400, Tom Rix wrote:

> clang with W=1 reports
> drivers/scsi/qla4xxx/ql4_isr.c:475:11: error: variable
>   'count' set but not used [-Werror,-Wunused-but-set-variable]
>         uint32_t count = 0;
>                  ^
> This variable is not used so remove it.
> 
> [...]

Applied to 6.4/scsi-queue, thanks!

[1/1] qla4xxx: remove unused count variable
      https://git.kernel.org/mkp/scsi/c/3d2efb5470f5
diff mbox series

Patch

diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c
index 6f0e77dc2a34..cf52258ecdde 100644
--- a/drivers/scsi/qla4xxx/ql4_isr.c
+++ b/drivers/scsi/qla4xxx/ql4_isr.c
@@ -472,14 +472,12 @@  static void qla4xxx_mbox_status_entry(struct scsi_qla_host *ha,
  **/
 void qla4xxx_process_response_queue(struct scsi_qla_host *ha)
 {
-	uint32_t count = 0;
 	struct srb *srb = NULL;
 	struct status_entry *sts_entry;
 
 	/* Process all responses from response queue */
 	while ((ha->response_ptr->signature != RESPONSE_PROCESSED)) {
 		sts_entry = (struct status_entry *) ha->response_ptr;
-		count++;
 
 		/* Advance pointers for next entry */
 		if (ha->response_out == (RESPONSE_QUEUE_DEPTH - 1)) {