hrtimers: Make sure hrtimer_resolution is unsigned int
authorBorislav Petkov <[email protected]>
Sat, 6 Jun 2015 09:30:00 +0000 (11:30 +0200)
committerThomas Gleixner <[email protected]>
Mon, 8 Jun 2015 13:46:06 +0000 (15:46 +0200)
... in the !CONFIG_HIGH_RES_TIMERS case too. And thus fix warnings like
this one:

net/sched/sch_api.c: In function ‘psched_show’:
net/sched/sch_api.c:1891:6: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘long int’ [-Wformat=]
      (u32)NSEC_PER_SEC / hrtimer_resolution);

Signed-off-by: Borislav Petkov <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Thomas Gleixner <[email protected]>
include/linux/hrtimer.h

index 470d876c2edafd9d4fa0cffb9f599fbc514c2c90..3f82a7edc03d198409686c5587c1927e58c38dec 100644 (file)
@@ -309,7 +309,7 @@ extern unsigned int hrtimer_resolution;
 # define MONOTONIC_RES_NSEC    LOW_RES_NSEC
 # define KTIME_MONOTONIC_RES   KTIME_LOW_RES
 
-#define hrtimer_resolution     LOW_RES_NSEC
+#define hrtimer_resolution     (unsigned int)LOW_RES_NSEC
 
 static inline void hrtimer_peek_ahead_timers(void) { }