Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1367396pxb; Mon, 11 Oct 2021 04:38:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlrv2z/NJVviD7PFCJlGfBa0llwBbIKU9V1TL4ltNXZZpdphrEQNSKgGkwJ9GnFhVMuNeo X-Received: by 2002:a63:df06:: with SMTP id u6mr17906196pgg.148.1633952303045; Mon, 11 Oct 2021 04:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633952303; cv=none; d=google.com; s=arc-20160816; b=ZBp9zkChi73zGo3DHQjxYKNP3YAwfLnUqGUQqFCfTSn06WccG1pahkeRrxAvQvWfDT mKau/swQ5yk9sixTUAZuAXKto1Y5fRFouTErAslk0PsjqNMtwkUV+JE8uowjptcY5jBW Ew/3bIt6BTwHSN+ugm0TrCvjRhLSDS70KjNY7U6g3e9DXWwAp+GNwcAZSbJSAOx79dOA ZeWlh0oNkSiQj+TsIaIrKLXDcfh2oMCCqnR9bH3OdDGPr2UvtqvmUucN2pD0r/9ilrZH KPFKX9hRoLRO8zfetNOZuV5uWCd3jvYwDYS8qfaenR92F9c66U7pb+hUzxX0P/P8Ct7f 5olg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:content-transfer-encoding :mime-version:in-reply-to:references:subject:cc:to:from:date :message-id; bh=JnA2AHFeYJa6tYInVdOs7Zur+gciyYevAHHE458THJU=; b=kROM8JaMsR2rlv/Fpk42N3ur8Lp4wVTXIotvrjMBlqoEErx2/LYilUk4Dqcw+erggN 8E0mjdNfin0SFVZfl4mVbdhFm67nACdeEpehgAmserscMcblqvQjuRKFoKjJKvz9CkRu M7U53uZnjjZ8Cbu7JitTr4giujaXAAnfBnvbnH4z0z4paMgvG0whNXlg0EGFDB52CUwN kCR5lCh0v4XYeYRVVmjaRpjsALxK21x6Bzwinj7C5D3pomacCSS09LxttVTn4QfyPJSl Tqvhss2aRlxA1DdC5A+QntsAE+j7opQUwPW7KolvTzJfmv5tn7lk3Jy1OfevgJ2c+zhX vGEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si11937338plg.28.2021.10.11.04.38.09; Mon, 11 Oct 2021 04:38:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234216AbhJKGmm convert rfc822-to-8bit (ORCPT + 99 others); Mon, 11 Oct 2021 02:42:42 -0400 Received: from mx1.uni-regensburg.de ([194.94.157.146]:37114 "EHLO mx1.uni-regensburg.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbhJKGml (ORCPT ); Mon, 11 Oct 2021 02:42:41 -0400 X-Greylist: delayed 307 seconds by postgrey-1.27 at vger.kernel.org; Mon, 11 Oct 2021 02:42:40 EDT Received: from mx1.uni-regensburg.de (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 4D28A6000056; Mon, 11 Oct 2021 08:35:29 +0200 (CEST) Received: from gwsmtp.uni-regensburg.de (gwsmtp1.uni-regensburg.de [132.199.5.51]) by mx1.uni-regensburg.de (Postfix) with ESMTP id 321076000052; Mon, 11 Oct 2021 08:35:29 +0200 (CEST) Received: from uni-regensburg-smtp1-MTA by gwsmtp.uni-regensburg.de with Novell_GroupWise; Mon, 11 Oct 2021 08:35:29 +0200 Message-Id: <6163DB2E020000A1000445F1@gwsmtp.uni-regensburg.de> X-Mailer: Novell GroupWise Internet Agent 18.3.1 Date: Mon, 11 Oct 2021 08:35:26 +0200 From: "Ulrich Windl" To: , , "Chris Leech" , , "Lee Duncan" Cc: "open-iscsi" , , Subject: Antw: [EXT] Re: [PATCH] scsi scsi_transport_iscsi.c: fix misuse of %llu in scsi_transport_iscsi.c References: <20211009030254.205714-1-qtxuning1999@sjtu.edu.cn> <5daf69b365e23ceecee911c4d0f2f66a0b9ec95c.camel@perches.com> In-Reply-To: <5daf69b365e23ceecee911c4d0f2f66a0b9ec95c.camel@perches.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> Joe Perches schrieb am 09.10.2021 um 05:14 in Nachricht <5daf69b365e23ceecee911c4d0f2f66a0b9ec95c.camel@perches.com>: > On Sat, 2021-10-09 at 11:02 +0800, Guo Zhi wrote: >> 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. > ][] >> diff --git 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)); > > iscsi_transport is a pointer isn't it? > > so why not just > > return sysfs_emit(buf, "%p\n", priv->iscsi_transport); Isn't the difference that %p outputs hex, while %u outputs decimal? > > ? > > -- > 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 open-iscsi+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/open-iscsi/5daf69b365e23ceecee911c4d0f2f66a > 0b9ec95c.camel%40perches.com.