From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, CHARSET_FARAWAY_HEADER,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6D8DC433EF for ; Thu, 23 Sep 2021 02:03:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB17560F6F for ; Thu, 23 Sep 2021 02:03:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238912AbhIWCF2 convert rfc822-to-8bit (ORCPT ); Wed, 22 Sep 2021 22:05:28 -0400 Received: from smtp179.sjtu.edu.cn ([202.120.2.179]:37220 "EHLO smtp179.sjtu.edu.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238884AbhIWCFX (ORCPT ); Wed, 22 Sep 2021 22:05:23 -0400 Received: from mta03.sjtu.edu.cn (mta03.sjtu.edu.cn [202.121.179.7]) by smtp179.sjtu.edu.cn (Postfix) with ESMTPS id 8B372100B0959; Thu, 23 Sep 2021 10:03:49 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mta03.sjtu.edu.cn (Postfix) with ESMTP id 70848D6EFD; Thu, 23 Sep 2021 10:03:49 +0800 (CST) X-Virus-Scanned: amavisd-new at mta03.sjtu.edu.cn Received: from mta03.sjtu.edu.cn ([127.0.0.1]) by localhost (mta03.sjtu.edu.cn [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4C6s5MCwP_CS; Thu, 23 Sep 2021 10:03:49 +0800 (CST) Received: from mstore105.sjtu.edu.cn (unknown [10.118.0.105]) by mta03.sjtu.edu.cn (Postfix) with ESMTP id 529AAD6EF7; Thu, 23 Sep 2021 10:03:49 +0800 (CST) Date: Thu, 23 Sep 2021 10:03:49 +0800 (CST) From: =?gb2312?B?ufnWvg==?= To: "Marciniszyn, Mike" , "Dalessandro, Dennis" , dledford@redhat.com Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <469291264.232666.1632362629275.JavaMail.zimbra@sjtu.edu.cn> In-Reply-To: References: <20210922134857.619602-1-qtxuning1999@sjtu.edu.cn> Subject: Re: [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c MIME-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8BIT X-Originating-IP: [202.120.40.82] X-Mailer: Zimbra 8.8.15_GA_4125 (ZimbraWebClient - GC92 (Linux)/8.8.15_GA_3928) Thread-Topic: infiniband hfi1: fix misuse of %x in ipoib_tx.c Thread-Index: AQHXr7imk55risfKAUmS2+aCDTMROauwTzmgJgnZbt8= Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org I will change %p to %px and submit a new patch. Thanks. Guo ----- 原始邮件 ----- 发件人: "Marciniszyn, Mike" 收件人: "Guo Zhi" , "Dalessandro, Dennis" , dledford@redhat.com 抄送: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org 发送时间: 星期四, 2021年 9 月 23日 上午 1:51:08 主题: RE: [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c > Subject: [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c > > Pointers should be printed with %p or %px rather than cast to (unsigned long > long) and printed with %llx. > Change %llx to %p to print the pointer. > > Signed-off-by: Guo Zhi The unsigned long long was originally used to insure the entire accurate pointer as emitted. This is to ensure the pointers in prints and event traces match values in stacks and register dumps. I think the %p will obfuscate the pointer so %px is correct for our use case. Mike