* [PATCH] virtio: update multi-line comments to the preferred style
@ 2026-09-22 17:16 Siddharth Karanam
2026-09-22 18:35 ` Michael S. Tsirkin
0 siblings, 1 reply; 2+ messages in thread
From: Siddharth Karanam @ 2026-09-22 17:16 UTC (permalink / raw)
To: mst, jasowangio, eperezma, xuanzhuo
Cc: virtualization, linux-kernel, Siddharth Karanam
Some multi-line comments were not in the kernel coding style.
Signed-off-by: Siddharth Karanam <sid9.karanam@gmail.com>
---
drivers/virtio/virtio.c | 32 ++++++++++++++++++++++----------
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index b6c9e927bef5..c6dffced864a 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -51,8 +51,10 @@ static ssize_t features_show(struct device *_d,
unsigned int i;
ssize_t len = 0;
- /* We actually represent this as a bitstring, as it could be
- * arbitrary length in future. */
+ /*
+ * We actually represent this as a bitstring, as it could be
+ * arbitrary length in future.
+ */
for (i = 0; i < VIRTIO_FEATURES_BITS; i++)
len += sysfs_emit_at(buf, len, "%c",
__virtio_test_bit(dev, i) ? '1' : '0');
@@ -80,8 +82,10 @@ static inline int virtio_id_match(const struct virtio_device *dev,
return id->vendor == VIRTIO_DEV_ANY_ID || id->vendor == dev->id.vendor;
}
-/* This looks through all the IDs a driver claims to support. If any of them
- * match, we return 1 and the kernel will call virtio_dev_probe(). */
+/*
+ * This looks through all the IDs a driver claims to support.
+ * If any of them match, we return 1 and the kernel will call virtio_dev_probe().
+ */
static int virtio_dev_match(struct device *_dv, const struct device_driver *_dr)
{
unsigned int i;
@@ -565,8 +569,12 @@ int register_virtio_device(struct virtio_device *dev)
INIT_LIST_HEAD(&dev->vqs);
spin_lock_init(&dev->vqs_list_lock);
- /* We always start by resetting the device, in case a previous
- * driver messed it up. This also tests that code path a little. */
+ /*
+ * We always start by resetting the device, in case a previous
+ * driver messed it up.
+ *
+ * This also tests that code path a little.
+ */
virtio_reset_device(dev);
/* Acknowledge that we've seen the device. */
@@ -615,15 +623,19 @@ static int virtio_device_restore_priv(struct virtio_device *dev, bool restore)
struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
int ret;
- /* We always start by resetting the device, in case a previous
- * driver messed it up. */
+ /*
+ * We always start by resetting the device, in case a previous
+ * driver messed it up.
+ */
virtio_reset_device(dev);
/* Acknowledge that we've seen the device. */
virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
- /* Maybe driver failed before freeze.
- * Restore the failed status, for debugging. */
+ /*
+ * Maybe driver failed before freeze.
+ * Restore the failed status, for debugging.
+ */
if (dev->failed)
virtio_add_status(dev, VIRTIO_CONFIG_S_FAILED);
--
2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] virtio: update multi-line comments to the preferred style
2026-09-22 17:16 [PATCH] virtio: update multi-line comments to the preferred style Siddharth Karanam
@ 2026-09-22 18:35 ` Michael S. Tsirkin
0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2026-09-22 18:35 UTC (permalink / raw)
To: Siddharth Karanam
Cc: jasowangio, eperezma, xuanzhuo, virtualization, linux-kernel
On Tue, Sep 22, 2026 at 10:46:36PM +0530, Siddharth Karanam wrote:
> Some multi-line comments were not in the kernel coding style.
>
> Signed-off-by: Siddharth Karanam <sid9.karanam@gmail.com>
not really interested, sorry. whoever is editing this code
can change the surrounding comments, this kind of thing is
just pain for backports for no gain.
> ---
> drivers/virtio/virtio.c | 32 ++++++++++++++++++++++----------
> 1 file changed, 22 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
> index b6c9e927bef5..c6dffced864a 100644
> --- a/drivers/virtio/virtio.c
> +++ b/drivers/virtio/virtio.c
> @@ -51,8 +51,10 @@ static ssize_t features_show(struct device *_d,
> unsigned int i;
> ssize_t len = 0;
>
> - /* We actually represent this as a bitstring, as it could be
> - * arbitrary length in future. */
> + /*
> + * We actually represent this as a bitstring, as it could be
> + * arbitrary length in future.
> + */
> for (i = 0; i < VIRTIO_FEATURES_BITS; i++)
> len += sysfs_emit_at(buf, len, "%c",
> __virtio_test_bit(dev, i) ? '1' : '0');
> @@ -80,8 +82,10 @@ static inline int virtio_id_match(const struct virtio_device *dev,
> return id->vendor == VIRTIO_DEV_ANY_ID || id->vendor == dev->id.vendor;
> }
>
> -/* This looks through all the IDs a driver claims to support. If any of them
> - * match, we return 1 and the kernel will call virtio_dev_probe(). */
> +/*
> + * This looks through all the IDs a driver claims to support.
> + * If any of them match, we return 1 and the kernel will call virtio_dev_probe().
> + */
> static int virtio_dev_match(struct device *_dv, const struct device_driver *_dr)
> {
> unsigned int i;
> @@ -565,8 +569,12 @@ int register_virtio_device(struct virtio_device *dev)
> INIT_LIST_HEAD(&dev->vqs);
> spin_lock_init(&dev->vqs_list_lock);
>
> - /* We always start by resetting the device, in case a previous
> - * driver messed it up. This also tests that code path a little. */
> + /*
> + * We always start by resetting the device, in case a previous
> + * driver messed it up.
> + *
> + * This also tests that code path a little.
> + */
> virtio_reset_device(dev);
>
> /* Acknowledge that we've seen the device. */
> @@ -615,15 +623,19 @@ static int virtio_device_restore_priv(struct virtio_device *dev, bool restore)
> struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
> int ret;
>
> - /* We always start by resetting the device, in case a previous
> - * driver messed it up. */
> + /*
> + * We always start by resetting the device, in case a previous
> + * driver messed it up.
> + */
> virtio_reset_device(dev);
>
> /* Acknowledge that we've seen the device. */
> virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
>
> - /* Maybe driver failed before freeze.
> - * Restore the failed status, for debugging. */
> + /*
> + * Maybe driver failed before freeze.
> + * Restore the failed status, for debugging.
> + */
> if (dev->failed)
> virtio_add_status(dev, VIRTIO_CONFIG_S_FAILED);
>
> --
> 2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-22 18:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 17:16 [PATCH] virtio: update multi-line comments to the preferred style Siddharth Karanam
2026-09-22 18:35 ` Michael S. Tsirkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®