Skip to content

Commit c1d11fc

Browse files
arndbKAGA-KOKO
authored andcommitted
irqflags: Explicitly ignore lockdep_hrtimer_exit() argument
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]/
1 parent fec50db commit c1d11fc

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
@@ -114,7 +114,7 @@ do { \
114114
# define lockdep_softirq_enter() do { } while (0)
115115
# define lockdep_softirq_exit() do { } while (0)
116116
# define lockdep_hrtimer_enter(__hrtimer) false
117-
# define lockdep_hrtimer_exit(__context) do { } while (0)
117+
# define lockdep_hrtimer_exit(__context) do { (void)(__context); } while (0)
118118
# define lockdep_posixtimer_enter() do { } while (0)
119119
# define lockdep_posixtimer_exit() do { } while (0)
120120
# define lockdep_irq_work_enter(__work) do { } while (0)

0 commit comments

Comments
 (0)