diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-08-06 12:44:52 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-08-10 17:28:30 -0700 |
commit | 7fea641c94d645bf30712cb6e6c498597c7e5634 (patch) | |
tree | b7bc7c114539605b6218e6b84fe2f58bf673541c /drivers/staging/greybus/raw.c | |
parent | 47a96858b526e14882438e455ec078fc7e51155b (diff) | |
download | op-kernel-dev-7fea641c94d645bf30712cb6e6c498597c7e5634.zip op-kernel-dev-7fea641c94d645bf30712cb6e6c498597c7e5634.tar.gz |
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>
Diffstat (limited to 'drivers/staging/greybus/raw.c')
-rw-r--r-- | drivers/staging/greybus/raw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/greybus/raw.c b/drivers/staging/greybus/raw.c index 3be96db..a17a986 100644 --- a/drivers/staging/greybus/raw.c +++ b/drivers/staging/greybus/raw.c @@ -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; |