public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: firewire: Remove unused cmp_connection_update
@ 2024-10-09  0:36 linux
  2024-10-10  9:16 ` Takashi Sakamoto
  2024-10-10 12:22 ` Takashi Iwai
  0 siblings, 2 replies; 3+ messages in thread
From: linux @ 2024-10-09  0:36 UTC (permalink / raw)
  To: clemens, o-takashi, perex, tiwai
  Cc: linux-sound, linux-kernel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <linux@treblig.org>

cmp_connection_update() has been unused since 2019's commit
7eb7b18e9fc7 ("ALSA: fireworks: code refactoring for bus reset handler")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 sound/firewire/cmp.c | 47 --------------------------------------------
 sound/firewire/cmp.h |  1 -
 2 files changed, 48 deletions(-)

diff --git a/sound/firewire/cmp.c b/sound/firewire/cmp.c
index b596bec19774..f5028a061a91 100644
--- a/sound/firewire/cmp.c
+++ b/sound/firewire/cmp.c
@@ -333,53 +333,6 @@ int cmp_connection_establish(struct cmp_connection *c)
 }
 EXPORT_SYMBOL(cmp_connection_establish);
 
-/**
- * cmp_connection_update - update the connection after a bus reset
- * @c: the connection manager
- *
- * This function must be called from the driver's .update handler to
- * reestablish any connection that might have been active.
- *
- * Returns zero on success, or a negative error code.  On an error, the
- * connection is broken and the caller must stop transmitting iso packets.
- */
-int cmp_connection_update(struct cmp_connection *c)
-{
-	int err;
-
-	mutex_lock(&c->mutex);
-
-	if (!c->connected) {
-		mutex_unlock(&c->mutex);
-		return 0;
-	}
-
-	err = fw_iso_resources_update(&c->resources);
-	if (err < 0)
-		goto err_unconnect;
-
-	if (c->direction == CMP_OUTPUT)
-		err = pcr_modify(c, opcr_set_modify, pcr_set_check,
-				 SUCCEED_ON_BUS_RESET);
-	else
-		err = pcr_modify(c, ipcr_set_modify, pcr_set_check,
-				 SUCCEED_ON_BUS_RESET);
-
-	if (err < 0)
-		goto err_unconnect;
-
-	mutex_unlock(&c->mutex);
-
-	return 0;
-
-err_unconnect:
-	c->connected = false;
-	mutex_unlock(&c->mutex);
-
-	return err;
-}
-EXPORT_SYMBOL(cmp_connection_update);
-
 static __be32 pcr_break_modify(struct cmp_connection *c, __be32 pcr)
 {
 	return pcr & ~cpu_to_be32(PCR_BCAST_CONN | PCR_P2P_CONN_MASK);
diff --git a/sound/firewire/cmp.h b/sound/firewire/cmp.h
index 26ab88000e34..66fc08b742d2 100644
--- a/sound/firewire/cmp.h
+++ b/sound/firewire/cmp.h
@@ -47,7 +47,6 @@ int cmp_connection_reserve(struct cmp_connection *connection,
 void cmp_connection_release(struct cmp_connection *connection);
 
 int cmp_connection_establish(struct cmp_connection *connection);
-int cmp_connection_update(struct cmp_connection *connection);
 void cmp_connection_break(struct cmp_connection *connection);
 
 #endif
-- 
2.46.2


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

* Re: [PATCH] ALSA: firewire: Remove unused cmp_connection_update
  2024-10-09  0:36 [PATCH] ALSA: firewire: Remove unused cmp_connection_update linux
@ 2024-10-10  9:16 ` Takashi Sakamoto
  2024-10-10 12:22 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Sakamoto @ 2024-10-10  9:16 UTC (permalink / raw)
  To: linux; +Cc: clemens, perex, tiwai, linux-sound, linux-kernel

Hi,

Thanks for your sending the patch.

On Wed, Oct 09, 2024 at 01:36:53AM +0100, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> cmp_connection_update() has been unused since 2019's commit
> 7eb7b18e9fc7 ("ALSA: fireworks: code refactoring for bus reset handler")
> 
> Remove it.
> 
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> ---
>  sound/firewire/cmp.c | 47 --------------------------------------------
>  sound/firewire/cmp.h |  1 -
>  2 files changed, 48 deletions(-)

Indeed. The issued kernel API is unused.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>


Thanks

Takashi Sakamoto

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

* Re: [PATCH] ALSA: firewire: Remove unused cmp_connection_update
  2024-10-09  0:36 [PATCH] ALSA: firewire: Remove unused cmp_connection_update linux
  2024-10-10  9:16 ` Takashi Sakamoto
@ 2024-10-10 12:22 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2024-10-10 12:22 UTC (permalink / raw)
  To: linux; +Cc: clemens, o-takashi, perex, tiwai, linux-sound, linux-kernel

On Wed, 09 Oct 2024 02:36:53 +0200,
linux@treblig.org wrote:
> 
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> cmp_connection_update() has been unused since 2019's commit
> 7eb7b18e9fc7 ("ALSA: fireworks: code refactoring for bus reset handler")
> 
> Remove it.
> 
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>

Thanks, applied now.


Takashi

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

end of thread, other threads:[~2024-10-10 12:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09  0:36 [PATCH] ALSA: firewire: Remove unused cmp_connection_update linux
2024-10-10  9:16 ` Takashi Sakamoto
2024-10-10 12:22 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox