* [PATCH][next] i3c: master: svc: remove redundant assignment to cmd->read_len
@ 2021-02-24 15:13 Colin King
2021-03-02 14:47 ` Miquel Raynal
2021-03-04 17:42 ` Alexandre Belloni
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-02-24 15:13 UTC (permalink / raw)
To: Miquel Raynal, Conor Culhane, Alexandre Belloni, linux-i3c
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The assignment of xfer_len to cmd->read_len appears to be redundant
as the next statement re-assigns the value 0 to it. Clean up the
code by removing the redundant first assignment.
Addresses-Coverity: ("Unused value")
Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/i3c/master/svc-i3c-master.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 8d990696676e..1f6ba4221817 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -1124,7 +1124,6 @@ static int svc_i3c_master_send_direct_ccc_cmd(struct svc_i3c_master *master,
cmd->in = NULL;
cmd->out = &ccc->id;
cmd->len = 1;
- cmd->read_len = xfer_len;
cmd->read_len = 0;
cmd->continued = true;
--
2.30.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][next] i3c: master: svc: remove redundant assignment to cmd->read_len
2021-02-24 15:13 [PATCH][next] i3c: master: svc: remove redundant assignment to cmd->read_len Colin King
@ 2021-03-02 14:47 ` Miquel Raynal
2021-03-04 17:42 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2021-03-02 14:47 UTC (permalink / raw)
To: Colin King
Cc: Conor Culhane, Alexandre Belloni, linux-i3c, kernel-janitors,
linux-kernel
Colin King <colin.king@canonical.com> wrote on Wed, 24 Feb 2021
15:13:49 +0000:
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignment of xfer_len to cmd->read_len appears to be redundant
> as the next statement re-assigns the value 0 to it. Clean up the
> code by removing the redundant first assignment.
>
> Addresses-Coverity: ("Unused value")
> Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/i3c/master/svc-i3c-master.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
> index 8d990696676e..1f6ba4221817 100644
> --- a/drivers/i3c/master/svc-i3c-master.c
> +++ b/drivers/i3c/master/svc-i3c-master.c
> @@ -1124,7 +1124,6 @@ static int svc_i3c_master_send_direct_ccc_cmd(struct svc_i3c_master *master,
> cmd->in = NULL;
> cmd->out = &ccc->id;
> cmd->len = 1;
> - cmd->read_len = xfer_len;
> cmd->read_len = 0;
> cmd->continued = true;
>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] i3c: master: svc: remove redundant assignment to cmd->read_len
2021-02-24 15:13 [PATCH][next] i3c: master: svc: remove redundant assignment to cmd->read_len Colin King
2021-03-02 14:47 ` Miquel Raynal
@ 2021-03-04 17:42 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2021-03-04 17:42 UTC (permalink / raw)
To: Miquel Raynal, linux-i3c, Conor Culhane, Colin King
Cc: Alexandre Belloni, linux-kernel, kernel-janitors
On Wed, 24 Feb 2021 15:13:49 +0000, Colin King wrote:
> The assignment of xfer_len to cmd->read_len appears to be redundant
> as the next statement re-assigns the value 0 to it. Clean up the
> code by removing the redundant first assignment.
Applied, thanks!
[1/1] i3c: master: svc: remove redundant assignment to cmd->read_len
commit: 437f5e2af73081ec08ec5d73d82c650377a4bb17
Best regards,
--
Alexandre Belloni <alexandre.belloni@bootlin.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-04 17:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 15:13 [PATCH][next] i3c: master: svc: remove redundant assignment to cmd->read_len Colin King
2021-03-02 14:47 ` Miquel Raynal
2021-03-04 17:42 ` Alexandre Belloni
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).