[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211009043851.212503-1-qtxuning1999@sjtu.edu.cn>
Date: Sat, 9 Oct 2021 12:38:51 +0800
From: Guo Zhi <qtxuning1999@...u.edu.cn>
To: Lee Duncan <lduncan@...e.com>, Chris Leech <cleech@...hat.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Guo Zhi <qtxuning1999@...u.edu.cn>, open-iscsi@...glegroups.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2] scsi scsi_transport_iscsi.c: fix misuse of %llu in scsi_transport_iscsi.c
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 <qtxuning1999@...u.edu.cn>
---
drivers/scsi/scsi_transport_iscsi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 922e4c7bd88e..14050c4fdb89 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -129,8 +129,7 @@ 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", priv->iscsi_transport);
}
static DEVICE_ATTR(handle, S_IRUGO, show_transport_handle, NULL);
--
2.33.0
Powered by blists - more mailing lists