提交 02247c18 编写于 作者: S Simon Glass

bloblist: Tidy up a few comments and code-style nits

Add a messing error code to bloblist_new() and tidy up the line length in
bloblist_addrec().
Signed-off-by: NSimon Glass <sjg@chromium.org>
上级 5b044548
......@@ -59,11 +59,10 @@ static int bloblist_addrec(uint tag, int size, struct bloblist_rec **recp)
struct bloblist_rec *rec;
int new_alloced;
new_alloced = hdr->alloced + sizeof(*rec) +
ALIGN(size, BLOBLIST_ALIGN);
new_alloced = hdr->alloced + sizeof(*rec) + ALIGN(size, BLOBLIST_ALIGN);
if (new_alloced >= hdr->size) {
log(LOGC_BLOBLIST, LOGL_ERR,
"Failed to allocate %x bytes size=%x, need size>=%x\n",
"Failed to allocate %x bytes size=%x, need size=%x\n",
size, hdr->size, new_alloced);
return log_msg_ret("bloblist add", -ENOSPC);
}
......
......@@ -183,7 +183,8 @@ int bloblist_new(ulong addr, uint size, uint flags);
* @return 0 if OK, -ENOENT if the magic number doesn't match (indicating that
* there problem is no bloblist at the given address), -EPROTONOSUPPORT
* if the version does not match, -EIO if the checksum does not match,
* -EFBIG if the expected size does not match the detected size
* -EFBIG if the expected size does not match the detected size, -ENOSPC
* if the size is not large enough to hold the headers
*/
int bloblist_check(ulong addr, uint size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册