From fc5f44f3e3107ea1bf0a39ed002ba65a5f3a6882 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Tue, 20 Oct 2026 14:54:01 +0300 Subject: [PATCH] scst: Annotate poll masks passed to exit tracing TRACE_EXIT_HRES converts its argument to unsigned long for logging. Passing an __poll_t directly triggers Sparse's restricted-type warning in both scst_event_poll() and dev_user_poll(). Explicitly remove the bitwise restriction with __force at those two trace calls. Keep the typed mask for event operations and the return value, without weakening the shared trace macro for other callers. --- scst/src/dev_handlers/scst_user_main.c | 2 +- scst/src/scst_event.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scst/src/dev_handlers/scst_user_main.c b/scst/src/dev_handlers/scst_user_main.c index b51b9e83b..a9e0e4b4b 100644 --- a/scst/src/dev_handlers/scst_user_main.c +++ b/scst/src/dev_handlers/scst_user_main.c @@ -2484,7 +2484,7 @@ out_unlock: spin_unlock_irq(&dev->udev_cmd_threads.cmd_list_lock); out: - TRACE_EXIT_HRES(res); + TRACE_EXIT_HRES((__force unsigned int)res); return res; } diff --git a/scst/src/scst_event.c b/scst/src/scst_event.c index f265a47eb..72fd0a52b 100644 --- a/scst/src/scst_event.c +++ b/scst/src/scst_event.c @@ -1040,7 +1040,7 @@ static __poll_t scst_event_poll(struct file *file, poll_table *wait) out_unlock: mutex_unlock(&scst_event_mutex); - TRACE_EXIT_HRES(res); + TRACE_EXIT_HRES((__force unsigned int)res); return res; }