Skip to content

Commit

Permalink
vfio: fix a warning message
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Alex Williamson committed Nov 21, 2015
1 parent 7200be7 commit 049af10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/vfio/vfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 049af10

Please sign in to comment.