aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/gpio.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-08-06 12:44:51 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2015-08-10 17:28:30 -0700
commit782c3b732889b5fbce796a4b548d47a43e4d8c42 (patch)
tree1764b98b67dea7b914e1e818fdd6b327424cacb3 /drivers/staging/greybus/gpio.c
parentgreybus: raw: Print expected/actual payload size on mismatch (diff)
downloadlinux-dev-782c3b732889b5fbce796a4b548d47a43e4d8c42.tar.xz
linux-dev-782c3b732889b5fbce796a4b548d47a43e4d8c42.zip
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 <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/gpio.c')
-rw-r--r--drivers/staging/greybus/gpio.c3
1 files changed, 2 insertions, 1 deletions
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;
}