aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers
diff options
context:
space:
mode:
authorSu Hui <[email protected]>2025-04-30 03:27:33 +0000
committerThomas Gleixner <[email protected]>2025-04-30 07:06:23 +0000
commitd8ca84d48a2a2d4f6780980743c34b70c49f5844 (patch)
tree8dfcfec199672b25381d9cc8795beef0c9f8bb36 /rust/helpers
parenttime/jiffies: Change register_refined_jiffies() to void __init (diff)
downloadkernel-d8ca84d48a2a2d4f6780980743c34b70c49f5844.tar.gz
kernel-d8ca84d48a2a2d4f6780980743c34b70c49f5844.zip
alarmtimer: Remove dead return value in clock2alarm()
'clockid' can only be ALARM_REALTIME and ALARM_BOOTTIME. It's impossible to return -1 and callers never check the return value. Only alarm_clock_get_timespec(), alarm_clock_get_ktime(), alarm_timer_create() and alarm_timer_nsleep() call clock2alarm(). These callers use clockid_to_kclock() to get 'struct k_clock', which ensures that clock2alarm() never returns -1. Remove the impossible -1 return value, and add a warning to notify about any future misuse of this function. Signed-off-by: Su Hui <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
Diffstat (limited to 'rust/helpers')
0 files changed, 0 insertions, 0 deletions