greybus: raw: Print expected/actual payload size on mismatch

Print (expected-payload-size actual-payload-size), when the size doesn't
match for requests received by the module. This gives more details
required for debugging the issue.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Viresh Kumar 2015-08-06 12:44:52 +05:30 committed by Greg Kroah-Hartman
parent 47a96858b5
commit 7fea641c94
1 changed files with 2 additions and 1 deletions

View File

@ -121,7 +121,8 @@ static int gb_raw_receive(u8 type, struct gb_operation *op)
/* Verify size of payload */
if (op->request->payload_size < sizeof(*receive)) {
dev_err(raw->device, "raw receive request too small\n");
dev_err(raw->device, "raw receive request too small (%zu < %zu)\n",
op->request->payload_size, sizeof(*receive));
return -EINVAL;
}
receive = op->request->payload;