Re: [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c
From: 郭志
Date: Wed Sep 22 2021 - 22:04:00 EST
I will change %p to %px and submit a new patch.
Thanks.
Guo
----- 原始邮件 -----
发件人: "Marciniszyn, Mike" <mike.marciniszyn@xxxxxxxxxxxxxxxxxxxx>
收件人: "Guo Zhi" <qtxuning1999@xxxxxxxxxxx>, "Dalessandro, Dennis" <dennis.dalessandro@xxxxxxxxxxxxxxxxxxxx>, dledford@xxxxxxxxxx
抄送: linux-rdma@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
发送时间: 星期四, 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 <qtxuning1999@xxxxxxxxxxx>
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