From: Viresh Kumar Date: Thu, 6 Aug 2015 07:14:52 +0000 (+0530) Subject: greybus: raw: Print expected/actual payload size on mismatch X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7fea641c94d645bf30712cb6e6c498597c7e5634;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/raw.c b/drivers/staging/greybus/raw.c index 3be96db2588b..a17a9868a08e 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;