From: Colin King <colin.king@canonical.com>
To: Boris Brezillon <boris.brezillon@bootlin.com>, linux-i3c@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][i3c-next] i3c: fix incorrect update to max_read_ds
Date: Wed, 7 Nov 2018 20:42:08 +0000 [thread overview]
Message-ID: <20181107204208.7411-1-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
Currently max_read_ds is being updated twice, which is incorrect.
The second assignment should be to max_write_ds instead. Fix this.
Detected by CoverityScan, CID#1475379 ("Unused value")
Fixes: 50cacdabeae1 ("i3c: Add core I3C infrastructure")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/i3c/master.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 68d6553dbd75..0ea7bb045fad 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1093,7 +1093,7 @@ static int i3c_master_getmxds_locked(struct i3c_master_controller *master,
}
info->max_read_ds = getmaxds->maxrd;
- info->max_read_ds = getmaxds->maxwr;
+ info->max_write_ds = getmaxds->maxwr;
if (dest.payload.len == 5)
info->max_read_turnaround = getmaxds->maxrdturn[0] |
((u32)getmaxds->maxrdturn[1] << 8) |
--
2.19.1
next reply other threads:[~2018-11-07 20:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 20:42 Colin King [this message]
2018-11-08 9:09 ` [PATCH][i3c-next] i3c: fix incorrect update to max_read_ds Boris Brezillon
2018-11-08 9:10 ` 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=20181107204208.7411-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=boris.brezillon@bootlin.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-i3c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).