]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
net: caif: use correct format specifier
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>
Sun, 31 Jul 2016 07:19:50 +0000 (09:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Aug 2016 20:32:51 +0000 (13:32 -0700)
%u is the wrong format specifier for int.
size_t cannot be converted to int without possible
loss of information.

So leave the result as size_t and use %zu as format specifier.

cf. Documentation/printk-formats.txt

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/caif/caif_spi.c

index 4721948a92f6a1db9cea13d66810041be5ec88e4..3a529fbe539fb6ee098f0b85515a49bdc1b64d90 100644 (file)
@@ -185,8 +185,8 @@ static ssize_t print_frame(char *buf, size_t size, char *frm,
                        /* Fast forward. */
                        i = count - cut;
                        len += snprintf((buf + len), (size - len),
-                                       "--- %u bytes skipped ---\n",
-                                       (int)(count - (cut * 2)));
+                                       "--- %zu bytes skipped ---\n",
+                                       count - (cut * 2));
                }
 
                if ((!(i % 10)) && i) {