Pointers should be printed with %p or %px rather than
cast to (unsigned long long) and printed with %llu.
Change %llu to %p to print the pointer into sysfs.

Signed-off-by: Guo Zhi <[email protected]>
---
 drivers/scsi/scsi_transport_iscsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_transport_iscsi.c 
b/drivers/scsi/scsi_transport_iscsi.c
index 922e4c7bd88e..7d6a570ebf48 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -129,8 +129,8 @@ show_transport_handle(struct device *dev, struct 
device_attribute *attr,
 
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
-       return sysfs_emit(buf, "%llu\n",
-                 (unsigned long long)iscsi_handle(priv->iscsi_transport));
+       return sysfs_emit(buf, "%p\n",
+               iscsi_ptr(priv->iscsi_transport));
 }
 static DEVICE_ATTR(handle, S_IRUGO, show_transport_handle, NULL);
 
-- 
2.33.0

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/20211009030254.205714-1-qtxuning1999%40sjtu.edu.cn.

Reply via email to