All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: SOF: use pm_runtime_resume_and_get()
@ 2022-04-26 18:41 Pierre-Louis Bossart
  2022-04-26 18:41 ` [PATCH 1/4] ASoC: SOF: control: " Pierre-Louis Bossart
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2022-04-26 18:41 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

simplify code pattern as recommended by Mark Brown.

Pierre-Louis Bossart (4):
  ASoC: SOF: control: use pm_runtime_resume_and_get()
  ASoC: SOF: debug: use pm_runtime_resume_and_get()
  ASoC: SOF: sof-client-ipc-flood-test: use pm_runtime_resume_and_get()
  ASoC: SOF: sof-client-ipc-msg-injector: use
    pm_runtime_resume_and_get()

 sound/soc/sof/control.c                     | 3 +--
 sound/soc/sof/debug.c                       | 3 +--
 sound/soc/sof/sof-client-ipc-flood-test.c   | 3 +--
 sound/soc/sof/sof-client-ipc-msg-injector.c | 3 +--
 4 files changed, 4 insertions(+), 8 deletions(-)

-- 
2.30.2


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

* [PATCH 1/4] ASoC: SOF: control: use pm_runtime_resume_and_get()
  2022-04-26 18:41 [PATCH 0/4] ASoC: SOF: use pm_runtime_resume_and_get() Pierre-Louis Bossart
@ 2022-04-26 18:41 ` Pierre-Louis Bossart
  2022-04-26 18:41 ` [PATCH 2/4] ASoC: SOF: debug: " Pierre-Louis Bossart
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2022-04-26 18:41 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Bard Liao, broonie, Péter Ujfalusi, Pierre-Louis Bossart

Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_noidle() pattern.

No functional changes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 sound/soc/sof/control.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/sof/control.c b/sound/soc/sof/control.c
index 3b5718a3516de..e0e9efd25d34e 100644
--- a/sound/soc/sof/control.c
+++ b/sound/soc/sof/control.c
@@ -187,10 +187,9 @@ int snd_sof_bytes_ext_volatile_get(struct snd_kcontrol *kcontrol, unsigned int _
 	const struct sof_ipc_tplg_ops *tplg_ops = sdev->ipc->ops->tplg;
 	int ret, err;
 
-	ret = pm_runtime_get_sync(scomp->dev);
+	ret = pm_runtime_resume_and_get(scomp->dev);
 	if (ret < 0 && ret != -EACCES) {
 		dev_err_ratelimited(scomp->dev, "%s: failed to resume %d\n", __func__, ret);
-		pm_runtime_put_noidle(scomp->dev);
 		return ret;
 	}
 
-- 
2.30.2


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

* [PATCH 2/4] ASoC: SOF: debug: use pm_runtime_resume_and_get()
  2022-04-26 18:41 [PATCH 0/4] ASoC: SOF: use pm_runtime_resume_and_get() Pierre-Louis Bossart
  2022-04-26 18:41 ` [PATCH 1/4] ASoC: SOF: control: " Pierre-Louis Bossart
@ 2022-04-26 18:41 ` Pierre-Louis Bossart
  2022-04-26 18:41 ` [PATCH 3/4] ASoC: SOF: sof-client-ipc-flood-test: " Pierre-Louis Bossart
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2022-04-26 18:41 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Bard Liao, broonie, Péter Ujfalusi, Pierre-Louis Bossart

Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_noidle() pattern.

No functional changes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 sound/soc/sof/debug.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
index b59619ecfacfc..54d3643b46adb 100644
--- a/sound/soc/sof/debug.c
+++ b/sound/soc/sof/debug.c
@@ -229,9 +229,8 @@ static int memory_info_update(struct snd_sof_dev *sdev, char *buf, size_t buff_s
 	if (!reply)
 		return -ENOMEM;
 
-	ret = pm_runtime_get_sync(sdev->dev);
+	ret = pm_runtime_resume_and_get(sdev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_noidle(sdev->dev);
 		dev_err(sdev->dev, "error: enabling device failed: %d\n", ret);
 		goto error;
 	}
-- 
2.30.2


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

* [PATCH 3/4] ASoC: SOF: sof-client-ipc-flood-test: use pm_runtime_resume_and_get()
  2022-04-26 18:41 [PATCH 0/4] ASoC: SOF: use pm_runtime_resume_and_get() Pierre-Louis Bossart
  2022-04-26 18:41 ` [PATCH 1/4] ASoC: SOF: control: " Pierre-Louis Bossart
  2022-04-26 18:41 ` [PATCH 2/4] ASoC: SOF: debug: " Pierre-Louis Bossart
@ 2022-04-26 18:41 ` Pierre-Louis Bossart
  2022-04-26 18:41 ` [PATCH 4/4] ASoC: SOF: sof-client-ipc-msg-injector: " Pierre-Louis Bossart
  2022-04-27 22:02 ` [PATCH 0/4] ASoC: SOF: " Mark Brown
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2022-04-26 18:41 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Bard Liao, broonie, Péter Ujfalusi, Pierre-Louis Bossart

Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_noidle() pattern.

No functional changes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 sound/soc/sof/sof-client-ipc-flood-test.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/sof/sof-client-ipc-flood-test.c b/sound/soc/sof/sof-client-ipc-flood-test.c
index db3a052c5dd2b..4bdecd80248ac 100644
--- a/sound/soc/sof/sof-client-ipc-flood-test.c
+++ b/sound/soc/sof/sof-client-ipc-flood-test.c
@@ -217,10 +217,9 @@ static ssize_t sof_ipc_flood_dfs_write(struct file *file, const char __user *buf
 			ipc_count = MAX_IPC_FLOOD_COUNT;
 	}
 
-	ret = pm_runtime_get_sync(dev);
+	ret = pm_runtime_resume_and_get(dev);
 	if (ret < 0 && ret != -EACCES) {
 		dev_err_ratelimited(dev, "debugfs write failed to resume %d\n", ret);
-		pm_runtime_put_noidle(dev);
 		goto out;
 	}
 
-- 
2.30.2


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

* [PATCH 4/4] ASoC: SOF: sof-client-ipc-msg-injector: use pm_runtime_resume_and_get()
  2022-04-26 18:41 [PATCH 0/4] ASoC: SOF: use pm_runtime_resume_and_get() Pierre-Louis Bossart
                   ` (2 preceding siblings ...)
  2022-04-26 18:41 ` [PATCH 3/4] ASoC: SOF: sof-client-ipc-flood-test: " Pierre-Louis Bossart
@ 2022-04-26 18:41 ` Pierre-Louis Bossart
  2022-04-27 22:02 ` [PATCH 0/4] ASoC: SOF: " Mark Brown
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2022-04-26 18:41 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Bard Liao, broonie, Péter Ujfalusi, Pierre-Louis Bossart

Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_noidle() pattern.

No functional changes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 sound/soc/sof/sof-client-ipc-msg-injector.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/sof/sof-client-ipc-msg-injector.c b/sound/soc/sof/sof-client-ipc-msg-injector.c
index dba6cfd7db092..c711981187aac 100644
--- a/sound/soc/sof/sof-client-ipc-msg-injector.c
+++ b/sound/soc/sof/sof-client-ipc-msg-injector.c
@@ -83,10 +83,9 @@ static ssize_t sof_msg_inject_dfs_write(struct file *file, const char __user *bu
 	if (size != count)
 		return size > 0 ? -EFAULT : size;
 
-	ret = pm_runtime_get_sync(dev);
+	ret = pm_runtime_resume_and_get(dev);
 	if (ret < 0 && ret != -EACCES) {
 		dev_err_ratelimited(dev, "debugfs write failed to resume %d\n", ret);
-		pm_runtime_put_noidle(dev);
 		return ret;
 	}
 
-- 
2.30.2


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

* Re: [PATCH 0/4] ASoC: SOF: use pm_runtime_resume_and_get()
  2022-04-26 18:41 [PATCH 0/4] ASoC: SOF: use pm_runtime_resume_and_get() Pierre-Louis Bossart
                   ` (3 preceding siblings ...)
  2022-04-26 18:41 ` [PATCH 4/4] ASoC: SOF: sof-client-ipc-msg-injector: " Pierre-Louis Bossart
@ 2022-04-27 22:02 ` Mark Brown
  4 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2022-04-27 22:02 UTC (permalink / raw)
  To: pierre-louis.bossart, alsa-devel; +Cc: tiwai

On Tue, 26 Apr 2022 13:41:02 -0500, Pierre-Louis Bossart wrote:
> simplify code pattern as recommended by Mark Brown.
> 
> Pierre-Louis Bossart (4):
>   ASoC: SOF: control: use pm_runtime_resume_and_get()
>   ASoC: SOF: debug: use pm_runtime_resume_and_get()
>   ASoC: SOF: sof-client-ipc-flood-test: use pm_runtime_resume_and_get()
>   ASoC: SOF: sof-client-ipc-msg-injector: use
>     pm_runtime_resume_and_get()
> 
> [...]

Applied to

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

Thanks!

[1/4] ASoC: SOF: control: use pm_runtime_resume_and_get()
      commit: bf0736e5d4644eb9238a1136625e09126721d2e3
[2/4] ASoC: SOF: debug: use pm_runtime_resume_and_get()
      commit: c106f46e83fd15c34cfa0a68e8218f5cb4844dd3
[4/4] ASoC: SOF: sof-client-ipc-msg-injector: use pm_runtime_resume_and_get()
      commit: 02885dd831c043d4804dfc1d2942f2f4ec5fdc18

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] 6+ messages in thread

end of thread, other threads:[~2022-04-27 22:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 18:41 [PATCH 0/4] ASoC: SOF: use pm_runtime_resume_and_get() Pierre-Louis Bossart
2022-04-26 18:41 ` [PATCH 1/4] ASoC: SOF: control: " Pierre-Louis Bossart
2022-04-26 18:41 ` [PATCH 2/4] ASoC: SOF: debug: " Pierre-Louis Bossart
2022-04-26 18:41 ` [PATCH 3/4] ASoC: SOF: sof-client-ipc-flood-test: " Pierre-Louis Bossart
2022-04-26 18:41 ` [PATCH 4/4] ASoC: SOF: sof-client-ipc-msg-injector: " Pierre-Louis Bossart
2022-04-27 22:02 ` [PATCH 0/4] ASoC: SOF: " 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.