From: Viresh Kumar Date: Thu, 6 Aug 2015 07:14:51 +0000 (+0530) Subject: greybus: gpio: Print expected/actual payload size on mismatch X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=782c3b732889b5fbce796a4b548d47a43e4d8c42;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: gpio: 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/gpio.c b/drivers/staging/greybus/gpio.c index 6539530a178c..caee9d19d723 100644 --- a/drivers/staging/greybus/gpio.c +++ b/drivers/staging/greybus/gpio.c @@ -366,7 +366,8 @@ static int gb_gpio_request_recv(u8 type, struct gb_operation *op) request = op->request; if (request->payload_size < sizeof(*event)) { - dev_err(ggc->chip.dev, "short event received\n"); + dev_err(ggc->chip.dev, "short event received (%zu < %zu)\n", + request->payload_size, sizeof(*event)); return -EINVAL; }