* [PATCH] sound: oss: waveartist: Convert timers to use timer_setup()
@ 2017-10-24 15:35 Kees Cook
2017-10-24 19:25 ` Takashi Iwai
0 siblings, 1 reply; 11+ messages in thread
From: Kees Cook @ 2017-10-24 15:35 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Jaroslav Kysela, David Howells, alsa-devel, linux-kernel
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: David Howells <dhowells@redhat.com>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
sound/oss/waveartist.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c
index 4f0c3a232e41..c051c8e6023e 100644
--- a/sound/oss/waveartist.c
+++ b/sound/oss/waveartist.c
@@ -151,6 +151,7 @@ static DEFINE_SPINLOCK(waveartist_lock);
#define machine_is_netwinder() 0
#else
static struct timer_list vnc_timer;
+static int timer_nr_waveartist_devs;
static void vnc_configure_mixer(struct wavnc_info *devc,
unsigned int input_mask);
static int vnc_private_ioctl(int dev, unsigned int cmd, int __user *arg);
@@ -1414,8 +1415,8 @@ attach_waveartist(struct address_info *hw, const struct waveartist_mixer_info *m
else {
#ifdef CONFIG_ARCH_NETWINDER
if (machine_is_netwinder()) {
- setup_timer(&vnc_timer, vnc_slider_tick,
- nr_waveartist_devs);
+ timer_nr_waveartist_devs = nr_waveartist_devs;
+ timer_setup(&vnc_timer, vnc_slider_tick, 0);
mod_timer(&vnc_timer, jiffies);
vnc_configure_mixer(devc, 0);
@@ -1799,11 +1800,11 @@ vnc_slider(struct wavnc_info *devc)
}
static void
-vnc_slider_tick(unsigned long data)
+vnc_slider_tick(struct timer_list *unused)
{
int next_timeout;
- if (vnc_slider(adev_info + data))
+ if (vnc_slider(adev_info + timer_nr_waveartist_devs))
next_timeout = 5; // mixer reported change
else
next_timeout = VNC_TIMER_PERIOD;
--
2.7.4
--
Kees Cook
Pixel Security
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] sound: oss: waveartist: Convert timers to use timer_setup()
2017-10-24 15:35 [PATCH] sound: oss: waveartist: Convert timers to use timer_setup() Kees Cook
@ 2017-10-24 19:25 ` Takashi Iwai
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2017-10-24 19:25 UTC (permalink / raw)
To: Kees Cook; +Cc: Jaroslav Kysela, David Howells, alsa-devel, linux-kernel
On Tue, 24 Oct 2017 17:35:21 +0200,
Kees Cook wrote:
>
> In preparation for unconditionally passing the struct timer_list pointer to
> all timer callbacks, switch to using the new timer_setup() and from_timer()
> to pass the timer pointer explicitly.
>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: alsa-devel@alsa-project.org
> Signed-off-by: Kees Cook <keescook@chromium.org>
I'll skip this as sound/oss/* is already disabled in recent kernels in
kbuild, and we're going to remove the whole code soon later.
thanks,
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sound: oss: waveartist: Convert timers to use timer_setup()
@ 2017-10-24 19:25 ` Takashi Iwai
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2017-10-24 19:25 UTC (permalink / raw)
To: Kees Cook; +Cc: David Howells, alsa-devel, linux-kernel
On Tue, 24 Oct 2017 17:35:21 +0200,
Kees Cook wrote:
>
> In preparation for unconditionally passing the struct timer_list pointer to
> all timer callbacks, switch to using the new timer_setup() and from_timer()
> to pass the timer pointer explicitly.
>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: alsa-devel@alsa-project.org
> Signed-off-by: Kees Cook <keescook@chromium.org>
I'll skip this as sound/oss/* is already disabled in recent kernels in
kbuild, and we're going to remove the whole code soon later.
thanks,
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sound: oss: waveartist: Convert timers to use timer_setup()
2017-10-24 19:25 ` Takashi Iwai
@ 2017-10-24 20:07 ` Kees Cook
-1 siblings, 0 replies; 11+ messages in thread
From: Kees Cook @ 2017-10-24 20:07 UTC (permalink / raw)
To: Takashi Iwai
Cc: Jaroslav Kysela, David Howells, moderated for non-subscribers, LKML
On Tue, Oct 24, 2017 at 12:25 PM, Takashi Iwai <tiwai@suse.de> wrote:
> On Tue, 24 Oct 2017 17:35:21 +0200,
> Kees Cook wrote:
>>
>> In preparation for unconditionally passing the struct timer_list pointer to
>> all timer callbacks, switch to using the new timer_setup() and from_timer()
>> to pass the timer pointer explicitly.
>>
>> Cc: Jaroslav Kysela <perex@perex.cz>
>> Cc: Takashi Iwai <tiwai@suse.com>
>> Cc: David Howells <dhowells@redhat.com>
>> Cc: alsa-devel@alsa-project.org
>> Signed-off-by: Kees Cook <keescook@chromium.org>
>
> I'll skip this as sound/oss/* is already disabled in recent kernels in
> kbuild, and we're going to remove the whole code soon later.
At the end of these conversions, the old init_timer() and
setup_timer() APIs will be removed, which would break anything still
trying to use it (obviously). But if sound/oss/* is _already_
unbuildable, then sure, this is fine by me to leave out. :)
Thanks!
-Kees
--
Kees Cook
Pixel Security
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sound: oss: waveartist: Convert timers to use timer_setup()
@ 2017-10-24 20:07 ` Kees Cook
0 siblings, 0 replies; 11+ messages in thread
From: Kees Cook @ 2017-10-24 20:07 UTC (permalink / raw)
To: Takashi Iwai; +Cc: David Howells, moderated for non-subscribers, LKML
On Tue, Oct 24, 2017 at 12:25 PM, Takashi Iwai <tiwai@suse.de> wrote:
> On Tue, 24 Oct 2017 17:35:21 +0200,
> Kees Cook wrote:
>>
>> In preparation for unconditionally passing the struct timer_list pointer to
>> all timer callbacks, switch to using the new timer_setup() and from_timer()
>> to pass the timer pointer explicitly.
>>
>> Cc: Jaroslav Kysela <perex@perex.cz>
>> Cc: Takashi Iwai <tiwai@suse.com>
>> Cc: David Howells <dhowells@redhat.com>
>> Cc: alsa-devel@alsa-project.org
>> Signed-off-by: Kees Cook <keescook@chromium.org>
>
> I'll skip this as sound/oss/* is already disabled in recent kernels in
> kbuild, and we're going to remove the whole code soon later.
At the end of these conversions, the old init_timer() and
setup_timer() APIs will be removed, which would break anything still
trying to use it (obviously). But if sound/oss/* is _already_
unbuildable, then sure, this is fine by me to leave out. :)
Thanks!
-Kees
--
Kees Cook
Pixel Security
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sound: oss: waveartist: Convert timers to use timer_setup()
2017-10-24 20:07 ` Kees Cook
@ 2017-10-25 10:06 ` Takashi Iwai
-1 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2017-10-25 10:06 UTC (permalink / raw)
To: Kees Cook
Cc: Jaroslav Kysela, David Howells, moderated for non-subscribers, LKML
On Tue, 24 Oct 2017 22:07:34 +0200,
Kees Cook wrote:
>
> On Tue, Oct 24, 2017 at 12:25 PM, Takashi Iwai <tiwai@suse.de> wrote:
> > On Tue, 24 Oct 2017 17:35:21 +0200,
> > Kees Cook wrote:
> >>
> >> In preparation for unconditionally passing the struct timer_list pointer to
> >> all timer callbacks, switch to using the new timer_setup() and from_timer()
> >> to pass the timer pointer explicitly.
> >>
> >> Cc: Jaroslav Kysela <perex@perex.cz>
> >> Cc: Takashi Iwai <tiwai@suse.com>
> >> Cc: David Howells <dhowells@redhat.com>
> >> Cc: alsa-devel@alsa-project.org
> >> Signed-off-by: Kees Cook <keescook@chromium.org>
> >
> > I'll skip this as sound/oss/* is already disabled in recent kernels in
> > kbuild, and we're going to remove the whole code soon later.
>
> At the end of these conversions, the old init_timer() and
> setup_timer() APIs will be removed, which would break anything still
> trying to use it (obviously). But if sound/oss/* is _already_
> unbuildable, then sure, this is fine by me to leave out. :)
I see a few still remaining users of setup_timer() in sound/*.
Do you already have conversion patches? They are all trivial, so I
can cook up in minutes, too.
thanks,
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sound: oss: waveartist: Convert timers to use timer_setup()
@ 2017-10-25 10:06 ` Takashi Iwai
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2017-10-25 10:06 UTC (permalink / raw)
To: Kees Cook; +Cc: David Howells, moderated for non-subscribers, LKML
On Tue, 24 Oct 2017 22:07:34 +0200,
Kees Cook wrote:
>
> On Tue, Oct 24, 2017 at 12:25 PM, Takashi Iwai <tiwai@suse.de> wrote:
> > On Tue, 24 Oct 2017 17:35:21 +0200,
> > Kees Cook wrote:
> >>
> >> In preparation for unconditionally passing the struct timer_list pointer to
> >> all timer callbacks, switch to using the new timer_setup() and from_timer()
> >> to pass the timer pointer explicitly.
> >>
> >> Cc: Jaroslav Kysela <perex@perex.cz>
> >> Cc: Takashi Iwai <tiwai@suse.com>
> >> Cc: David Howells <dhowells@redhat.com>
> >> Cc: alsa-devel@alsa-project.org
> >> Signed-off-by: Kees Cook <keescook@chromium.org>
> >
> > I'll skip this as sound/oss/* is already disabled in recent kernels in
> > kbuild, and we're going to remove the whole code soon later.
>
> At the end of these conversions, the old init_timer() and
> setup_timer() APIs will be removed, which would break anything still
> trying to use it (obviously). But if sound/oss/* is _already_
> unbuildable, then sure, this is fine by me to leave out. :)
I see a few still remaining users of setup_timer() in sound/*.
Do you already have conversion patches? They are all trivial, so I
can cook up in minutes, too.
thanks,
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sound: oss: waveartist: Convert timers to use timer_setup()
2017-10-25 10:06 ` Takashi Iwai
@ 2017-10-25 10:17 ` Kees Cook
-1 siblings, 0 replies; 11+ messages in thread
From: Kees Cook @ 2017-10-25 10:17 UTC (permalink / raw)
To: Takashi Iwai
Cc: Jaroslav Kysela, David Howells, moderated for non-subscribers, LKML
On Wed, Oct 25, 2017 at 3:06 AM, Takashi Iwai <tiwai@suse.de> wrote:
> On Tue, 24 Oct 2017 22:07:34 +0200,
> Kees Cook wrote:
>>
>> On Tue, Oct 24, 2017 at 12:25 PM, Takashi Iwai <tiwai@suse.de> wrote:
>> > On Tue, 24 Oct 2017 17:35:21 +0200,
>> > Kees Cook wrote:
>> >>
>> >> In preparation for unconditionally passing the struct timer_list pointer to
>> >> all timer callbacks, switch to using the new timer_setup() and from_timer()
>> >> to pass the timer pointer explicitly.
>> >>
>> >> Cc: Jaroslav Kysela <perex@perex.cz>
>> >> Cc: Takashi Iwai <tiwai@suse.com>
>> >> Cc: David Howells <dhowells@redhat.com>
>> >> Cc: alsa-devel@alsa-project.org
>> >> Signed-off-by: Kees Cook <keescook@chromium.org>
>> >
>> > I'll skip this as sound/oss/* is already disabled in recent kernels in
>> > kbuild, and we're going to remove the whole code soon later.
>>
>> At the end of these conversions, the old init_timer() and
>> setup_timer() APIs will be removed, which would break anything still
>> trying to use it (obviously). But if sound/oss/* is _already_
>> unbuildable, then sure, this is fine by me to leave out. :)
>
> I see a few still remaining users of setup_timer() in sound/*.
> Do you already have conversion patches? They are all trivial, so I
> can cook up in minutes, too.
I haven't sent the trivial ones (since I am expecting to do a treewide
mechanical change for those). I can send you the rest as a patch
instead, if you want?
-Kees
--
Kees Cook
Pixel Security
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sound: oss: waveartist: Convert timers to use timer_setup()
@ 2017-10-25 10:17 ` Kees Cook
0 siblings, 0 replies; 11+ messages in thread
From: Kees Cook @ 2017-10-25 10:17 UTC (permalink / raw)
To: Takashi Iwai; +Cc: David Howells, moderated for non-subscribers, LKML
On Wed, Oct 25, 2017 at 3:06 AM, Takashi Iwai <tiwai@suse.de> wrote:
> On Tue, 24 Oct 2017 22:07:34 +0200,
> Kees Cook wrote:
>>
>> On Tue, Oct 24, 2017 at 12:25 PM, Takashi Iwai <tiwai@suse.de> wrote:
>> > On Tue, 24 Oct 2017 17:35:21 +0200,
>> > Kees Cook wrote:
>> >>
>> >> In preparation for unconditionally passing the struct timer_list pointer to
>> >> all timer callbacks, switch to using the new timer_setup() and from_timer()
>> >> to pass the timer pointer explicitly.
>> >>
>> >> Cc: Jaroslav Kysela <perex@perex.cz>
>> >> Cc: Takashi Iwai <tiwai@suse.com>
>> >> Cc: David Howells <dhowells@redhat.com>
>> >> Cc: alsa-devel@alsa-project.org
>> >> Signed-off-by: Kees Cook <keescook@chromium.org>
>> >
>> > I'll skip this as sound/oss/* is already disabled in recent kernels in
>> > kbuild, and we're going to remove the whole code soon later.
>>
>> At the end of these conversions, the old init_timer() and
>> setup_timer() APIs will be removed, which would break anything still
>> trying to use it (obviously). But if sound/oss/* is _already_
>> unbuildable, then sure, this is fine by me to leave out. :)
>
> I see a few still remaining users of setup_timer() in sound/*.
> Do you already have conversion patches? They are all trivial, so I
> can cook up in minutes, too.
I haven't sent the trivial ones (since I am expecting to do a treewide
mechanical change for those). I can send you the rest as a patch
instead, if you want?
-Kees
--
Kees Cook
Pixel Security
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sound: oss: waveartist: Convert timers to use timer_setup()
2017-10-25 10:17 ` Kees Cook
@ 2017-10-25 10:23 ` Takashi Iwai
-1 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2017-10-25 10:23 UTC (permalink / raw)
To: Kees Cook
Cc: Jaroslav Kysela, David Howells, moderated for non-subscribers, LKML
On Wed, 25 Oct 2017 12:17:25 +0200,
Kees Cook wrote:
>
> On Wed, Oct 25, 2017 at 3:06 AM, Takashi Iwai <tiwai@suse.de> wrote:
> > On Tue, 24 Oct 2017 22:07:34 +0200,
> > Kees Cook wrote:
> >>
> >> On Tue, Oct 24, 2017 at 12:25 PM, Takashi Iwai <tiwai@suse.de> wrote:
> >> > On Tue, 24 Oct 2017 17:35:21 +0200,
> >> > Kees Cook wrote:
> >> >>
> >> >> In preparation for unconditionally passing the struct timer_list pointer to
> >> >> all timer callbacks, switch to using the new timer_setup() and from_timer()
> >> >> to pass the timer pointer explicitly.
> >> >>
> >> >> Cc: Jaroslav Kysela <perex@perex.cz>
> >> >> Cc: Takashi Iwai <tiwai@suse.com>
> >> >> Cc: David Howells <dhowells@redhat.com>
> >> >> Cc: alsa-devel@alsa-project.org
> >> >> Signed-off-by: Kees Cook <keescook@chromium.org>
> >> >
> >> > I'll skip this as sound/oss/* is already disabled in recent kernels in
> >> > kbuild, and we're going to remove the whole code soon later.
> >>
> >> At the end of these conversions, the old init_timer() and
> >> setup_timer() APIs will be removed, which would break anything still
> >> trying to use it (obviously). But if sound/oss/* is _already_
> >> unbuildable, then sure, this is fine by me to leave out. :)
> >
> > I see a few still remaining users of setup_timer() in sound/*.
> > Do you already have conversion patches? They are all trivial, so I
> > can cook up in minutes, too.
>
> I haven't sent the trivial ones (since I am expecting to do a treewide
> mechanical change for those). I can send you the rest as a patch
> instead, if you want?
Yeah, sure, earlier is easier for me :)
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sound: oss: waveartist: Convert timers to use timer_setup()
@ 2017-10-25 10:23 ` Takashi Iwai
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2017-10-25 10:23 UTC (permalink / raw)
To: Kees Cook; +Cc: David Howells, moderated for non-subscribers, LKML
On Wed, 25 Oct 2017 12:17:25 +0200,
Kees Cook wrote:
>
> On Wed, Oct 25, 2017 at 3:06 AM, Takashi Iwai <tiwai@suse.de> wrote:
> > On Tue, 24 Oct 2017 22:07:34 +0200,
> > Kees Cook wrote:
> >>
> >> On Tue, Oct 24, 2017 at 12:25 PM, Takashi Iwai <tiwai@suse.de> wrote:
> >> > On Tue, 24 Oct 2017 17:35:21 +0200,
> >> > Kees Cook wrote:
> >> >>
> >> >> In preparation for unconditionally passing the struct timer_list pointer to
> >> >> all timer callbacks, switch to using the new timer_setup() and from_timer()
> >> >> to pass the timer pointer explicitly.
> >> >>
> >> >> Cc: Jaroslav Kysela <perex@perex.cz>
> >> >> Cc: Takashi Iwai <tiwai@suse.com>
> >> >> Cc: David Howells <dhowells@redhat.com>
> >> >> Cc: alsa-devel@alsa-project.org
> >> >> Signed-off-by: Kees Cook <keescook@chromium.org>
> >> >
> >> > I'll skip this as sound/oss/* is already disabled in recent kernels in
> >> > kbuild, and we're going to remove the whole code soon later.
> >>
> >> At the end of these conversions, the old init_timer() and
> >> setup_timer() APIs will be removed, which would break anything still
> >> trying to use it (obviously). But if sound/oss/* is _already_
> >> unbuildable, then sure, this is fine by me to leave out. :)
> >
> > I see a few still remaining users of setup_timer() in sound/*.
> > Do you already have conversion patches? They are all trivial, so I
> > can cook up in minutes, too.
>
> I haven't sent the trivial ones (since I am expecting to do a treewide
> mechanical change for those). I can send you the rest as a patch
> instead, if you want?
Yeah, sure, earlier is easier for me :)
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-10-25 10:23 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-24 15:35 [PATCH] sound: oss: waveartist: Convert timers to use timer_setup() Kees Cook
2017-10-24 19:25 ` Takashi Iwai
2017-10-24 19:25 ` Takashi Iwai
2017-10-24 20:07 ` Kees Cook
2017-10-24 20:07 ` Kees Cook
2017-10-25 10:06 ` Takashi Iwai
2017-10-25 10:06 ` Takashi Iwai
2017-10-25 10:17 ` Kees Cook
2017-10-25 10:17 ` Kees Cook
2017-10-25 10:23 ` Takashi Iwai
2017-10-25 10:23 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.