* [PATCH] firmware: tee_bnxt: remove redundant assignment to variable nbytes
@ 2022-03-03 9:15 Colin Ian King
0 siblings, 0 replies; 2+ messages in thread
From: Colin Ian King @ 2022-03-03 9:15 UTC (permalink / raw)
To: Rafał Miłecki, linux-mips; +Cc: kernel-janitors, linux-kernel
The variable nbytes is assigned a value that is never read, it is
being re-assigned a new value on the following statement. The
assignmen is redundant and can be removed.
Cleans up cppcheck warning:
drivers/firmware/broadcom/tee_bnxt_fw.c:148:10: style: Variable 'nbytes'
is reassigned a value before the old one has been used.
[redundantAssignment]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/firmware/broadcom/tee_bnxt_fw.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/firmware/broadcom/tee_bnxt_fw.c b/drivers/firmware/broadcom/tee_bnxt_fw.c
index a5bf4c3f6dc7..6d92ec02f2c7 100644
--- a/drivers/firmware/broadcom/tee_bnxt_fw.c
+++ b/drivers/firmware/broadcom/tee_bnxt_fw.c
@@ -143,8 +143,6 @@ int tee_bnxt_copy_coredump(void *buf, u32 offset, u32 size)
prepare_args(TA_CMD_BNXT_COPY_COREDUMP, &arg, param);
while (rbytes) {
- nbytes = rbytes;
-
nbytes = min_t(u32, rbytes, param[0].u.memref.size);
/* Fill additional invoke cmd params */
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] firmware: tee_bnxt: Remove redundant assignment to variable nbytes
@ 2021-12-04 23:21 Colin Ian King
0 siblings, 0 replies; 2+ messages in thread
From: Colin Ian King @ 2021-12-04 23:21 UTC (permalink / raw)
To: Rafał Miłecki, linux-mips; +Cc: kernel-janitors, linux-kernel
Variable nbytes is being assigned a value that is never read, it is
being re-assigned in the next statement. The assignment is redundant
and can be removed.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/firmware/broadcom/tee_bnxt_fw.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/firmware/broadcom/tee_bnxt_fw.c b/drivers/firmware/broadcom/tee_bnxt_fw.c
index a5bf4c3f6dc7..6d92ec02f2c7 100644
--- a/drivers/firmware/broadcom/tee_bnxt_fw.c
+++ b/drivers/firmware/broadcom/tee_bnxt_fw.c
@@ -143,8 +143,6 @@ int tee_bnxt_copy_coredump(void *buf, u32 offset, u32 size)
prepare_args(TA_CMD_BNXT_COPY_COREDUMP, &arg, param);
while (rbytes) {
- nbytes = rbytes;
-
nbytes = min_t(u32, rbytes, param[0].u.memref.size);
/* Fill additional invoke cmd params */
--
2.33.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-03 9:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-03 9:15 [PATCH] firmware: tee_bnxt: remove redundant assignment to variable nbytes Colin Ian King
-- strict thread matches above, loose matches on Subject: below --
2021-12-04 23:21 [PATCH] firmware: tee_bnxt: Remove " Colin Ian King
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).