Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vhost-scsi: fix argument order in tport allocation error message

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>
Message-Id: <20250913154106.3995856-1-alok.a.tiwari@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

authored by

Alok Tiwari and committed by
Michael S. Tsirkin
a318eb80 76eeb9b8

+1 -1
+1 -1
drivers/vhost/scsi.c
··· 2884 2884 check_len: 2885 2885 if (strlen(name) >= VHOST_SCSI_NAMELEN) { 2886 2886 pr_err("Emulated %s Address: %s, exceeds" 2887 - " max: %d\n", name, vhost_scsi_dump_proto_id(tport), 2887 + " max: %d\n", vhost_scsi_dump_proto_id(tport), name, 2888 2888 VHOST_SCSI_NAMELEN); 2889 2889 kfree(tport); 2890 2890 return ERR_PTR(-EINVAL);