diff mbox series

[6/7] qmi: gprs-context: Remove single-use structure definition

Message ID 20240416151448.3359644-6-denkenz@gmail.com (mailing list archive)
State Accepted
Commit 93395363f1cba09503c601f9fe19fe9285b6e4fc
Headers show
Series [1/7] qmimodem: wds: Introduce qmi_wds_ip_family enum | expand

Commit Message

Denis Kenzior April 16, 2024, 3:14 p.m. UTC
This structure is defined in wds.h but only used once inside
packet_status_notify().  It is unlikely to be used elsewhere since this
TLV is specific to the connection status indication.  Define/declare
this structure directly in the handler instead.
---
 drivers/qmimodem/gprs-context.c | 5 ++++-
 drivers/qmimodem/wds.h          | 6 ------
 2 files changed, 4 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/drivers/qmimodem/gprs-context.c b/drivers/qmimodem/gprs-context.c
index 14da16046f2a..b1fdfc74cc34 100644
--- a/drivers/qmimodem/gprs-context.c
+++ b/drivers/qmimodem/gprs-context.c
@@ -48,7 +48,10 @@  static void pkt_status_notify(struct qmi_result *result, void *user_data)
 	static const uint8_t RESULT_IP_FAMILY = 0x12;
 	struct ofono_gprs_context *gc = user_data;
 	struct gprs_context_data *data = ofono_gprs_context_get_data(gc);
-	const struct qmi_wds_notify_conn_status *status;
+	const struct {
+		uint8_t status;
+		uint8_t reconf;
+	} __attribute__((__packed__)) *status;
 	uint16_t len;
 	uint8_t ip_family;
 
diff --git a/drivers/qmimodem/wds.h b/drivers/qmimodem/wds.h
index 0cfbd9802531..3c9b534c1f82 100644
--- a/drivers/qmimodem/wds.h
+++ b/drivers/qmimodem/wds.h
@@ -32,12 +32,6 @@  enum qmi_wds_authentication {
 	QMI_WDS_AUTHENTICATION_CHAP	= 0x2,
 };
 
-/* Packet data connection status indication */
-struct qmi_wds_notify_conn_status {
-	uint8_t status;
-	uint8_t reconf;
-} __attribute__((__packed__));
-
 enum qmi_wds_connection_status {
 	QMI_WDS_CONNECTION_STATUS_DISCONNECTED =	0x01,
 	QMI_WDS_CONNECTION_STATUS_CONNECTED =		0x02,