Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1425143 > unrolled thread

[PATCH] oss: avoid time_t usage

Started byArnd Bergmann <arnd@arndb.de>
First post2016-06-17 16:30 +0200
Last post2016-06-17 16:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] oss: avoid time_t usage Arnd Bergmann <arnd@arndb.de> - 2016-06-17 16:30 +0200
    Re: [PATCH] oss: avoid time_t usage Takashi Iwai <tiwai@suse.de> - 2016-06-17 16:40 +0200

#1425143 — [PATCH] oss: avoid time_t usage

FromArnd Bergmann <arnd@arndb.de>
Date2016-06-17 16:30 +0200
Subject[PATCH] oss: avoid time_t usage
Message-ID<rL2Wt-7ET-19@gated-at.bofh.it>
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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/oss/sound_timer.c | 2 +-
 sound/oss/sys_timer.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/oss/sound_timer.c b/sound/oss/sound_timer.c
index 8021c85f076d..3a444a6f10eb 100644
--- a/sound/oss/sound_timer.c
+++ b/sound/oss/sound_timer.c
@@ -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;
diff --git a/sound/oss/sys_timer.c b/sound/oss/sys_timer.c
index 2226dda0eff0..d17019d25b99 100644
--- a/sound/oss/sys_timer.c
+++ b/sound/oss/sys_timer.c
@@ -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;
-- 
2.9.0

[toc] | [next] | [standalone]


#1425154

FromTakashi Iwai <tiwai@suse.de>
Date2016-06-17 16:40 +0200
Message-ID<rL369-7I5-15@gated-at.bofh.it>
In reply to#1425143
On Fri, 17 Jun 2016 16:30:03 +0200,
Arnd Bergmann wrote:
> 
> 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.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied, thanks.


Takashi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web