scsi: qla2xxx: Remove unnecessary self assignment
Subsystems (2)
PATCH 1/1 scsi: qla2xxx: Remove unnecessary self assignment
Clang warns when a variable is assigned to itself.
drivers/scsi/qla2xxx/qla_mbx.c:1514:4: warning: explicitly assigning value of variable of type 'uint64_t' (aka 'unsigned long long') to itself [-Wself-assign]
l = l;
~ ^ ~1 warning generated.
This construct is usually used to avoid unused variable warnings, which I assume is the case here. -Wunused-parameter is hidden behind -Wextra with GCC 4.6, which is the minimum version to compile the kernel as of commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"). Just remove this line to silence Clang.
--- drivers/scsi/qla2xxx/qla_mbx.c | 1 - 1 file changed, 1 deletion(-)
drivers/scsi/qla2xxx/qla_mbx.c +0 -1
@@ -1511,7 +1511,6 @@ qla2x00_abort_target(struct fc_port *fcport, uint64_t l, int tag)struct req_que *req;struct rsp_que *rsp; - l = l; vha = fcport->vha; ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x103e,
Signature · 1 line
2.19.0
Martin K. Petersen
AppliedNathan,
Quoted 8 lines
Clang warns when a variable is assigned to itself.
drivers/scsi/qla2xxx/qla_mbx.c:1514:4: warning: explicitly assigning value of variable of type 'uint64_t' (aka 'unsigned long long') to itself [-Wself-assign]l = l; ~ ^ ~1 warning generated.
Applied to 4.20/scsi-queue, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering