mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] hrtimers: Make sure hrtimer_resolution is unsigned int
@ 2015-06-06  9:30 Borislav Petkov
  2015-06-08 13:48 ` [tip:timers/core] " tip-bot for Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Borislav Petkov @ 2015-06-06  9:30 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: X86 ML, LKML

From: Borislav Petkov <bp@suse.de>

... 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>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
 include/linux/hrtimer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 470d876c2eda..3f82a7edc03d 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -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) { }
 
-- 
2.3.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-08 13:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-06  9:30 [PATCH] hrtimers: Make sure hrtimer_resolution is unsigned int Borislav Petkov
2015-06-08 13:48 ` [tip:timers/core] " tip-bot for Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome