lkml.org 
[lkml]   [2019]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 2/8] ALSA: Avoid using timespec for struct snd_timer_status
On Tue, 12 Nov 2019 21:08:17 +0100,
Arnd Bergmann wrote:
>
> On Tue, Nov 12, 2019 at 4:42 PM Takashi Iwai <tiwai@suse.de> wrote:
>
> > > @@ -761,6 +761,7 @@ struct snd_timer_params {
> > > unsigned char reserved[60]; /* reserved */
> > > };
> > >
> > > +#ifndef __KERNEL__
> > > struct snd_timer_status {
> > > struct timespec tstamp; /* Timestamp - last update */
> > > unsigned int resolution; /* current period resolution in ns */
> >
> > Do we need this ifndef? Is it for stopping the reference of struct
> > snd_timer_status from the kernel code but only 32 and 64 variants?
>
> Well spotted, this is indeed a very recent change I did to the patch.
> The idea here is to hide any use of 'time_t', 'timespec' and 'timeval'
> from kernel compilation. These types are now defined in an incompatible
> way by libc, so we have to remove them from the kernel's uapi headers.
> I would prefer to remove them completely from the kernel (rather than
> moving them from uapi to internal headers) to make it harder to write
> y2038-incompatible code, and with the 90 patches I sent this week,
> all users are gone from the kernel (this series was the last part).

Could you put this trick in the changelog, too?

> Interestingly, hiding snd_timer_status from the drivers /also/ caught
> a but in a file when I had missed a reference that needed to be converted
> to snd_timer_status64.

Heh, that's no surprising, proving the usefulness :)


thanks,

Takashi

\
 
 \ /
  Last update: 2019-11-12 21:28    [W:0.053 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site