From: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
To: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>,
Scott Bauer <scott.bauer@intel.com>,
Jonathan Derrick <jonathan.derrick@intel.com>,
Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][RESEND] block: sed-opal: fix u64 short atom length
Date: Thu, 1 Mar 2018 14:27:00 +0100 [thread overview]
Message-ID: <20180301132700.1279-1-jonas.rabenstein@studium.uni-erlangen.de> (raw)
The length must be given as bytes and not as 4 bit tuples.
Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
---
block/sed-opal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 36842bfa572e..d5f565e1557a 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -562,7 +562,7 @@ static void add_token_u64(int *err, struct opal_dev *cmd, u64 number)
}
msb = fls(number);
- len = DIV_ROUND_UP(msb, 4);
+ len = DIV_ROUND_UP(msb, 8);
if (cmd->pos >= IO_BUFFER_LENGTH - len - 1) {
pr_debug("Error adding u64: end of buffer.\n");
--
2.13.6
next reply other threads:[~2018-03-01 13:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 13:27 Jonas Rabenstein [this message]
2018-03-06 23:45 ` [PATCH][RESEND] block: sed-opal: fix u64 short atom length Derrick, Jonathan
2018-03-07 16:55 ` [PATCH v2] " Jonas Rabenstein
2018-03-07 23:24 ` Scott Bauer
2018-03-07 23:58 ` Jonas Rabenstein
2018-03-16 15:38 ` Scott Bauer
2018-03-16 16:14 ` Jens Axboe
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=20180301132700.1279-1-jonas.rabenstein@studium.uni-erlangen.de \
--to=jonas.rabenstein@studium.uni-erlangen.de \
--cc=axboe@kernel.dk \
--cc=jonathan.derrick@intel.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=scott.bauer@intel.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).