]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA/bng_re: Remove unused variable rc
authorRohit Chavan <roheetchavan@gmail.com>
Tue, 5 May 2026 08:57:08 +0000 (14:27 +0530)
committerLeon Romanovsky <leon@kernel.org>
Mon, 18 May 2026 08:58:41 +0000 (04:58 -0400)
The variable 'rc' is initialized to 0 and returned at the end of
bng_re_process_qp_event(), but it is never modified in between.

Simplify the function by removing the redundant variable and returning 0
directly. This cleans up the code and avoids potential compiler warnings
about unused variables.

Signed-off-by: Rohit Chavan <roheetchavan@gmail.com>
Link: https://patch.msgid.link/20260505085709.1755534-1-roheetchavan@gmail.com
Reviewed-by: Siva Reddy Kallam <siva.kallam@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bng_re/bng_fw.c

index 17d7cc3aa11d5a424a48d6814933f5deec7a8a9a..50156c300b335f8eb8f23c6861e3a37a6e155a9b 100644 (file)
@@ -123,7 +123,6 @@ static int bng_re_process_qp_event(struct bng_re_rcfw *rcfw,
        bool is_waiter_alive;
        struct pci_dev *pdev;
        u32 wait_cmds = 0;
-       int rc = 0;
 
        pdev = rcfw->pdev;
        switch (qp_event->event) {
@@ -152,7 +151,7 @@ static int bng_re_process_qp_event(struct bng_re_rcfw *rcfw,
                                 "rcfw timedout: cookie = %#x, free_slots = %d",
                                 cookie, crsqe->free_slots);
                        spin_unlock(&hwq->lock);
-                       return rc;
+                       return 0;
                }
 
                if (crsqe->is_waiter_alive) {
@@ -182,7 +181,7 @@ static int bng_re_process_qp_event(struct bng_re_rcfw *rcfw,
                spin_unlock(&hwq->lock);
        }
        *num_wait += wait_cmds;
-       return rc;
+       return 0;
 }
 
 /* function events */