linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ALSA: aoa: make remove callback of soundbus driver void returned
@ 2023-01-06 15:17 Dawei Li
  2023-01-24 15:23 ` Dawei Li
  2023-01-25  8:35 ` Takashi Iwai
  0 siblings, 2 replies; 3+ messages in thread
From: Dawei Li @ 2023-01-06 15:17 UTC (permalink / raw)
  To: johannes, perex, tiwai; +Cc: alsa-devel, linuxppc-dev, linux-kernel, Dawei Li

Since commit fc7a6209d571 ("bus: Make remove callback return void")
forces bus_type::remove be void-returned, it doesn't make much sense
for any bus based driver implementing remove callbalk to return
non-void to its caller.

As such, change the remove function for soundbus based drivers to
return void.

Signed-off-by: Dawei Li <set_pte_at@outlook.com>
---
v1 -> v2
- Update commit message.
- Rebased to latest sound/for-next.

v1
- https://lore.kernel.org/all/TYCP286MB2323BBFCE929111043E60D3BCA189@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM/
---
 sound/aoa/fabrics/layout.c    | 3 +--
 sound/aoa/soundbus/soundbus.h | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c
index ec4ef18555bc..850dc8c53e9b 100644
--- a/sound/aoa/fabrics/layout.c
+++ b/sound/aoa/fabrics/layout.c
@@ -1094,7 +1094,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
 	return -ENODEV;
 }
 
-static int aoa_fabric_layout_remove(struct soundbus_dev *sdev)
+static void aoa_fabric_layout_remove(struct soundbus_dev *sdev)
 {
 	struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
 	int i;
@@ -1123,7 +1123,6 @@ static int aoa_fabric_layout_remove(struct soundbus_dev *sdev)
 	kfree(ldev);
 	sdev->pcmid = -1;
 	sdev->pcmname = NULL;
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
diff --git a/sound/aoa/soundbus/soundbus.h b/sound/aoa/soundbus/soundbus.h
index 3a99c1f1a3ca..db40f9d042b4 100644
--- a/sound/aoa/soundbus/soundbus.h
+++ b/sound/aoa/soundbus/soundbus.h
@@ -185,7 +185,7 @@ struct soundbus_driver {
 	/* we don't implement any matching at all */
 
 	int	(*probe)(struct soundbus_dev* dev);
-	int	(*remove)(struct soundbus_dev* dev);
+	void	(*remove)(struct soundbus_dev *dev);
 
 	int	(*shutdown)(struct soundbus_dev* dev);
 
-- 
2.25.1


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

* Re: [PATCH v2] ALSA: aoa: make remove callback of soundbus driver void returned
  2023-01-06 15:17 [PATCH v2] ALSA: aoa: make remove callback of soundbus driver void returned Dawei Li
@ 2023-01-24 15:23 ` Dawei Li
  2023-01-25  8:35 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Dawei Li @ 2023-01-24 15:23 UTC (permalink / raw)
  To: johannes, perex, tiwai; +Cc: alsa-devel, linuxppc-dev, linux-kernel

On Fri, Jan 06, 2023 at 11:17:46PM +0800, Dawei Li wrote:
> Since commit fc7a6209d571 ("bus: Make remove callback return void")
> forces bus_type::remove be void-returned, it doesn't make much sense
> for any bus based driver implementing remove callbalk to return
> non-void to its caller.
> 
> As such, change the remove function for soundbus based drivers to
> return void.
> 
> Signed-off-by: Dawei Li <set_pte_at@outlook.com>

Gentle ping

> ---
> v1 -> v2
> - Update commit message.
> - Rebased to latest sound/for-next.
> 
> v1
> - https://lore.kernel.org/all/TYCP286MB2323BBFCE929111043E60D3BCA189@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM/
> ---
>  sound/aoa/fabrics/layout.c    | 3 +--
>  sound/aoa/soundbus/soundbus.h | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c
> index ec4ef18555bc..850dc8c53e9b 100644
> --- a/sound/aoa/fabrics/layout.c
> +++ b/sound/aoa/fabrics/layout.c
> @@ -1094,7 +1094,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
>  	return -ENODEV;
>  }
>  
> -static int aoa_fabric_layout_remove(struct soundbus_dev *sdev)
> +static void aoa_fabric_layout_remove(struct soundbus_dev *sdev)
>  {
>  	struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
>  	int i;
> @@ -1123,7 +1123,6 @@ static int aoa_fabric_layout_remove(struct soundbus_dev *sdev)
>  	kfree(ldev);
>  	sdev->pcmid = -1;
>  	sdev->pcmname = NULL;
> -	return 0;
>  }
>  
>  #ifdef CONFIG_PM_SLEEP
> diff --git a/sound/aoa/soundbus/soundbus.h b/sound/aoa/soundbus/soundbus.h
> index 3a99c1f1a3ca..db40f9d042b4 100644
> --- a/sound/aoa/soundbus/soundbus.h
> +++ b/sound/aoa/soundbus/soundbus.h
> @@ -185,7 +185,7 @@ struct soundbus_driver {
>  	/* we don't implement any matching at all */
>  
>  	int	(*probe)(struct soundbus_dev* dev);
> -	int	(*remove)(struct soundbus_dev* dev);
> +	void	(*remove)(struct soundbus_dev *dev);
>  
>  	int	(*shutdown)(struct soundbus_dev* dev);
>  
> -- 
> 2.25.1
> 

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

* Re: [PATCH v2] ALSA: aoa: make remove callback of soundbus driver void returned
  2023-01-06 15:17 [PATCH v2] ALSA: aoa: make remove callback of soundbus driver void returned Dawei Li
  2023-01-24 15:23 ` Dawei Li
@ 2023-01-25  8:35 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2023-01-25  8:35 UTC (permalink / raw)
  To: Dawei Li; +Cc: alsa-devel, linux-kernel, tiwai, johannes, perex, linuxppc-dev

On Fri, 06 Jan 2023 16:17:46 +0100,
Dawei Li wrote:
> 
> Since commit fc7a6209d571 ("bus: Make remove callback return void")
> forces bus_type::remove be void-returned, it doesn't make much sense
> for any bus based driver implementing remove callbalk to return
> non-void to its caller.
> 
> As such, change the remove function for soundbus based drivers to
> return void.
> 
> Signed-off-by: Dawei Li <set_pte_at@outlook.com>

Applied now, thanks.


Takashi

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

end of thread, other threads:[~2023-01-25  8:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06 15:17 [PATCH v2] ALSA: aoa: make remove callback of soundbus driver void returned Dawei Li
2023-01-24 15:23 ` Dawei Li
2023-01-25  8:35 ` Takashi Iwai

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