Commit f8a78e91 authored by Jiapeng Chong's avatar Jiapeng Chong Committed by Martin K. Petersen

scsi: target: sbp_target: Remove redundant assignment to pg_size

Variable pg_size is set to '0x100 << pg_size', but this value is never read
and it is not used later on. Hence it is a redundant assignment and can be
removed.

Clean up the following clang-analyzer warning:

drivers/target/sbp/sbp_target.c:1264:3: warning: Value stored to
'pg_size' is never read [clang-analyzer-deadcode.DeadStores].

Link: https://lore.kernel.org/r/1620902977-57076-1-git-send-email-jiapeng.chong@linux.alibaba.comReported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 96f3903c
...@@ -1261,7 +1261,6 @@ static int sbp_rw_data(struct sbp_target_request *req) ...@@ -1261,7 +1261,6 @@ static int sbp_rw_data(struct sbp_target_request *req)
pg_size = CMDBLK_ORB_PG_SIZE(be32_to_cpu(req->orb.misc)); pg_size = CMDBLK_ORB_PG_SIZE(be32_to_cpu(req->orb.misc));
if (pg_size) { if (pg_size) {
pr_err("sbp_run_transaction: page size ignored\n"); pr_err("sbp_run_transaction: page size ignored\n");
pg_size = 0x100 << pg_size;
} }
spin_lock_bh(&sess->lock); spin_lock_bh(&sess->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment