Skip to content

Commit 548af61

Browse files
arndbgregkh
authored andcommitted
irqflags: Explicitly ignore lockdep_hrtimer_exit() argument
commit c1d11fc upstream. When building with 'make W=1' but CONFIG_TRACE_IRQFLAGS=n, the unused argument to lockdep_hrtimer_exit() causes a warning: kernel/time/hrtimer.c:1655:14: error: variable 'expires_in_hardirq' set but not used [-Werror=unused-but-set-variable] This is intentional behavior, so add a cast to void to shut up the warning. Fixes: 73d2056 ("hrtimer: Don't dereference the hrtimer pointer after the callback") Reported-by: kernel test robot <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Sebastian Andrzej Siewior <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 052d73c commit 548af61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/irqflags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ do { \
126126
# define lockdep_softirq_enter() do { } while (0)
127127
# define lockdep_softirq_exit() do { } while (0)
128128
# define lockdep_hrtimer_enter(__hrtimer) false
129-
# define lockdep_hrtimer_exit(__context) do { } while (0)
129+
# define lockdep_hrtimer_exit(__context) do { (void)(__context); } while (0)
130130
# define lockdep_posixtimer_enter() do { } while (0)
131131
# define lockdep_posixtimer_exit() do { } while (0)
132132
# define lockdep_irq_work_enter(__work) do { } while (0)

0 commit comments

Comments
 (0)