Skip to contentSkip to conversation

oss: avoid time_t usage

PATCH Applied Arnd Bergmann 2 participants 2 messages Jun 17, 2016 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oss: avoid time_t usage

We want to remove all time_t users from the kernel because of y2038 compatibility. This particular instance does not even use time_t to store a seconds value, so we can simply use 'unsigned int', which seems more fitting anywhere.

The same code is used in two OSS files.

---
 sound/oss/sound_timer.c | 2 +-
 sound/oss/sys_timer.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
sound/oss/sound_timer.c +1 -1
index 8021c85f076d..3a444a6f10eb 100644
@@ -17,7 +17,7 @@
 #include "sound_config.h"
 
 static volatile int initialized, opened, tmr_running;
-static volatile time_t tmr_offs, tmr_ctr;
+static volatile unsigned int tmr_offs, tmr_ctr;
 static volatile unsigned long ticks_offs;
 static volatile int curr_tempo, curr_timebase;
 static volatile unsigned long curr_ticks;
sound/oss/sys_timer.c +1 -1
index 2226dda0eff0..d17019d25b99 100644
@@ -19,7 +19,7 @@
 #include "sound_config.h"
 
 static volatile int opened, tmr_running;
-static volatile time_t tmr_offs, tmr_ctr;
+static volatile unsigned int tmr_offs, tmr_ctr;
 static volatile unsigned long ticks_offs;
 static volatile int curr_tempo, curr_timebase;
 static volatile unsigned long curr_ticks;
Signature · 1 line
2.9.0
Applied
#1 lore raw
Quoted 9 lines · Arnd Bergmann

We want to remove all time_t users from the kernel because of y2038 compatibility. This particular instance does not even use time_t to store a seconds value, so we can simply use 'unsigned int', which seems more fitting anywhere.

The same code is used in two OSS files.

Applied, thanks.

Takashi