All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/virtio/virtio-trace: fix swapped read/write label in path error
@ 2026-11-04  8:19 Gu Bin
  2026-11-04  8:21 ` sashiko-bot
  2026-11-04  9:36 ` Eugenio Perez Martin
  0 siblings, 2 replies; 3+ messages in thread
From: Gu Bin @ 2026-11-04  8:19 UTC (permalink / raw)
  To: mst; +Cc: jasowangio, eperezma, xuanzhuo, virtualization, linux-kernel

make_path() builds the path whose direction is given by
this_is_write_path, but the pr_err() labels it with the opposite
direction: "read" when building the write path and "write" when
building the read path, pointing the user at the wrong side when
path generation fails. This is a cosmetic fix: only the error
message text is wrong, the path construction logic is unaffected.

Swap the literals so the message matches the attempted path.

Fixes: 108fc82596e3 ("tools: Add guest trace agent as a user tool")
Signed-off-by: Gu Bin <gubin@cmss.chinamobile.com>
---
 tools/virtio/virtio-trace/trace-agent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virtio/virtio-trace/trace-agent.c b/tools/virtio/virtio-trace/trace-agent.c
index 7e2d9bbf0b84..555521fc8bfd 100644
--- a/tools/virtio/virtio-trace/trace-agent.c
+++ b/tools/virtio/virtio-trace/trace-agent.c
@@ -130,7 +130,7 @@ static const char *make_path(int cpu_num, bool this_is_write_path)
 
 	if (ret <= 0) {
 		pr_err("Failed to generate %s path(CPU#%d):%d\n",
-			this_is_write_path ? "read" : "write", cpu_num, ret);
+			this_is_write_path ? "write" : "read", cpu_num, ret);
 		goto error;
 	}
 
-- 
2.55.0.windows.3




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tools/virtio/virtio-trace: fix swapped read/write label in path error
  2026-11-04  8:19 [PATCH] tools/virtio/virtio-trace: fix swapped read/write label in path error Gu Bin
@ 2026-11-04  8:21 ` sashiko-bot
  2026-11-04  9:36 ` Eugenio Perez Martin
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-04  8:21 UTC (permalink / raw)
  To: Gu Bin; +Cc: virtualization, Michael S. Tsirkin, Eugenio Perez

> make_path() builds the path whose direction is given by
> this_is_write_path, but the pr_err() labels it with the opposite
> direction: "read" when building the write path and "write" when
> building the read path, pointing the user at the wrong side when
> path generation fails. This is a cosmetic fix: only the error
> message text is wrong, the path construction logic is unaffected.
> 
> Swap the literals so the message matches the attempted path.
> 
> Fixes: 108fc82596e3 ("tools: Add guest trace agent as a user tool")
> Signed-off-by: Gu Bin <gubin@cmss.chinamobile.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261104081903.1834-1-gubin@cmss.chinamobile.com?part=1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tools/virtio/virtio-trace: fix swapped read/write label in path error
  2026-11-04  8:19 [PATCH] tools/virtio/virtio-trace: fix swapped read/write label in path error Gu Bin
  2026-11-04  8:21 ` sashiko-bot
@ 2026-11-04  9:36 ` Eugenio Perez Martin
  1 sibling, 0 replies; 3+ messages in thread
From: Eugenio Perez Martin @ 2026-11-04  9:36 UTC (permalink / raw)
  To: Gu Bin; +Cc: mst, jasowangio, xuanzhuo, virtualization, linux-kernel

On Wed, Nov 4, 2026 at 9:22 AM Gu Bin <gubin@cmss.chinamobile.com> wrote:
>
> make_path() builds the path whose direction is given by
> this_is_write_path, but the pr_err() labels it with the opposite
> direction: "read" when building the write path and "write" when
> building the read path, pointing the user at the wrong side when
> path generation fails. This is a cosmetic fix: only the error
> message text is wrong, the path construction logic is unaffected.
>
> Swap the literals so the message matches the attempted path.
>
> Fixes: 108fc82596e3 ("tools: Add guest trace agent as a user tool")

Acked-by: Eugenio Pérez <eperezma@redhat.com>

Thanks!

> Signed-off-by: Gu Bin <gubin@cmss.chinamobile.com>
> ---
>  tools/virtio/virtio-trace/trace-agent.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/virtio/virtio-trace/trace-agent.c b/tools/virtio/virtio-trace/trace-agent.c
> index 7e2d9bbf0b84..555521fc8bfd 100644
> --- a/tools/virtio/virtio-trace/trace-agent.c
> +++ b/tools/virtio/virtio-trace/trace-agent.c
> @@ -130,7 +130,7 @@ static const char *make_path(int cpu_num, bool this_is_write_path)
>
>         if (ret <= 0) {
>                 pr_err("Failed to generate %s path(CPU#%d):%d\n",
> -                       this_is_write_path ? "read" : "write", cpu_num, ret);
> +                       this_is_write_path ? "write" : "read", cpu_num, ret);
>                 goto error;
>         }
>
> --
> 2.55.0.windows.3
>
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-04  9:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04  8:19 [PATCH] tools/virtio/virtio-trace: fix swapped read/write label in path error Gu Bin
2026-11-04  8:21 ` sashiko-bot
2026-11-04  9:36 ` Eugenio Perez Martin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.