diff mbox series

[01/27] qmi: Remove qmi_free()

Message ID 20240614185300.1086701-1-denkenz@gmail.com (mailing list archive)
State Superseded
Headers show
Series [01/27] qmi: Remove qmi_free() | expand

Commit Message

Denis Kenzior June 14, 2024, 6:52 p.m. UTC
This was just a simple wrapper around l_free, get rid of it.
---
 drivers/qmimodem/devinfo.c    | 8 ++++----
 drivers/qmimodem/qmi.c        | 5 -----
 drivers/qmimodem/qmi.h        | 2 --
 drivers/qmimodem/sim-legacy.c | 6 +++---
 drivers/qmimodem/sim.c        | 2 +-
 5 files changed, 8 insertions(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/drivers/qmimodem/devinfo.c b/drivers/qmimodem/devinfo.c
index 2e514cfa3265..fd1ca3ceb2dd 100644
--- a/drivers/qmimodem/devinfo.c
+++ b/drivers/qmimodem/devinfo.c
@@ -45,7 +45,7 @@  static void string_cb(struct qmi_result *result, void *user_data)
 
 	CALLBACK_WITH_SUCCESS(cb, str, cbd->data);
 
-	qmi_free(str);
+	l_free(str);
 }
 
 static void qmi_query_manufacturer(struct ofono_devinfo *devinfo,
@@ -136,9 +136,9 @@  static void get_ids_cb(struct qmi_result *result, void *user_data)
 	else
 		CALLBACK_WITH_FAILURE(cb, NULL, cbd->data);
 
-	qmi_free(esn);
-	qmi_free(imei);
-	qmi_free(meid);
+	l_free(esn);
+	l_free(imei);
+	l_free(meid);
 }
 
 static void qmi_query_serial(struct ofono_devinfo *devinfo,
diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c
index 91469dc2e00c..632f647e5ea7 100644
--- a/drivers/qmimodem/qmi.c
+++ b/drivers/qmimodem/qmi.c
@@ -181,11 +181,6 @@  struct qmi_tlv_hdr {
 } __attribute__ ((packed));
 #define QMI_TLV_HDR_SIZE 3
 
-void qmi_free(void *ptr)
-{
-	l_free(ptr);
-}
-
 static bool qmi_service_info_matches(const void *data, const void *user)
 {
 	const struct qmi_service_info *info = data;
diff --git a/drivers/qmimodem/qmi.h b/drivers/qmimodem/qmi.h
index 821e54443658..de6238f25e62 100644
--- a/drivers/qmimodem/qmi.h
+++ b/drivers/qmimodem/qmi.h
@@ -56,8 +56,6 @@  enum qmi_data_endpoint_type {
 	QMI_DATA_ENDPOINT_TYPE_BAM_DMUX  = 0x05,
 };
 
-void qmi_free(void *ptr);
-
 typedef void (*qmi_destroy_func_t)(void *user_data);
 
 
diff --git a/drivers/qmimodem/sim-legacy.c b/drivers/qmimodem/sim-legacy.c
index 1feaf86976c6..4c909f7f4ae4 100644
--- a/drivers/qmimodem/sim-legacy.c
+++ b/drivers/qmimodem/sim-legacy.c
@@ -71,14 +71,14 @@  static void get_iccid_cb(struct qmi_result *result, void *user_data)
 
 	len = strlen(str);
 	if (len > 20) {
-		qmi_free(str);
+		l_free(str);
 		CALLBACK_WITH_FAILURE(cb, NULL, 0, cbd->data);
 		return;
 	}
 
 	sim_encode_bcd_number(str, iccid);
 	iccid_len = len / 2;
-	qmi_free(str);
+	l_free(str);
 
 	CALLBACK_WITH_SUCCESS(cb, iccid, iccid_len, cbd->data);
 }
@@ -128,7 +128,7 @@  static void get_imsi_cb(struct qmi_result *result, void *user_data)
 
 	CALLBACK_WITH_SUCCESS(cb, str, cbd->data);
 
-	qmi_free(str);
+	l_free(str);
 }
 
 static void qmi_read_imsi(struct ofono_sim *sim,
diff --git a/drivers/qmimodem/sim.c b/drivers/qmimodem/sim.c
index 876274fa87b4..1fffae27f63e 100644
--- a/drivers/qmimodem/sim.c
+++ b/drivers/qmimodem/sim.c
@@ -427,7 +427,7 @@  static void get_imsi_cb(struct qmi_result *result, void *user_data)
 
 	CALLBACK_WITH_SUCCESS(cb, str, cbd->data);
 
-	qmi_free(str);
+	l_free(str);
 }
 
 static void qmi_read_imsi(struct ofono_sim *sim,