All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] ASoC: intel: atom: Remove superfluous flush_scheduled_work()
Date: Tue, 22 Mar 2022 11:06:54 -0500	[thread overview]
Message-ID: <7e13767e-9a88-2cb6-d16b-4fdeeb746c2d@linux.intel.com> (raw)
In-Reply-To: <f0e9071a-351d-40d0-35d7-8c5a7f2b78f7@linux.intel.com>



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);

  reply	other threads:[~2022-03-22 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2022-03-22 16:11 ` Cezary Rojewski
2022-04-05  9:31 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e13767e-9a88-2cb6-d16b-4fdeeb746c2d@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.