* [PATCH v2 03/06] misc: genwqe: Fix misuse of %x
@ 2019-04-21 11:47 Fuqian Huang
2019-04-23 7:55 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Fuqian Huang @ 2019-04-21 11:47 UTC (permalink / raw)
Cc: Fuqian Huang, Frank Haverkamp, Arnd Bergmann, Greg Kroah-Hartman,
linux-kernel
The pointer should be printed with %p or %px rather than
cast to long long type and printed with %016llx.
Change %x to %p to print the pointer.
Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
drivers/misc/genwqe/card_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/genwqe/card_debugfs.c b/drivers/misc/genwqe/card_debugfs.c
index 7c713e0..6f7e39f 100644
--- a/drivers/misc/genwqe/card_debugfs.c
+++ b/drivers/misc/genwqe/card_debugfs.c
@@ -227,7 +227,7 @@ static int ddcb_info_show(struct seq_file *s, void *unused)
seq_puts(s, "DDCB QUEUE:\n");
seq_printf(s, " ddcb_max: %d\n"
" ddcb_daddr: %016llx - %016llx\n"
- " ddcb_vaddr: %016llx\n"
+ " ddcb_vaddr: %p\n"
" ddcbs_in_flight: %u\n"
" ddcbs_max_in_flight: %u\n"
" ddcbs_completed: %u\n"
@@ -237,7 +237,7 @@ static int ddcb_info_show(struct seq_file *s, void *unused)
queue->ddcb_max, (long long)queue->ddcb_daddr,
(long long)queue->ddcb_daddr +
(queue->ddcb_max * DDCB_LENGTH),
- (long long)queue->ddcb_vaddr, queue->ddcbs_in_flight,
+ queue->ddcb_vaddr, queue->ddcbs_in_flight,
queue->ddcbs_max_in_flight, queue->ddcbs_completed,
queue->return_on_busy, queue->wait_on_busy,
cd->irqs_processed);
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 03/06] misc: genwqe: Fix misuse of %x
2019-04-21 11:47 [PATCH v2 03/06] misc: genwqe: Fix misuse of %x Fuqian Huang
@ 2019-04-23 7:55 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2019-04-23 7:55 UTC (permalink / raw)
To: Fuqian Huang
Cc: Frank Haverkamp, Greg Kroah-Hartman, Linux Kernel Mailing List
On Sun, Apr 21, 2019 at 1:48 PM Fuqian Huang <huangfq.daxian@gmail.com> wrote:
>
> The pointer should be printed with %p or %px rather than
> cast to long long type and printed with %016llx.
> Change %x to %p to print the pointer.
>
> Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
I would recommend to also use %pad for printing dma_addr_t if you do this.
Arnd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-23 7:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-21 11:47 [PATCH v2 03/06] misc: genwqe: Fix misuse of %x Fuqian Huang
2019-04-23 7:55 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.