greybus: svc: Fix build warning on 64bit systems
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 23 Jul 2015 05:00:47 +0000 (10:30 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 23 Jul 2015 19:51:38 +0000 (12:51 -0700)
Fix below warnings that only generate for a 64 bit system:

greybus/svc.c:202:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
   dev_err(dev, "%s: Illegal size of hello request (%d %d)\n",
                ^
greybus/svc.c:202:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Wformat=]

Fixes: 9cbe73e0cf45 ("svc: Implement SVC requests")
Reported-by: Greg KH <gregkh@google.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/svc.c

index c9bbdc0..ebd282d 100644 (file)
@@ -199,7 +199,7 @@ static int gb_svc_hello(struct gb_operation *op)
         * request, use that to create an endo.
         */
        if (op->request->payload_size != sizeof(*hello_request)) {
-               dev_err(dev, "%s: Illegal size of hello request (%d %d)\n",
+               dev_err(dev, "%s: Illegal size of hello request (%zu %zu)\n",
                        __func__, op->request->payload_size,
                        sizeof(*hello_request));
                return -EINVAL;