* [PATCH] sound/oss: use current->state helpers
@ 2015-01-15 7:11 Davidlohr Bueso
2015-01-15 7:33 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Davidlohr Bueso @ 2015-01-15 7:11 UTC (permalink / raw)
To: Takashi Iwai
Cc: Andrew Veliath, Jaroslav Kysela, Davidlohr Bueso, linux-kernel
From: Davidlohr Bueso <dave@stgolabs.net>
Call __set_current_state() instead of assigning the new state directly.
These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping
track of who changed the state.
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
---
sound/oss/msnd_pinnacle.c | 4 ++--
sound/oss/swarm_cs4297a.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c
index c23f9f9..a8ceef8 100644
--- a/sound/oss/msnd_pinnacle.c
+++ b/sound/oss/msnd_pinnacle.c
@@ -675,7 +675,7 @@ static void dsp_write_flush(void)
timeout);
clear_bit(F_WRITEFLUSH, &dev.flags);
if (!signal_pending(current)) {
- current->state = TASK_INTERRUPTIBLE;
+ __set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(get_play_delay_jiffies(DAP_BUFF_SIZE));
}
clear_bit(F_WRITING, &dev.flags);
@@ -1288,7 +1288,7 @@ static int __init calibrate_adc(WORD srate)
& ~0x0001, dev.SMA + SMA_wCurrHostStatusFlags);
if (msnd_send_word(&dev, 0, 0, HDEXAR_CAL_A_TO_D) == 0 &&
chk_send_dsp_cmd(&dev, HDEX_AUX_REQ) == 0) {
- current->state = TASK_INTERRUPTIBLE;
+ __set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ / 3);
return 0;
}
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c
index a33e8ce..213a416 100644
--- a/sound/oss/swarm_cs4297a.c
+++ b/sound/oss/swarm_cs4297a.c
@@ -1654,7 +1654,7 @@ static int drain_dac(struct cs4297a_state *s, int nonblock)
s->dma_dac.hwptr = s->dma_dac.swptr = hwptr;
spin_unlock_irqrestore(&s->lock, flags);
remove_wait_queue(&s->dma_dac.wait, &wait);
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
return 0;
}
--
2.1.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sound/oss: use current->state helpers
2015-01-15 7:11 [PATCH] sound/oss: use current->state helpers Davidlohr Bueso
@ 2015-01-15 7:33 ` Takashi Iwai
2015-01-15 7:51 ` Davidlohr Bueso
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2015-01-15 7:33 UTC (permalink / raw)
To: Davidlohr Bueso; +Cc: Andrew Veliath, Jaroslav Kysela, linux-kernel
At Wed, 14 Jan 2015 23:11:43 -0800,
Davidlohr Bueso wrote:
>
> From: Davidlohr Bueso <dave@stgolabs.net>
>
> Call __set_current_state() instead of assigning the new state directly.
> These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping
> track of who changed the state.
>
> Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
The author and sign-off have different addresses. Could you align?
thanks,
Takashi
> ---
> sound/oss/msnd_pinnacle.c | 4 ++--
> sound/oss/swarm_cs4297a.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c
> index c23f9f9..a8ceef8 100644
> --- a/sound/oss/msnd_pinnacle.c
> +++ b/sound/oss/msnd_pinnacle.c
> @@ -675,7 +675,7 @@ static void dsp_write_flush(void)
> timeout);
> clear_bit(F_WRITEFLUSH, &dev.flags);
> if (!signal_pending(current)) {
> - current->state = TASK_INTERRUPTIBLE;
> + __set_current_state(TASK_INTERRUPTIBLE);
> schedule_timeout(get_play_delay_jiffies(DAP_BUFF_SIZE));
> }
> clear_bit(F_WRITING, &dev.flags);
> @@ -1288,7 +1288,7 @@ static int __init calibrate_adc(WORD srate)
> & ~0x0001, dev.SMA + SMA_wCurrHostStatusFlags);
> if (msnd_send_word(&dev, 0, 0, HDEXAR_CAL_A_TO_D) == 0 &&
> chk_send_dsp_cmd(&dev, HDEX_AUX_REQ) == 0) {
> - current->state = TASK_INTERRUPTIBLE;
> + __set_current_state(TASK_INTERRUPTIBLE);
> schedule_timeout(HZ / 3);
> return 0;
> }
> diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c
> index a33e8ce..213a416 100644
> --- a/sound/oss/swarm_cs4297a.c
> +++ b/sound/oss/swarm_cs4297a.c
> @@ -1654,7 +1654,7 @@ static int drain_dac(struct cs4297a_state *s, int nonblock)
> s->dma_dac.hwptr = s->dma_dac.swptr = hwptr;
> spin_unlock_irqrestore(&s->lock, flags);
> remove_wait_queue(&s->dma_dac.wait, &wait);
> - current->state = TASK_RUNNING;
> + __set_current_state(TASK_RUNNING);
> return 0;
> }
>
> --
> 2.1.2
>
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sound/oss: use current->state helpers
2015-01-15 7:33 ` Takashi Iwai
@ 2015-01-15 7:51 ` Davidlohr Bueso
2015-01-15 8:11 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Davidlohr Bueso @ 2015-01-15 7:51 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Andrew Veliath, Jaroslav Kysela, linux-kernel
On Thu, 2015-01-15 at 08:33 +0100, Takashi Iwai wrote:
> At Wed, 14 Jan 2015 23:11:43 -0800,
> Davidlohr Bueso wrote:
> >
> > From: Davidlohr Bueso <dave@stgolabs.net>
> >
> > Call __set_current_state() instead of assigning the new state directly.
> > These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping
> > track of who changed the state.
> >
> > Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
>
> The author and sign-off have different addresses. Could you align?
I don't see a problem with that. All my patches are the same.
Thanks,
Davidlohr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sound/oss: use current->state helpers
2015-01-15 7:51 ` Davidlohr Bueso
@ 2015-01-15 8:11 ` Takashi Iwai
2015-01-15 8:17 ` Davidlohr Bueso
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2015-01-15 8:11 UTC (permalink / raw)
To: Davidlohr Bueso; +Cc: Andrew Veliath, Jaroslav Kysela, linux-kernel
At Wed, 14 Jan 2015 23:51:30 -0800,
Davidlohr Bueso wrote:
>
> On Thu, 2015-01-15 at 08:33 +0100, Takashi Iwai wrote:
> > At Wed, 14 Jan 2015 23:11:43 -0800,
> > Davidlohr Bueso wrote:
> > >
> > > From: Davidlohr Bueso <dave@stgolabs.net>
> > >
> > > Call __set_current_state() instead of assigning the new state directly.
> > > These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping
> > > track of who changed the state.
> > >
> > > Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
> >
> > The author and sign-off have different addresses. Could you align?
>
> I don't see a problem with that. All my patches are the same.
Well, it's a bit unusual. Why do they need to differ? Is the author
another Davidlohr? :) If this form is preferred, I'm willing to
apply, but I just wonder...
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sound/oss: use current->state helpers
2015-01-15 8:11 ` Takashi Iwai
@ 2015-01-15 8:17 ` Davidlohr Bueso
2015-01-15 8:33 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Davidlohr Bueso @ 2015-01-15 8:17 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Andrew Veliath, Jaroslav Kysela, linux-kernel
On Thu, 2015-01-15 at 09:11 +0100, Takashi Iwai wrote:
> Well, it's a bit unusual. Why do they need to differ? Is the author
> another Davidlohr? :) If this form is preferred, I'm willing to
> apply, but I just wonder...
Personal taste, really. Yes I'd prefer you apply as is.
Thanks,
Davidlohr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sound/oss: use current->state helpers
2015-01-15 8:17 ` Davidlohr Bueso
@ 2015-01-15 8:33 ` Takashi Iwai
0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2015-01-15 8:33 UTC (permalink / raw)
To: Davidlohr Bueso; +Cc: Andrew Veliath, Jaroslav Kysela, linux-kernel
At Thu, 15 Jan 2015 00:17:25 -0800,
Davidlohr Bueso wrote:
>
> On Thu, 2015-01-15 at 09:11 +0100, Takashi Iwai wrote:
> > Well, it's a bit unusual. Why do they need to differ? Is the author
> > another Davidlohr? :) If this form is preferred, I'm willing to
> > apply, but I just wonder...
>
> Personal taste, really. Yes I'd prefer you apply as is.
OK, applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-15 8:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-15 7:11 [PATCH] sound/oss: use current->state helpers Davidlohr Bueso
2015-01-15 7:33 ` Takashi Iwai
2015-01-15 7:51 ` Davidlohr Bueso
2015-01-15 8:11 ` Takashi Iwai
2015-01-15 8:17 ` Davidlohr Bueso
2015-01-15 8:33 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®