From: Colin Ian King <colin.i.king@gmail.com>
To: "Rafał Miłecki" <zajec5@gmail.com>, linux-mips@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] firmware: tee_bnxt: remove redundant assignment to variable nbytes
Date: Thu, 3 Mar 2022 09:15:21 +0000 [thread overview]
Message-ID: <20220303091521.1125841-1-colin.i.king@gmail.com> (raw)
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
next reply other threads:[~2022-03-03 9:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 9:15 Colin Ian King [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-12-04 23:21 [PATCH] firmware: tee_bnxt: Remove redundant assignment to variable nbytes Colin Ian King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220303091521.1125841-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).