On 10/09/2012 04:33 AM, Takashi Iwai wrote:
- struct timespec audio_tstamp;
It must be struct compat_timespec...
ok
put_user(status.suspended_state, &src->suspended_state) ||
put_user(status.audio_tstamp.tv_sec, &src->audio_tstamp.tv_sec) ||
put_user(status.audio_tstamp.tv_nsec, &src->audio_tstamp.tv_nsec))
... and use compat_put_timespec().
I don't get this. I copy/pasted the code used for regular timestamps. Why should it be any different for audio timestamps?
if (put_user(sstatus.state, &src->s.status.state) || put_user(sstatus.hw_ptr, &src->s.status.hw_ptr) || put_user(sstatus.tstamp.tv_sec, &src->s.status.tstamp.tv_sec) || put_user(sstatus.tstamp.tv_nsec, &src->s.status.tstamp.tv_nsec) || put_user(sstatus.suspended_state, &src->s.status.suspended_state) ||
put_user(sstatus.audio_tstamp.tv_sec,
&src->s.status.audio_tstamp.tv_sec) ||
put_user(sstatus.audio_tstamp.tv_nsec,
&src->s.status.audio_tstamp.tv_nsec) ||
Ditto.
Again I don't see why I should make a difference between tstamp and audio_tstamp? It's really the same type, so either my code is correct or the existing code is wrong as well. All other comments fixed, thanks for the review. -Pierre