]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
9p/xen: Fix format argument warning
authorYe Bin <yebin10@huawei.com>
Fri, 9 Oct 2020 08:05:52 +0000 (16:05 +0800)
committerDominique Martinet <asmadeus@codewreck.org>
Fri, 9 Oct 2020 08:23:29 +0000 (10:23 +0200)
Fix follow warnings:
[net/9p/trans_xen.c:454]: (warning) %u in format string (no. 1) requires
'unsigned int' but the argument type is 'int'.
[net/9p/trans_xen.c:460]: (warning) %u in format string (no. 1) requires
'unsigned int' but the argument type is 'int'.

Link: http://lkml.kernel.org/r/20201009080552.89918-1-yebin10@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
net/9p/trans_xen.c

index bc8807d9281fd39130ac997ec5eead26e6e4feb4..f4fea28e05da68f005c179c564441da59068d4cb 100644 (file)
@@ -451,13 +451,13 @@ static int xen_9pfs_front_probe(struct xenbus_device *dev,
                char str[16];
 
                BUILD_BUG_ON(XEN_9PFS_NUM_RINGS > 9);
-               sprintf(str, "ring-ref%u", i);
+               sprintf(str, "ring-ref%d", i);
                ret = xenbus_printf(xbt, dev->nodename, str, "%d",
                                    priv->rings[i].ref);
                if (ret)
                        goto error_xenbus;
 
-               sprintf(str, "event-channel-%u", i);
+               sprintf(str, "event-channel-%d", i);
                ret = xenbus_printf(xbt, dev->nodename, str, "%u",
                                    priv->rings[i].evtchn);
                if (ret)