diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2019-03-30 17:41:35 +0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2019-04-22 20:45:42 +0300 |
commit | a88a7b3eb076ade6205176915fd2ee73a60f4a32 (patch) | |
tree | 27517aa02ee5bef7c0c3b17f56c168dde35bf3e0 /drivers/vfio/platform | |
parent | 085b7755808aa11f78ab9377257e1dad2e6fa4bb (diff) | |
download | linux-a88a7b3eb076ade6205176915fd2ee73a60f4a32.tar.xz |
vfio: Use dev_printk() when possible
Use dev_printk() when possible to make messages consistent with other
device-related messages.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/platform')
-rw-r--r-- | drivers/vfio/platform/reset/vfio_platform_amdxgbe.c | 5 | ||||
-rw-r--r-- | drivers/vfio/platform/vfio_platform_common.c | 12 |
2 files changed, 10 insertions, 7 deletions
diff --git a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c index 3ddb2704221d..fe95964bc3be 100644 --- a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c +++ b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c @@ -89,7 +89,8 @@ static int vfio_platform_amdxgbe_reset(struct vfio_platform_device *vdev) } while ((pcs_value & MDIO_CTRL1_RESET) && --count); if (pcs_value & MDIO_CTRL1_RESET) - pr_warn("%s XGBE PHY reset timeout\n", __func__); + dev_warn(vdev->device, "%s: XGBE PHY reset timeout\n", + __func__); /* disable auto-negotiation */ value = xmdio_read(xpcs_regs->ioaddr, MDIO_MMD_AN, MDIO_CTRL1); @@ -114,7 +115,7 @@ static int vfio_platform_amdxgbe_reset(struct vfio_platform_device *vdev) usleep_range(500, 600); if (!count) - pr_warn("%s MAC SW reset failed\n", __func__); + dev_warn(vdev->device, "%s: MAC SW reset failed\n", __func__); return 0; } diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c index c0cd824be2b7..2a45b36bcf58 100644 --- a/drivers/vfio/platform/vfio_platform_common.c +++ b/drivers/vfio/platform/vfio_platform_common.c @@ -12,6 +12,8 @@ * GNU General Public License for more details. */ +#define dev_fmt(fmt) "VFIO: " fmt + #include <linux/device.h> #include <linux/acpi.h> #include <linux/iommu.h> @@ -63,7 +65,7 @@ static int vfio_platform_acpi_probe(struct vfio_platform_device *vdev, adev = ACPI_COMPANION(dev); if (!adev) { - pr_err("VFIO: ACPI companion device not found for %s\n", + dev_err(dev, "ACPI companion device not found for %s\n", vdev->name); return -ENODEV; } @@ -638,7 +640,7 @@ static int vfio_platform_of_probe(struct vfio_platform_device *vdev, ret = device_property_read_string(dev, "compatible", &vdev->compat); if (ret) - pr_err("VFIO: Cannot retrieve compat for %s\n", vdev->name); + dev_err(dev, "Cannot retrieve compat for %s\n", vdev->name); return ret; } @@ -680,14 +682,14 @@ int vfio_platform_probe_common(struct vfio_platform_device *vdev, ret = vfio_platform_get_reset(vdev); if (ret && vdev->reset_required) { - pr_err("VFIO: No reset function found for device %s\n", - vdev->name); + dev_err(dev, "No reset function found for device %s\n", + vdev->name); return ret; } group = vfio_iommu_group_get(dev); if (!group) { - pr_err("VFIO: No IOMMU group for device %s\n", vdev->name); + dev_err(dev, "No IOMMU group for device %s\n", vdev->name); ret = -EINVAL; goto put_reset; } |