From: Dan Carpenter Date: Sat, 21 Nov 2015 10:32:21 +0000 (+0300) Subject: vfio: fix a warning message X-Git-Tag: v4.4-rc5~19^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=049af1060bb81532f2700762a8ba71eb3fa81f5a;p=thirdparty%2Fkernel%2Flinux.git vfio: fix a warning message 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 Signed-off-by: Alex Williamson --- diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index de632da2e22f6..9da0703e09d03 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c @@ -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;