All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] qmimodem: Remove redundant unregister all calls
@ 2024-04-23 13:57 Steve Schrock
  2024-04-23 13:57 ` [PATCH 2/2] qmimodem: Eliminate qmi_service reference counting Steve Schrock
  2024-04-23 15:30 ` [PATCH 1/2] qmimodem: Remove redundant unregister all calls patchwork-bot+ofono
  0 siblings, 2 replies; 3+ messages in thread
From: Steve Schrock @ 2024-04-23 13:57 UTC (permalink / raw)
  To: ofono; +Cc: Steve Schrock

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

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);
-- 
2.40.1


-- 


*Confidentiality Note:* We care about protecting our proprietary 
information, confidential material, and trade secrets. This message may 
contain some or all of those things. Cruise will suffer material harm if 
anyone other than the intended recipient disseminates or takes any action 
based on this message. If you have received this message (including any 
attachments) in error, please delete it immediately and notify the sender 
promptly.

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

end of thread, other threads:[~2024-04-23 15:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-23 13:57 [PATCH 1/2] qmimodem: Remove redundant unregister all calls Steve Schrock
2024-04-23 13:57 ` [PATCH 2/2] qmimodem: Eliminate qmi_service reference counting Steve Schrock
2024-04-23 15:30 ` [PATCH 1/2] qmimodem: Remove redundant unregister all calls patchwork-bot+ofono

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.