* [PATCH 2/3] virtio-mem: fix multiple typos in struct comments and function docs
2025-05-27 18:33 [PATCH 1/3] virtio: Fix typo in register_virtio_device() doc comment Alok Tiwari
@ 2025-05-27 18:33 ` Alok Tiwari
2025-05-27 19:12 ` David Hildenbrand
2025-05-27 18:33 ` [PATCH 3/3] virtio_ring: Fix typos in comments and documentation Alok Tiwari
2025-05-29 6:02 ` [PATCH 1/3] virtio: Fix typo in register_virtio_device() doc comment Jason Wang
2 siblings, 1 reply; 6+ messages in thread
From: Alok Tiwari @ 2025-05-27 18:33 UTC (permalink / raw)
To: david, mst, jasowang, xuanzhuo, eperezma, virtualization
Cc: alok.a.tiwari, linux-kernel, darren.kenny
Corrected several spelling mistakes in code comments, including:
- "bock" -> "block"
- "valued" -> "value"
- "actipn" -> "action"
- "accidentially" -> "accidentally"
- Improved grammar in a few places for clarity.
These changes are purely cosmetic and do not affect functionality.
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/virtio/virtio_mem.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index 56d0dbe62163..f318a2d3c885 100644
--- a/drivers/virtio/virtio_mem.c
+++ b/drivers/virtio/virtio_mem.c
@@ -164,7 +164,7 @@ struct virtio_mem {
unsigned long first_mb_id;
/* Id of the last usable memory block of this device. */
unsigned long last_usable_mb_id;
- /* Id of the next memory bock to prepare when needed. */
+ /* Id of the next memory block to prepare when needed. */
unsigned long next_mb_id;
/* The subblock size. */
@@ -209,7 +209,7 @@ struct virtio_mem {
unsigned long first_bb_id;
/* Id of the last usable big block of this device. */
unsigned long last_usable_bb_id;
- /* Id of the next device bock to prepare when needed. */
+ /* Id of the next device block to prepare when needed. */
unsigned long next_bb_id;
/* Summary of all big block states. */
@@ -240,7 +240,7 @@ struct virtio_mem {
/* An error occurred we cannot handle - stop processing requests. */
bool broken;
- /* Cached valued of is_kdump_kernel() when the device was probed. */
+ /* Cached value of is_kdump_kernel() when the device was probed. */
bool in_kdump;
/* The driver is being removed. */
@@ -615,7 +615,7 @@ static int virtio_mem_sbm_sb_states_prepare_next_mb(struct virtio_mem *vm)
/*
* Test if we could add memory without creating too much offline memory -
- * to avoid running OOM if memory is getting onlined deferred.
+ * to avoid running OOM if memory is getting online deferred.
*/
static bool virtio_mem_could_add_memory(struct virtio_mem *vm, uint64_t size)
{
@@ -808,7 +808,7 @@ static int virtio_mem_sbm_try_remove_unplugged_mb(struct virtio_mem *vm,
}
/*
- * See virtio_mem_offline_and_remove_memory(): Try to offline and remove a
+ * See virtio_mem_offline_and_remove_memory(): Try to offline and remove
* all Linux memory blocks covered by the big block.
*/
static int virtio_mem_bbm_offline_and_remove_bb(struct virtio_mem *vm,
@@ -1080,7 +1080,7 @@ static int virtio_mem_memory_notifier_cb(struct notifier_block *nb,
atomic64_sub(size, &vm->offline_size);
/*
* Start adding more memory once we onlined half of our
- * threshold. Don't trigger if it's possibly due to our actipn
+ * threshold. Don't trigger if it's possibly due to our action
* (e.g., us adding memory which gets onlined immediately from
* the core).
*/
@@ -2124,7 +2124,7 @@ static int virtio_mem_sbm_unplug_request(struct virtio_mem *vm, uint64_t diff)
* whole memory blocks along with metadata. We prioritize ZONE_MOVABLE
* as it's more reliable to unplug memory and remove whole memory
* blocks, and we don't want to trigger a zone imbalances by
- * accidentially removing too much kernel memory.
+ * accidentally removing too much kernel memory.
*/
for (i = 0; i < ARRAY_SIZE(mb_states); i++) {
virtio_mem_sbm_for_each_mb_rev(vm, mb_id, mb_states[i]) {
--
2.47.1
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 2/3] virtio-mem: fix multiple typos in struct comments and function docs
2025-05-27 18:33 ` [PATCH 2/3] virtio-mem: fix multiple typos in struct comments and function docs Alok Tiwari
@ 2025-05-27 19:12 ` David Hildenbrand
2025-05-27 19:22 ` [External] : " ALOK TIWARI
0 siblings, 1 reply; 6+ messages in thread
From: David Hildenbrand @ 2025-05-27 19:12 UTC (permalink / raw)
To: Alok Tiwari, mst, jasowang, xuanzhuo, eperezma, virtualization
Cc: linux-kernel, darren.kenny
> /*
> * Test if we could add memory without creating too much offline memory -
> - * to avoid running OOM if memory is getting onlined deferred.
> + * to avoid running OOM if memory is getting online deferred.
The system/user is onlining the memory, so the memory is getting "onlined"?
If it would be "getting online", wouldn't the memory start using the
internet or sth. like that? :D
> */
> static bool virtio_mem_could_add_memory(struct virtio_mem *vm, uint64_t size)
> {
--
Cheers,
David / dhildenb
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [External] : Re: [PATCH 2/3] virtio-mem: fix multiple typos in struct comments and function docs
2025-05-27 19:12 ` David Hildenbrand
@ 2025-05-27 19:22 ` ALOK TIWARI
0 siblings, 0 replies; 6+ messages in thread
From: ALOK TIWARI @ 2025-05-27 19:22 UTC (permalink / raw)
To: David Hildenbrand, mst, jasowang, xuanzhuo, eperezma, virtualization
Cc: linux-kernel, darren.kenny
On 28-05-2025 00:42, David Hildenbrand wrote:
>
>> /*
>> * Test if we could add memory without creating too much offline
>> memory -
>> - * to avoid running OOM if memory is getting onlined deferred.
>> + * to avoid running OOM if memory is getting online deferred.
>
> The system/user is onlining the memory, so the memory is getting "onlined"?
>
> If it would be "getting online", wouldn't the memory start using the
> internet or sth. like that? :D
>
>> */
>> static bool virtio_mem_could_add_memory(struct virtio_mem *vm,
>> uint64_t size)
>> {
>
>
Thanks for the clarification—makes sense. I'll keep the original.
Thanks,
Alok
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] virtio_ring: Fix typos in comments and documentation
2025-05-27 18:33 [PATCH 1/3] virtio: Fix typo in register_virtio_device() doc comment Alok Tiwari
2025-05-27 18:33 ` [PATCH 2/3] virtio-mem: fix multiple typos in struct comments and function docs Alok Tiwari
@ 2025-05-27 18:33 ` Alok Tiwari
2025-05-29 6:02 ` [PATCH 1/3] virtio: Fix typo in register_virtio_device() doc comment Jason Wang
2 siblings, 0 replies; 6+ messages in thread
From: Alok Tiwari @ 2025-05-27 18:33 UTC (permalink / raw)
To: david, mst, jasowang, xuanzhuo, eperezma, virtualization
Cc: alok.a.tiwari, linux-kernel, darren.kenny
Corrected several typos in virtio_ring.c for improved clarity and
consistency. Fixes include:
- "dind't" -> "didn't"
- "use" -> "uses" in DMA mapping context
- "can been used" -> "can be used"
- "buf size for sync" -> "buffer size to synchronize"
No functional changes.
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/virtio/virtio_ring.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index b784aab66867..e1456ec0db7c 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -606,7 +606,7 @@ static inline int virtqueue_add_split(struct virtqueue *_vq,
prev = i;
/* Note that we trust indirect descriptor
- * table since it use stream DMA mapping.
+ * table since it uses stream DMA mapping.
*/
i = virtqueue_add_desc_split(_vq, desc, extra, i, addr, len,
VRING_DESC_F_NEXT,
@@ -623,7 +623,7 @@ static inline int virtqueue_add_split(struct virtqueue *_vq,
prev = i;
/* Note that we trust indirect descriptor
- * table since it use stream DMA mapping.
+ * table since it uses stream DMA mapping.
*/
i = virtqueue_add_desc_split(_vq, desc, extra, i, addr, len,
VRING_DESC_F_NEXT |
@@ -2438,7 +2438,7 @@ EXPORT_SYMBOL_GPL(virtqueue_add_inbuf_premapped);
* virtqueue_dma_dev - get the dma dev
* @_vq: the struct virtqueue we're talking about.
*
- * Returns the dma dev. That can been used for dma api.
+ * Returns the dma dev. That can be used for dma api.
*/
struct device *virtqueue_dma_dev(struct virtqueue *_vq)
{
@@ -3225,7 +3225,7 @@ EXPORT_SYMBOL_GPL(virtqueue_dma_need_sync);
* @_vq: the struct virtqueue we're talking about.
* @addr: DMA address
* @offset: DMA address offset
- * @size: buf size for sync
+ * @size: buffer size to synchronize
* @dir: DMA direction
*
* Before calling this function, use virtqueue_dma_need_sync() to confirm that
@@ -3252,7 +3252,7 @@ EXPORT_SYMBOL_GPL(virtqueue_dma_sync_single_range_for_cpu);
* @_vq: the struct virtqueue we're talking about.
* @addr: DMA address
* @offset: DMA address offset
- * @size: buf size for sync
+ * @size: buffer size to synchronize
* @dir: DMA direction
*
* Before calling this function, use virtqueue_dma_need_sync() to confirm that
--
2.47.1
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/3] virtio: Fix typo in register_virtio_device() doc comment
2025-05-27 18:33 [PATCH 1/3] virtio: Fix typo in register_virtio_device() doc comment Alok Tiwari
2025-05-27 18:33 ` [PATCH 2/3] virtio-mem: fix multiple typos in struct comments and function docs Alok Tiwari
2025-05-27 18:33 ` [PATCH 3/3] virtio_ring: Fix typos in comments and documentation Alok Tiwari
@ 2025-05-29 6:02 ` Jason Wang
2 siblings, 0 replies; 6+ messages in thread
From: Jason Wang @ 2025-05-29 6:02 UTC (permalink / raw)
To: Alok Tiwari
Cc: david, mst, xuanzhuo, eperezma, virtualization, linux-kernel,
darren.kenny
On Wed, May 28, 2025 at 2:34 AM Alok Tiwari <alok.a.tiwari@oracle.com> wrote:
>
> Corrected "suceess" to "success" in the function documentation
> for clarity.
>
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
> drivers/virtio/virtio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
> index 95d5d7993e5b..2c022640ec4b 100644
> --- a/drivers/virtio/virtio.c
> +++ b/drivers/virtio/virtio.c
> @@ -506,7 +506,7 @@ static int virtio_device_of_init(struct virtio_device *dev)
> * On error, the caller must call put_device on &@dev->dev (and not kfree),
> * as another code path may have obtained a reference to @dev.
> *
> - * Returns: 0 on suceess, -error on failure
> + * Returns: 0 on success, -error on failure
> */
> int register_virtio_device(struct virtio_device *dev)
> {
> --
> 2.47.1
>
Acked-by: Jason Wang <jasowang@redhat.com>
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread