Commit d51c0ffb authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: manifest: clean up a few pr_err() calls

Provide a little more information in two pr_err() calls.
Also enclose a reported condition in parentheses, to match
the style used everywhere else in the file.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent fd1c2e54
......@@ -81,13 +81,14 @@ static int identify_descriptor(struct gb_interface *intf,
size_t expected_size;
if (size < sizeof(*desc_header)) {
pr_err("manifest too small\n");
pr_err("manifest too small (%zu < %zu)\n",
size, sizeof(*desc_header));
return -EINVAL; /* Must at least have header */
}
desc_size = le16_to_cpu(desc_header->size);
if (desc_size > size) {
pr_err("descriptor too big\n");
pr_err("descriptor too big (%zu > %zu)\n", desc_size, size);
return -EINVAL;
}
......@@ -374,7 +375,7 @@ bool gb_manifest_parse(struct gb_interface *intf, void *data, size_t size)
header = &manifest->header;
manifest_size = le16_to_cpu(header->size);
if (manifest_size != size) {
pr_err("manifest size mismatch %zu != %hu\n",
pr_err("manifest size mismatch (%zu != %hu)\n",
size, manifest_size);
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment