[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191211212025.1981822-4-arnd@arndb.de>
Date: Wed, 11 Dec 2019 22:20:19 +0100
From: Arnd Bergmann <arnd@...db.de>
To: alsa-devel@...a-project.org, Takashi Iwai <tiwai@...e.com>
Cc: Baolin Wang <baolin.wang7@...il.com>, y2038@...ts.linaro.org,
linux-kernel@...r.kernel.org, Jaroslav Kysela <perex@...ex.cz>,
Mark Brown <broonie@...nel.org>,
Baolin Wang <baolin.wang@...aro.org>,
Arnd Bergmann <arnd@...db.de>
Subject: [PATCH v7 3/9] ALSA: Avoid using timespec for struct snd_ctl_elem_value
From: Baolin Wang <baolin.wang@...aro.org>
The struct snd_ctl_elem_value will use 'timespec' type variables to record
timestamp, which is not year 2038 safe on 32bits system.
Since there are no drivers will implemented the tstamp member of the
struct snd_ctl_elem_value, and also the stucture size will not be changed
if we change timespec to s64 for tstamp member of struct snd_ctl_elem_value.
>From Takashi's comments, "In the library, applications are not expected
to access to this structure directly. The applications get opaque pointer
to the structure and must use any control APIs to operate it. Actually the
library produce no API to handle 'struct snd_ctl_elem_value.tstamp'. This
means that we can drop this member from alsa-lib without decline of
functionality." Thus we can simply remove the tstamp member to avoid using
the type which is not year 2038 safe on 32bits system.
Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
include/uapi/sound/asound.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
index 930854f67fd3..40a23d8418fe 100644
--- a/include/uapi/sound/asound.h
+++ b/include/uapi/sound/asound.h
@@ -957,8 +957,7 @@ struct snd_ctl_elem_value {
} bytes;
struct snd_aes_iec958 iec958;
} value; /* RO */
- struct timespec tstamp;
- unsigned char reserved[128-sizeof(struct timespec)];
+ unsigned char reserved[128];
};
struct snd_ctl_tlv {
--
2.20.0
Powered by blists - more mailing lists