virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vhost-scsi: fix argument order in tport allocation error message
@ 2025-09-13 15:40 Alok Tiwari
  2025-09-15 14:46 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Alok Tiwari @ 2025-09-13 15:40 UTC (permalink / raw)
  To: michael.christie, pbonzini, stefanha, eperezma, mst, jasowang,
	virtualization
  Cc: alok.a.tiwari, kvm

The error log in vhost_scsi_make_tport() prints the arguments in the
wrong order, producing confusing output. For example, when creating a
target with a name in WWNN format such as "fc.port1234", the log
looks like:

  Emulated fc.port1234 Address: FCP, exceeds max: 64

Instead, the message should report the emulated protocol type first,
followed by the configfs name as:

  Emulated FCP Address: fc.port1234, exceeds max: 64

Fix the argument order so the error log is consistent and clear.

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
 drivers/vhost/scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index abf51332a5c5..98e4f68f4e3c 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -2884,7 +2884,7 @@ vhost_scsi_make_tport(struct target_fabric_configfs *tf,
 check_len:
 	if (strlen(name) >= VHOST_SCSI_NAMELEN) {
 		pr_err("Emulated %s Address: %s, exceeds"
-			" max: %d\n", name, vhost_scsi_dump_proto_id(tport),
+			" max: %d\n", vhost_scsi_dump_proto_id(tport), name,
 			VHOST_SCSI_NAMELEN);
 		kfree(tport);
 		return ERR_PTR(-EINVAL);
-- 
2.50.1


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

* Re: [PATCH] vhost-scsi: fix argument order in tport allocation error message
  2025-09-13 15:40 [PATCH] vhost-scsi: fix argument order in tport allocation error message Alok Tiwari
@ 2025-09-15 14:46 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2025-09-15 14:46 UTC (permalink / raw)
  To: Alok Tiwari
  Cc: michael.christie, pbonzini, eperezma, mst, jasowang,
	virtualization, kvm

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

On Sat, Sep 13, 2025 at 08:40:53AM -0700, Alok Tiwari wrote:
> The error log in vhost_scsi_make_tport() prints the arguments in the
> wrong order, producing confusing output. For example, when creating a
> target with a name in WWNN format such as "fc.port1234", the log
> looks like:
> 
>   Emulated fc.port1234 Address: FCP, exceeds max: 64
> 
> Instead, the message should report the emulated protocol type first,
> followed by the configfs name as:
> 
>   Emulated FCP Address: fc.port1234, exceeds max: 64
> 
> Fix the argument order so the error log is consistent and clear.
> 
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
>  drivers/vhost/scsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2025-09-15 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-13 15:40 [PATCH] vhost-scsi: fix argument order in tport allocation error message Alok Tiwari
2025-09-15 14:46 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).