diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-08-06 12:44:51 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-08-10 17:28:30 -0700 |
commit | 782c3b732889b5fbce796a4b548d47a43e4d8c42 (patch) | |
tree | 1764b98b67dea7b914e1e818fdd6b327424cacb3 /drivers/staging/greybus/gpio.c | |
parent | 7fea641c94d645bf30712cb6e6c498597c7e5634 (diff) | |
download | linux-stable-782c3b732889b5fbce796a4b548d47a43e4d8c42.tar.gz linux-stable-782c3b732889b5fbce796a4b548d47a43e4d8c42.tar.bz2 linux-stable-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.c | 3 |
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; } |