git: 792e47a51a42 - main - ocs_fc: print instance_index value rather than pointer itself in ocs_cam.c

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sat, 28 Dec 2024 21:17:22 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=792e47a51a422ed434ee93d1151737c4d5c9761a

commit 792e47a51a422ed434ee93d1151737c4d5c9761a
Author:     Fuqian Huang <huangfq.daxian@gmail.com>
AuthorDate: 2024-12-28 21:12:35 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-12-28 21:12:35 +0000

    ocs_fc: print instance_index value rather than pointer itself in ocs_cam.c
    
    In function ocs_scsi_recv_tmf, print instance_index rather than
    the pointer itself to avoid printing out kernel pointer to user space.
    
    PR: 238659
    Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
    Reviewed-by: imp
---
 sys/dev/ocs_fc/ocs_cam.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/ocs_fc/ocs_cam.c b/sys/dev/ocs_fc/ocs_cam.c
index a944c7628d85..772e7ca1c383 100644
--- a/sys/dev/ocs_fc/ocs_cam.c
+++ b/sys/dev/ocs_fc/ocs_cam.c
@@ -700,8 +700,8 @@ int32_t ocs_scsi_recv_tmf(ocs_io_t *tmfio, uint64_t lun, ocs_scsi_tmf_cmd_e cmd,
 		trsrc = &fcp->targ_rsrc_wildcard;
 	}
 
-	device_printf(tmfio->ocs->dev, "%s: io=%p cmd=%#x LU=%lx en=%s\n",
-			__func__, tmfio, cmd, (unsigned long)lun,
+	device_printf(tmfio->ocs->dev, "%s: io=%u(index) cmd=%#x LU=%lx en=%s\n",
+			__func__, tmfio->instance_index, cmd, (unsigned long)lun,
 			trsrc ? (trsrc->enabled ? "T" : "F") : "X");
 	if (trsrc) {
 		inot = (struct ccb_immediate_notify *)STAILQ_FIRST(&trsrc->inot);