diff options
| author | Tianyi Chen <hi@tychen.cc> | 2026-09-23 11:31:25 +0900 |
|---|---|---|
| committer | Mike Rapoport (Microsoft) <rppt@kernel.org> | 2026-09-24 10:57:08 +0300 |
| commit | a10f3a08d248fcb3006f587faf42437837fd12c6 (patch) | |
| tree | aa48dc658e5eac666e8ff97bc07354185bbf7a47 /tools/lib/python/kdoc | |
| parent | 6957416ae43de1830174f527b5b8cf737401a8dd (diff) | |
| download | linux-next-a10f3a08d248fcb3006f587faf42437837fd12c6.tar.gz linux-next-a10f3a08d248fcb3006f587faf42437837fd12c6.zip | |
tools: use __pa() in virt_to_phys()
With 32-bit pointers and a 64-bit phys_addr_t, GCC warns about the
pointer-to-integer cast in virt_to_phys(). It can also sign-extend
pointers whose top bit is set, turning 0x80000000 into 0xffffffff80000000.
Use __pa() to convert through unsigned long before widening the result.
This preserves the unsigned pointer value and matches the other address
conversion helpers.
Reported-by: Mike Rapoport <rppt@kernel.org>
Link: https://lore.kernel.org/r/179007180279.508753.4595268983388589280.b4-review@b4
Assisted-by: LLM
Signed-off-by: Tianyi Chen <hi@tychen.cc>
Link: https://patch.msgid.link/20260923023126.1910311-4-hi@tychen.cc
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions
