[PATCH 0/2] x86: Remove misleading ERR_PTR() casts
From: Habil Eren Türker
Date: Sun Sep 27 2026 - 10:28:58 EST
Two places use `ERR_PTR()` as a plain cast to convert a long containing
an address into a pointer. This is misleading because ERR_PTR() is
reserved for error pointers, and it produces false positives from
Smatch:
arch/x86/kernel/hw_breakpoint.c:521 hw_breakpoint_handler()
error: 'dr6_p' dereferencing possible ERR_PTR()
arch/x86/mm/kmmio.c:596 kmmio_die_notifier()
error: 'dr6_p' dereferencing possible ERR_PTR()
Both are pure readability fixes with no functional change.
Habil Eren Türker (2):
x86/hw_breakpoint: Remove misleading ERR_PTR() cast
x86/mm/kmmio: Remove misleading ERR_PTR() cast
arch/x86/kernel/hw_breakpoint.c | 2 +-
arch/x86/mm/kmmio.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.47.3