linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: pxa: Return -EOPNOTSUPP instead of -EINVAL
@ 2025-09-18 11:21 Thorsten Blum
  2025-09-18 11:33 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Blum @ 2025-09-18 11:21 UTC (permalink / raw)
  To: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: Thorsten Blum, linux-arm-kernel, linux-sound, linux-kernel

Return -EOPNOTSUPP from mmp_sspa_set_dai_sysclk() instead of -EINVAL for
unsupported clock ids, and remove the obsolete comment.

Replace other -ENOTSUPP returns with -EOPNOTSUPP to comply with SUSv4
error code guidelines and silence multiple checkpatch warnings:

  ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 sound/soc/pxa/mmp-sspa.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c
index 73f36c9dd35c..38815ca8f152 100644
--- a/sound/soc/pxa/mmp-sspa.c
+++ b/sound/soc/pxa/mmp-sspa.c
@@ -111,7 +111,7 @@ static int mmp_sspa_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
 	int ret = 0;
 
 	if (dev->of_node)
-		return -ENOTSUPP;
+		return -EOPNOTSUPP;
 
 	switch (clk_id) {
 	case MMP_SSPA_CLK_AUDIO:
@@ -121,8 +121,7 @@ static int mmp_sspa_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
 		break;
 	case MMP_SSPA_CLK_PLL:
 	case MMP_SSPA_CLK_VCXO:
-		/* not support yet */
-		return -EINVAL;
+		return -EOPNOTSUPP;
 	default:
 		return -EINVAL;
 	}
@@ -139,7 +138,7 @@ static int mmp_sspa_set_dai_pll(struct snd_soc_dai *cpu_dai, int pll_id,
 	int ret = 0;
 
 	if (dev->of_node)
-		return -ENOTSUPP;
+		return -EOPNOTSUPP;
 
 	switch (pll_id) {
 	case MMP_SYSCLK:
-- 
2.51.0



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

* Re: [PATCH] ASoC: pxa: Return -EOPNOTSUPP instead of -EINVAL
  2025-09-18 11:21 [PATCH] ASoC: pxa: Return -EOPNOTSUPP instead of -EINVAL Thorsten Blum
@ 2025-09-18 11:33 ` Mark Brown
  2025-09-18 11:57   ` Thorsten Blum
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2025-09-18 11:33 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, linux-arm-kernel, linux-sound,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

On Thu, Sep 18, 2025 at 01:21:02PM +0200, Thorsten Blum wrote:

> Return -EOPNOTSUPP from mmp_sspa_set_dai_sysclk() instead of -EINVAL for
> unsupported clock ids, and remove the obsolete comment.

Why?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] ASoC: pxa: Return -EOPNOTSUPP instead of -EINVAL
  2025-09-18 11:33 ` Mark Brown
@ 2025-09-18 11:57   ` Thorsten Blum
  0 siblings, 0 replies; 3+ messages in thread
From: Thorsten Blum @ 2025-09-18 11:57 UTC (permalink / raw)
  To: Mark Brown
  Cc: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, linux-arm-kernel, linux-sound,
	linux-kernel

On 18. Sep 2025, at 13:33, Mark Brown wrote:
> On Thu, Sep 18, 2025 at 01:21:02PM +0200, Thorsten Blum wrote:
> 
>> Return -EOPNOTSUPP from mmp_sspa_set_dai_sysclk() instead of -EINVAL for
>> unsupported clock ids, and remove the obsolete comment.
> 
> Why?

The comment says "not supported yet", so returning -EOPNOTSUPP (or
-ENOTSUPP) reflects this more accurately than -EINVAL, unless I
misunderstood something.

Feel free to ignore this patch if it's inconsistent with how other
drivers handle this (I didn't check tbh).

Thanks,
Thorsten



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

end of thread, other threads:[~2025-09-18 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 11:21 [PATCH] ASoC: pxa: Return -EOPNOTSUPP instead of -EINVAL Thorsten Blum
2025-09-18 11:33 ` Mark Brown
2025-09-18 11:57   ` Thorsten Blum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).