diff mbox series

[1/2] qmimodem: Remove redundant unregister all calls

Message ID 20240423135711.272881-1-steve.schrock@getcruise.com (mailing list archive)
State Superseded
Commit b9d3413bc9209ea83ebfb696672c905cb440c047
Headers show
Series [1/2] qmimodem: Remove redundant unregister all calls | expand

Commit Message

Steve Schrock April 23, 2024, 1:57 p.m. UTC
Some of the qmimodem drivers were calling qmi_service_unregister_all
before decrementing the reference count to 0. This is unnecessary
because the service will unregister all as it is being destroyed.
---
 drivers/qmimodem/gprs-context.c       | 4 +---
 drivers/qmimodem/location-reporting.c | 2 --
 drivers/qmimodem/sms.c                | 2 --
 drivers/qmimodem/voicecall.c          | 2 --
 4 files changed, 1 insertion(+), 9 deletions(-)

Comments

patchwork-bot+ofono@kernel.org April 23, 2024, 3:30 p.m. UTC | #1
Hello:

This series was applied to ofono.git (master)
by Denis Kenzior <denkenz@gmail.com>:

On Tue, 23 Apr 2024 13:57:10 +0000 you wrote:
> Some of the qmimodem drivers were calling qmi_service_unregister_all
> before decrementing the reference count to 0. This is unnecessary
> because the service will unregister all as it is being destroyed.
> ---
>  drivers/qmimodem/gprs-context.c       | 4 +---
>  drivers/qmimodem/location-reporting.c | 2 --
>  drivers/qmimodem/sms.c                | 2 --
>  drivers/qmimodem/voicecall.c          | 2 --
>  4 files changed, 1 insertion(+), 9 deletions(-)

Here is the summary with links:
  - [1/2] qmimodem: Remove redundant unregister all calls
    https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=b9d3413bc920
  - [2/2] qmimodem: Eliminate qmi_service reference counting
    https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=4b0225684d56

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/qmimodem/gprs-context.c b/drivers/qmimodem/gprs-context.c
index 6104cc82e76a..d248761f92d6 100644
--- a/drivers/qmimodem/gprs-context.c
+++ b/drivers/qmimodem/gprs-context.c
@@ -503,10 +503,8 @@  static void qmi_gprs_context_remove(struct ofono_gprs_context *gc)
 
 	ofono_gprs_context_set_data(gc, NULL);
 
-	if (data->wds) {
-		qmi_service_unregister_all(data->wds);
+	if (data->wds)
 		qmi_service_unref(data->wds);
-	}
 
 	l_free(data);
 }
diff --git a/drivers/qmimodem/location-reporting.c b/drivers/qmimodem/location-reporting.c
index a32d18245c4f..549bd5740613 100644
--- a/drivers/qmimodem/location-reporting.c
+++ b/drivers/qmimodem/location-reporting.c
@@ -257,8 +257,6 @@  static void qmi_location_reporting_remove(struct ofono_location_reporting *lr)
 
 	ofono_location_reporting_set_data(lr, NULL);
 
-	qmi_service_unregister_all(data->pds);
-
 	qmi_service_unref(data->pds);
 
 	l_free(data);
diff --git a/drivers/qmimodem/sms.c b/drivers/qmimodem/sms.c
index b9fe963520d6..12f5d6726d48 100644
--- a/drivers/qmimodem/sms.c
+++ b/drivers/qmimodem/sms.c
@@ -801,8 +801,6 @@  static void qmi_sms_remove(struct ofono_sms *sms)
 
 	ofono_sms_set_data(sms, NULL);
 
-	qmi_service_unregister_all(data->wms);
-
 	qmi_service_unref(data->wms);
 
 	if (data->msg_list)
diff --git a/drivers/qmimodem/voicecall.c b/drivers/qmimodem/voicecall.c
index b66f1ae7d56d..02376c3df447 100644
--- a/drivers/qmimodem/voicecall.c
+++ b/drivers/qmimodem/voicecall.c
@@ -653,8 +653,6 @@  static void qmi_voicecall_remove(struct ofono_voicecall *vc)
 
 	ofono_voicecall_set_data(vc, NULL);
 
-	qmi_service_unregister_all(data->voice);
-
 	qmi_service_unref(data->voice);
 
 	l_queue_destroy(data->call_list, l_free);