Skip to content

Commit dbbe358

Browse files
ogabbaygregkh
authored andcommitted
habanalabs: use %px instead of %p in error print
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>
1 parent 99f6362 commit dbbe358

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/misc/habanalabs/goya

‎drivers/misc/habanalabs/goya/goya.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4293,7 +4293,7 @@ static int goya_parse_cb_no_ext_quque(struct hl_device *hdev,
42934293
return 0;
42944294

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

42994299
return -EFAULT;

0 commit comments

Comments
 (0)