* [PATCH] scsi: qla2xxx: Remove unnecessary self assignment
@ 2018-09-20 22:17 Nathan Chancellor
2018-10-16 22:20 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2018-09-20 22:17 UTC (permalink / raw)
To: qla2xxx-upstream, James E.J. Bottomley, Martin K. Petersen
Cc: linux-scsi, linux-kernel, Nathan Chancellor
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.
Link: https://github.com/ClangBuiltLinux/linux/issues/83
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
drivers/scsi/qla2xxx/qla_mbx.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index e016ee9c6d8e..f801aae84cef 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -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,
--
2.19.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: qla2xxx: Remove unnecessary self assignment
2018-09-20 22:17 [PATCH] scsi: qla2xxx: Remove unnecessary self assignment Nathan Chancellor
@ 2018-10-16 22:20 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2018-10-16 22:20 UTC (permalink / raw)
To: Nathan Chancellor
Cc: qla2xxx-upstream, James E.J. Bottomley, Martin K. Petersen,
linux-scsi, linux-kernel
Nathan,
> 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!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-16 22:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-20 22:17 [PATCH] scsi: qla2xxx: Remove unnecessary self assignment Nathan Chancellor
2018-10-16 22:20 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).