All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: intel: atom: Remove superfluous flush_scheduled_work()
@ 2022-03-22 15:48 Takashi Iwai
  2022-03-22 15:57 ` Pierre-Louis Bossart
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Takashi Iwai @ 2022-03-22 15:48 UTC (permalink / raw)
  To: alsa-devel
  Cc: Tetsuo Handa, Cezary Rojewski, Mark Brown, Pierre-Louis Bossart

It seems that flush_scheduled_work() is called without any real
purpose at sst_context_cleanup() (the driver doesn't put works on the
global queue at all).  As the flush_schedule_work() function is going
to be abolished in near future, let's drop it now.

Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/intel/atom/sst/sst.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c
index e21e11dac000..3a42d68c0247 100644
--- a/sound/soc/intel/atom/sst/sst.c
+++ b/sound/soc/intel/atom/sst/sst.c
@@ -360,7 +360,6 @@ void sst_context_cleanup(struct intel_sst_drv *ctx)
 	sst_unregister(ctx->dev);
 	sst_set_fw_state_locked(ctx, SST_SHUTDOWN);
 	sysfs_remove_group(&ctx->dev->kobj, &sst_fw_version_attr_group);
-	flush_scheduled_work();
 	destroy_workqueue(ctx->post_msg_wq);
 	cpu_latency_qos_remove_request(ctx->qos);
 	kfree(ctx->fw_sg_list.src);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: intel: atom: Remove superfluous flush_scheduled_work()
  2022-03-22 15:48 [PATCH] ASoC: intel: atom: Remove superfluous flush_scheduled_work() Takashi Iwai
@ 2022-03-22 15:57 ` Pierre-Louis Bossart
  2022-03-22 16:06   ` Pierre-Louis Bossart
  2022-03-22 16:11 ` Cezary Rojewski
  2022-04-05  9:31 ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Pierre-Louis Bossart @ 2022-03-22 15:57 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel; +Cc: Tetsuo Handa, Cezary Rojewski, Mark Brown



On 3/22/22 10:48, Takashi Iwai wrote:
> It seems that flush_scheduled_work() is called without any real
> purpose at sst_context_cleanup() (the driver doesn't put works on the
> global queue at all).  As the flush_schedule_work() function is going
> to be abolished in near future, let's drop it now.
> 
> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>   sound/soc/intel/atom/sst/sst.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c
> index e21e11dac000..3a42d68c0247 100644
> --- a/sound/soc/intel/atom/sst/sst.c
> +++ b/sound/soc/intel/atom/sst/sst.c
> @@ -360,7 +360,6 @@ void sst_context_cleanup(struct intel_sst_drv *ctx)
>   	sst_unregister(ctx->dev);
>   	sst_set_fw_state_locked(ctx, SST_SHUTDOWN);
>   	sysfs_remove_group(&ctx->dev->kobj, &sst_fw_version_attr_group);
> -	flush_scheduled_work(); >   	destroy_workqueue(ctx->post_msg_wq);

It could also be a confusion, there are calls to

flush_workqueue(ctx->post_msg_wq);

for suspend-resume, so wondering if the right sequence could be

flush_workqueue(ctx->post_msg_wq);
destroy_workqueue(ctx->post_msg_wq);

?

>   	cpu_latency_qos_remove_request(ctx->qos);
>   	kfree(ctx->fw_sg_list.src);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: intel: atom: Remove superfluous flush_scheduled_work()
  2022-03-22 15:57 ` Pierre-Louis Bossart
@ 2022-03-22 16:06   ` Pierre-Louis Bossart
  0 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2022-03-22 16:06 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel; +Cc: Tetsuo Handa, Cezary Rojewski, Mark Brown



On 3/22/22 10:57, Pierre-Louis Bossart wrote:
> 
> 
> On 3/22/22 10:48, Takashi Iwai wrote:
>> It seems that flush_scheduled_work() is called without any real
>> purpose at sst_context_cleanup() (the driver doesn't put works on the
>> global queue at all).  As the flush_schedule_work() function is going
>> to be abolished in near future, let's drop it now.
>>
>> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
>> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>> ---
>>   sound/soc/intel/atom/sst/sst.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/sound/soc/intel/atom/sst/sst.c 
>> b/sound/soc/intel/atom/sst/sst.c
>> index e21e11dac000..3a42d68c0247 100644
>> --- a/sound/soc/intel/atom/sst/sst.c
>> +++ b/sound/soc/intel/atom/sst/sst.c
>> @@ -360,7 +360,6 @@ void sst_context_cleanup(struct intel_sst_drv *ctx)
>>       sst_unregister(ctx->dev);
>>       sst_set_fw_state_locked(ctx, SST_SHUTDOWN);
>>       sysfs_remove_group(&ctx->dev->kobj, &sst_fw_version_attr_group);
>> -    flush_scheduled_work(); >       destroy_workqueue(ctx->post_msg_wq);
> 
> It could also be a confusion, there are calls to
> 
> flush_workqueue(ctx->post_msg_wq);
> 
> for suspend-resume, so wondering if the right sequence could be
> 
> flush_workqueue(ctx->post_msg_wq);
> destroy_workqueue(ctx->post_msg_wq);
> 
> ?

Never mind, answering to my own question, destroy_workqueue() calls 
drain_workqueue() which calls flush_workqueue() internally

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> 
>>       cpu_latency_qos_remove_request(ctx->qos);
>>       kfree(ctx->fw_sg_list.src);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: intel: atom: Remove superfluous flush_scheduled_work()
  2022-03-22 15:48 [PATCH] ASoC: intel: atom: Remove superfluous flush_scheduled_work() Takashi Iwai
  2022-03-22 15:57 ` Pierre-Louis Bossart
@ 2022-03-22 16:11 ` Cezary Rojewski
  2022-04-05  9:31 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Cezary Rojewski @ 2022-03-22 16:11 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel; +Cc: Tetsuo Handa, Mark Brown, Pierre-Louis Bossart

On 2022-03-22 4:48 PM, Takashi Iwai wrote:
> It seems that flush_scheduled_work() is called without any real
> purpose at sst_context_cleanup() (the driver doesn't put works on the
> global queue at all).  As the flush_schedule_work() function is going
> to be abolished in near future, let's drop it now.
> 
> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>


Thanks for the contribution, Takashi! LGTM so:

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>

>   sound/soc/intel/atom/sst/sst.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c
> index e21e11dac000..3a42d68c0247 100644
> --- a/sound/soc/intel/atom/sst/sst.c
> +++ b/sound/soc/intel/atom/sst/sst.c
> @@ -360,7 +360,6 @@ void sst_context_cleanup(struct intel_sst_drv *ctx)
>   	sst_unregister(ctx->dev);
>   	sst_set_fw_state_locked(ctx, SST_SHUTDOWN);
>   	sysfs_remove_group(&ctx->dev->kobj, &sst_fw_version_attr_group);
> -	flush_scheduled_work();
>   	destroy_workqueue(ctx->post_msg_wq);
>   	cpu_latency_qos_remove_request(ctx->qos);
>   	kfree(ctx->fw_sg_list.src);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: intel: atom: Remove superfluous flush_scheduled_work()
  2022-03-22 15:48 [PATCH] ASoC: intel: atom: Remove superfluous flush_scheduled_work() Takashi Iwai
  2022-03-22 15:57 ` Pierre-Louis Bossart
  2022-03-22 16:11 ` Cezary Rojewski
@ 2022-04-05  9:31 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2022-04-05  9:31 UTC (permalink / raw)
  To: tiwai, alsa-devel; +Cc: penguin-kernel, cezary.rojewski, pierre-louis.bossart

On Tue, 22 Mar 2022 16:48:26 +0100, Takashi Iwai wrote:
> It seems that flush_scheduled_work() is called without any real
> purpose at sst_context_cleanup() (the driver doesn't put works on the
> global queue at all).  As the flush_schedule_work() function is going
> to be abolished in near future, let's drop it now.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: intel: atom: Remove superfluous flush_scheduled_work()
      commit: 290186e14c3bbef07a6c68e689f26bf076259ee4

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-05  9:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 15:48 [PATCH] ASoC: intel: atom: Remove superfluous flush_scheduled_work() Takashi Iwai
2022-03-22 15:57 ` Pierre-Louis Bossart
2022-03-22 16:06   ` Pierre-Louis Bossart
2022-03-22 16:11 ` Cezary Rojewski
2022-04-05  9:31 ` Mark Brown

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.