public inbox for ofono@lists.linux.dev
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH v2 02/33] qmi: Rename qmi_result_func_t
Date: Tue, 18 Jun 2024 15:01:44 -0500	[thread overview]
Message-ID: <20240618200231.1129282-2-denkenz@gmail.com> (raw)
In-Reply-To: <20240618200231.1129282-1-denkenz@gmail.com>

to qmi_service_result_func_t to be more consistent.
---
 drivers/qmimodem/call-settings.c |  2 +-
 drivers/qmimodem/qmi.c           |  8 ++++----
 drivers/qmimodem/qmi.h           | 12 +++++-------
 drivers/qmimodem/sms.c           |  2 +-
 4 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/qmimodem/call-settings.c b/drivers/qmimodem/call-settings.c
index 3611c98894a0..8a65217aceb0 100644
--- a/drivers/qmimodem/call-settings.c
+++ b/drivers/qmimodem/call-settings.c
@@ -24,7 +24,7 @@ struct call_settings_data {
 };
 
 static void query_status(struct ofono_call_settings *cs, uint16_t message,
-				qmi_result_func_t fn,
+				qmi_service_result_func_t fn,
 				ofono_call_settings_status_cb_t cb, void *data)
 {
 	struct call_settings_data *csd = ofono_call_settings_get_data(cs);
diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c
index 632f647e5ea7..c5a4a37b917d 100644
--- a/drivers/qmimodem/qmi.c
+++ b/drivers/qmimodem/qmi.c
@@ -141,7 +141,7 @@ struct qmi_notify {
 	uint16_t id;
 	uint16_t message;
 	unsigned int service_handle;
-	qmi_result_func_t callback;
+	qmi_service_result_func_t callback;
 	void *user_data;
 	qmi_destroy_func_t destroy;
 };
@@ -2678,7 +2678,7 @@ bool qmi_service_get_version(struct qmi_service *service,
 }
 
 struct service_send_data {
-	qmi_result_func_t func;
+	qmi_service_result_func_t func;
 	void *user_data;
 	qmi_destroy_func_t destroy;
 };
@@ -2722,7 +2722,7 @@ done:
 
 uint16_t qmi_service_send(struct qmi_service *service,
 				uint16_t message, struct qmi_param *param,
-				qmi_result_func_t func,
+				qmi_service_result_func_t func,
 				void *user_data, qmi_destroy_func_t destroy)
 {
 	struct qmi_device *device;
@@ -2838,7 +2838,7 @@ static bool qmi_service_cancel_all(struct qmi_service *service)
 }
 
 uint16_t qmi_service_register(struct qmi_service *service,
-				uint16_t message, qmi_result_func_t func,
+				uint16_t message, qmi_service_result_func_t func,
 				void *user_data, qmi_destroy_func_t destroy)
 {
 	struct qmi_notify *notify;
diff --git a/drivers/qmimodem/qmi.h b/drivers/qmimodem/qmi.h
index de6238f25e62..3e532ec25abd 100644
--- a/drivers/qmimodem/qmi.h
+++ b/drivers/qmimodem/qmi.h
@@ -60,11 +60,14 @@ typedef void (*qmi_destroy_func_t)(void *user_data);
 
 
 struct qmi_device;
+struct qmi_result;
 
 typedef void (*qmi_debug_func_t)(const char *str, void *user_data);
 typedef void (*qmi_shutdown_func_t)(void *user_data);
 typedef void (*qmi_discover_func_t)(void *user_data);
 
+typedef void (*qmi_service_result_func_t)(struct qmi_result *, void *);
+
 void qmi_device_free(struct qmi_device *device);
 
 void qmi_device_set_debug(struct qmi_device *device,
@@ -105,9 +108,6 @@ struct qmi_param *qmi_param_new_uint8(uint8_t type, uint8_t value);
 struct qmi_param *qmi_param_new_uint16(uint8_t type, uint16_t value);
 struct qmi_param *qmi_param_new_uint32(uint8_t type, uint32_t value);
 
-
-struct qmi_result;
-
 bool qmi_result_set_error(struct qmi_result *result, uint16_t *error);
 const char *qmi_result_get_error(struct qmi_result *result);
 
@@ -130,8 +130,6 @@ int qmi_error_to_ofono_cme(int qmi_error);
 
 struct qmi_service;
 
-typedef void (*qmi_result_func_t)(struct qmi_result *result, void *user_data);
-
 typedef void (*qmi_create_func_t)(struct qmi_service *service, void *user_data);
 
 bool qmi_service_create_shared(struct qmi_device *device,
@@ -146,11 +144,11 @@ bool qmi_service_get_version(struct qmi_service *service,
 
 uint16_t qmi_service_send(struct qmi_service *service,
 				uint16_t message, struct qmi_param *param,
-				qmi_result_func_t func,
+				qmi_service_result_func_t func,
 				void *user_data, qmi_destroy_func_t destroy);
 bool qmi_service_cancel(struct qmi_service *service, uint16_t id);
 
 uint16_t qmi_service_register(struct qmi_service *service,
-				uint16_t message, qmi_result_func_t func,
+				uint16_t message, qmi_service_result_func_t func,
 				void *user_data, qmi_destroy_func_t destroy);
 bool qmi_service_unregister(struct qmi_service *service, uint16_t id);
diff --git a/drivers/qmimodem/sms.c b/drivers/qmimodem/sms.c
index 4238665a5e8d..2ac06a40bdd6 100644
--- a/drivers/qmimodem/sms.c
+++ b/drivers/qmimodem/sms.c
@@ -353,7 +353,7 @@ static void delete_msg(struct ofono_sms *sms, uint8_t tag)
 {
 	struct sms_data *data = ofono_sms_get_data(sms);
 	struct qmi_param *param;
-	qmi_result_func_t func = NULL;
+	qmi_service_result_func_t func = NULL;
 
 	DBG("");
 
-- 
2.45.0


  reply	other threads:[~2024-06-18 20:02 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 20:01 [PATCH v2 01/33] qmi: Remove qmi_free() Denis Kenzior
2024-06-18 20:01 ` Denis Kenzior [this message]
2024-06-18 20:01 ` [PATCH v2 03/33] qmi: Drop unused major/minor information Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 04/33] qmi: Add qmi_qrtr_node_get_service Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 05/33] plugins: Add new qrtrqmi modem driver Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 06/33] gobi: Use correct attribute name in docs Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 07/33] udevng: Use new qrtrqmi driver for MHI and SoC modems Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 08/33] gobi: Remove qrtr support Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 09/33] udevng: Do not set DeviceProtocol Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 10/33] unit: Rename device to node Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 11/33] qmi: Rename qmi_device_new_qrtr to qmi_qrtr_node_new Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 12/33] qmi: Rename qmi_device_new_qmux to qmi_qmux_device_new Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 13/33] unit: Drop use of qmi_service_create_shared Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 14/33] qmi: qmux: Make shared service creation generic Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 15/33] qmi: Rename qmi_device_get_service_version Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 16/33] qmi: sms: Require at WMS version 1.2+ Denis Kenzior
2024-06-18 20:01 ` [PATCH v2 17/33] qmi: Rework qmi_service_get_version Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 18/33] qmi: break up qmi_device_free into qrtr & qmux variants Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 19/33] qmi: Convert DBG statements to __debug_device Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 20/33] qmi: introduce qmi_qrtr_node_lookup Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 21/33] qmi: split qmi_device_has_service into QRTR and QMUX version Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 22/33] qmi: split qmi_device_set_debug into QRTR and QMUX versions Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 23/33] qmi: Make qmi_qrtr_node methods take struct qmi_qrtr_node Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 24/33] qmi: Move expected data format handling into gobi Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 25/33] qmi: Rename and refactor qmi_device_discover Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 26/33] qmi: Rename qmi_device_shutdown Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 27/33] qmi: Rename qmi_device_qmux to qmi_qmux_device Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 28/33] qmi: Make qmux methods operate on 'qmi_qmux_device' Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 29/33] qmi: combine service_send_data into qmi_request Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 30/33] qmi: combine qmux_client_create_data " Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 31/33] gprs: Fix memory leak Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 32/33] qmi:gprs: Don't fail on unsupported INDICATION_REGISTER Denis Kenzior
2024-06-18 20:02 ` [PATCH v2 33/33] qmi: non-premultiplexed MHI devices Denis Kenzior

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=20240618200231.1129282-2-denkenz@gmail.com \
    --to=denkenz@gmail.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