Skip to content

Commit

Permalink
hrtimers: Make sure hrtimer_resolution is unsigned int
Browse files Browse the repository at this point in the history
... 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 <bp@suse.de>
Link: http://lkml.kernel.org/r/1433583000-32090-1-git-send-email-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Borislav Petkov authored and Thomas Gleixner committed Jun 8, 2015
1 parent 09cbbf0 commit d711b8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/hrtimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) { }

Expand Down

0 comments on commit d711b8b

Please sign in to comment.