Skip to content

Commit

Permalink
habanalabs: use %px instead of %p in error print
Browse files Browse the repository at this point in the history
When parsing the address of an internal command buffer, the driver prints
an error if the buffer's address is not in the range of the device's DRAM
or SRAM memory address space.

Use %px to print the real address that the user gave the driver and not a
hashed value, so the user will get a clue regarding the origin of his
error.

Note that if the print occurs, the pointer that is printed is a
user's virtual address and not some kind of physical address.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Oded Gabbay authored and Greg Kroah-Hartman committed Mar 2, 2019
1 parent 99f6362 commit dbbe358
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/habanalabs/goya/goya.c
Original file line number Diff line number Diff line change
Expand Up @@ -4293,7 +4293,7 @@ static int goya_parse_cb_no_ext_quque(struct hl_device *hdev,
return 0;

dev_err(hdev->dev,
"Internal CB address %p + 0x%x is not in SRAM nor in DRAM\n",
"Internal CB address %px + 0x%x is not in SRAM nor in DRAM\n",
parser->user_cb, parser->user_cb_size);

return -EFAULT;
Expand Down

0 comments on commit dbbe358

Please sign in to comment.