]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: greybus: log: Fix line over 80 characters.
authorEmmanuil Chatzipetru <chatzi.emanuel@gmail.com>
Wed, 4 Jan 2017 16:08:19 +0000 (17:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Jan 2017 17:22:20 +0000 (18:22 +0100)
Fix coding style issue caught by checkpatch.pl related to the following
warning:
- CHECK: WARNING: line over 80 characters
This is done by dropping a redundant cast and by replacing the format specifier
in dev_err(); to "%zu" instead of "%d", in order to silence the warnings of the
compiler.

Also, while at it, drop the redundant cast in the comparison as well to maintain
consistency.

Signed-off-by: Emmanuil Chatzipetru <chatzi.emanuel@gmail.com>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/log.c

index 1a18ab1ff8aaefc4c7f802e74c66ed5cf213b4b9..5c5bedaf69a625a073769797b695e780e26dcfc2 100644 (file)
@@ -37,9 +37,9 @@ static int gb_log_request_handler(struct gb_operation *op)
        }
        receive = op->request->payload;
        len = le16_to_cpu(receive->len);
-       if (len != (int)(op->request->payload_size - sizeof(*receive))) {
-               dev_err(dev, "log request wrong size %d vs %d\n", len,
-                               (int)(op->request->payload_size - sizeof(*receive)));
+       if (len != (op->request->payload_size - sizeof(*receive))) {
+               dev_err(dev, "log request wrong size %d vs %zu\n", len,
+                               (op->request->payload_size - sizeof(*receive)));
                return -EINVAL;
        }
        if (len == 0) {