[PATCH 1/2] virtio: Remove redundant 'virtio:' prefix in error messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dev_err() already prefixes the virtio device name which is enough for users
to know that the error is coming from the virtio driver. Adding one more
'virtio:' prefix is redundant. It results in error logs as below:

virtio_net virtio0: virtio: device uses modern interface but does not have
VIRTIO_F_VERSION_1

So remove the 'virtio:' prefix which is redundant.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
---
 drivers/virtio/virtio.c            | 3 +--
 drivers/virtio/virtio_pci_modern.c | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index b968b2aa5f4d..0e06aae8071b 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -194,8 +194,7 @@ static int virtio_features_ok(struct virtio_device *dev)
 	virtio_add_status(dev, VIRTIO_CONFIG_S_FEATURES_OK);
 	status = dev->config->get_status(dev);
 	if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) {
-		dev_err(&dev->dev, "virtio: device refuses features: %x\n",
-			status);
+		dev_err(&dev->dev, "device refuses features: %x\n", status);
 		return -ENODEV;
 	}
 	return 0;
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index f62b530aa3b5..e34ed4870af4 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -237,7 +237,7 @@ static int __vp_check_common_size_one_feature(struct virtio_device *vdev, u32 fb
 		return 0;
 
 	dev_err(&vdev->dev,
-		"virtio: common cfg size(%zu) does not match the feature %s\n",
+		"common cfg size(%zu) does not match the feature %s\n",
 		vp_dev->mdev.common_len, fname);
 
 	return -EINVAL;
@@ -274,7 +274,7 @@ static int vp_finalize_features(struct virtio_device *vdev)
 	vp_transport_features(vdev, features);
 
 	if (!__virtio_test_bit(vdev, VIRTIO_F_VERSION_1)) {
-		dev_err(&vdev->dev, "virtio: device uses modern interface "
+		dev_err(&vdev->dev, "device uses modern interface "
 			"but does not have VIRTIO_F_VERSION_1\n");
 		return -EINVAL;
 	}
-- 
2.25.1





[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux