From: Steve Schrock <steve.schrock@getcruise.com>
To: ofono@lists.linux.dev
Cc: Steve Schrock <steve.schrock@getcruise.com>
Subject: [PATCH 1/2] qmimodem: Remove redundant unregister all calls
Date: Tue, 23 Apr 2024 13:57:10 +0000 [thread overview]
Message-ID: <20240423135711.272881-1-steve.schrock@getcruise.com> (raw)
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.
next reply other threads:[~2024-04-23 13:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 13:57 Steve Schrock [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240423135711.272881-1-steve.schrock@getcruise.com \
--to=steve.schrock@getcruise.com \
--cc=ofono@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).