vfio: fix a warning message
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 21 Nov 2015 10:32:21 +0000 (13:32 +0300)
committerAlex Williamson <alex.williamson@redhat.com>
Sat, 21 Nov 2015 13:55:58 +0000 (06:55 -0700)
The first argument to the WARN() macro has to be a condition.  I'm sort
of disappointed that this code doesn't generate a compiler warning.  I
guess -Wformat-extra-args doesn't work in the kernel.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c

index de632da2e22f60d4eee042631821c1a4a9b7e558..9da0703e09d03d4fabfc62b8e089b737d1b85e11 100644 (file)
@@ -682,7 +682,7 @@ static int vfio_group_nb_add_dev(struct vfio_group *group, struct device *dev)
                return 0;
 
        /* TODO Prevent device auto probing */
-       WARN("Device %s added to live group %d!\n", dev_name(dev),
+       WARN(1, "Device %s added to live group %d!\n", dev_name(dev),
             iommu_group_id(group->iommu_group));
 
        return 0;