diff mbox series

qbman: Remove set but not used variable 'err'

Message ID 1585899327-2690-1-git-send-email-zhengyongjun3@huawei.com (mailing list archive)
State Handled Elsewhere
Headers show
Series qbman: Remove set but not used variable 'err' | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (d0c12846a3a24cd6d68b608c866712bc7e471634)
snowpatch_ozlabs/build-ppc64le success Build succeeded
snowpatch_ozlabs/build-ppc64be success Build succeeded
snowpatch_ozlabs/build-ppc64e success Build succeeded
snowpatch_ozlabs/build-pmac32 warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Zheng Yongjun April 3, 2020, 7:35 a.m. UTC
From: network <network@ubuntu.network>

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/soc/fsl/qbman/bman.c:640:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
  int err = 0;
      ^~~
err is never used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: network <network@ubuntu.network>
---
 drivers/soc/fsl/qbman/bman.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/soc/fsl/qbman/bman.c b/drivers/soc/fsl/qbman/bman.c
index f4fb527..0a24433 100644
--- a/drivers/soc/fsl/qbman/bman.c
+++ b/drivers/soc/fsl/qbman/bman.c
@@ -637,7 +637,6 @@  int bman_p_irqsource_add(struct bman_portal *p, u32 bits)
 
 int bm_shutdown_pool(u32 bpid)
 {
-	int err = 0;
 	struct bm_mc_command *bm_cmd;
 	union bm_mc_result *bm_res;
 
@@ -650,7 +649,6 @@  int bm_shutdown_pool(u32 bpid)
 		bm_mc_commit(&p->p, BM_MCC_VERB_CMD_ACQUIRE | 1);
 		if (!bm_mc_result_timeout(&p->p, &bm_res)) {
 			pr_crit("BMan Acquire Command timedout\n");
-			err = -ETIMEDOUT;
 			goto done;
 		}
 		if (!(bm_res->verb & BM_MCR_VERB_ACQUIRE_BUFCOUNT)) {