Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2946982pxb; Fri, 8 Oct 2021 20:16:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoLkCj1Cg01DJ2iV+VVsrOGm0L2nrxGg/Hlt19vP+snP8E6+yYkHdpNVTPYcWna6xPkueN X-Received: by 2002:a17:906:32d6:: with SMTP id k22mr8971620ejk.228.1633749388088; Fri, 08 Oct 2021 20:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633749388; cv=none; d=google.com; s=arc-20160816; b=kko67GBZpw4y3qG/k8phX5ZCUlI5eE3N8ZqDugjFY/rzLkEADLDdOL13dS59HSEGUY SPNZogfPdQrC2mx2i4ZcOjKRmxZN5/7lYaG/jbP7y8j5LoKEDo9ALhanfZGKv79BL5+9 nDcvJtSJqa6+reTO8sXPQwLX+u2uJBKFqFy0VB85qSqccGTsZnkzWKBXf5bo1HeEgq8U NduDy6DwxQHKHoox9XzHSbQ8m3PeBSW4eIHPaO6BJPMSUZxbLV6ahZK+/NV57ndAMKHh i2+/U8wLb9G2nRsPkMsaWwE1i7h4TG/LBMyq1jVdFI+ZIAQ6Pr3q+ItyE8Ycou6FwI2V WYKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=4vTWFGe9uzlnioKvU+KSfLMGMI9bjFu5p2JXXpl4PUo=; b=ucSjYeeNVjsLCOwIhqnCWWBk9D0J1O9Yc8LxpOw7y7atug9axl1UrZvtMNn4seetlg fbPpabIMQrVCz5DYktJmGEBTkfu/Qlu6jgGKCjmWVbnBkbFQhsVwbVtK9Yaw76QKD1kv B+39sB13/1O46I/PiO15w5DHMbSk00GEAjrKLj8INJpUssMu9GVYilYXB5ECw3g1q6o4 JHlqdmt38wEkode2HxKGW32FZQxp1l1rSoSyeklBr/bjTjUXCdw8+4oQyqE/kC7vvmUt TYJkO3g/SgWPdwFMHrmyP6RYQWSQyi5P1etwDjP3c1Z5Bq45GaD/Zw3MXaOeonhON2cT 0Jaw== 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 s15si1504357edy.399.2021.10.08.20.16.04; Fri, 08 Oct 2021 20:16:28 -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 S244152AbhJIDQh (ORCPT + 99 others); Fri, 8 Oct 2021 23:16:37 -0400 Received: from smtprelay0018.hostedemail.com ([216.40.44.18]:34634 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230400AbhJIDQg (ORCPT ); Fri, 8 Oct 2021 23:16:36 -0400 Received: from omf05.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id 8CED0182CED2A; Sat, 9 Oct 2021 03:14:39 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf05.hostedemail.com (Postfix) with ESMTPA id 52038B2794; Sat, 9 Oct 2021 03:14:38 +0000 (UTC) Message-ID: <5daf69b365e23ceecee911c4d0f2f66a0b9ec95c.camel@perches.com> Subject: Re: [PATCH] scsi scsi_transport_iscsi.c: fix misuse of %llu in scsi_transport_iscsi.c From: Joe Perches To: Guo Zhi , Lee Duncan , Chris Leech , "James E.J. Bottomley" , "Martin K. Petersen" Cc: open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 08 Oct 2021 20:14:36 -0700 In-Reply-To: <20211009030254.205714-1-qtxuning1999@sjtu.edu.cn> References: <20211009030254.205714-1-qtxuning1999@sjtu.edu.cn> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspamout05 X-Rspamd-Queue-Id: 52038B2794 X-Spam-Status: No, score=-1.18 X-Stat-Signature: bbw3xsbbdkewqjzc9ac3mxsm7cyt9oi8 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19VniraqeieMIuZT0TmPUPv+WTE0gtE6oM= X-HE-Tag: 1633749278-20152 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); ?