From 851a708442b53ed2a560920f2bc097b62face54c Mon Sep 17 00:00:00 2001
From: Aleksander Morgado <aleksander@aleksander.es>
Date: Thu, 1 Apr 2021 11:19:47 +0200
Subject: [PATCH] modem-helpers: ip family normalization doesn't need
 log_object

---
 plugins/huawei/mm-broadband-bearer-huawei.c | 2 +-
 src/mm-bearer-mbim.c                        | 2 +-
 src/mm-bearer-qmi.c                         | 2 +-
 src/mm-broadband-bearer.c                   | 4 ++--
 src/mm-modem-helpers.c                      | 3 +--
 src/mm-modem-helpers.h                      | 3 +--
 6 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/plugins/huawei/mm-broadband-bearer-huawei.c b/plugins/huawei/mm-broadband-bearer-huawei.c
index 425edda229..cb4c5d2038 100644
--- a/plugins/huawei/mm-broadband-bearer-huawei.c
+++ b/plugins/huawei/mm-broadband-bearer-huawei.c
@@ -345,7 +345,7 @@ connect_3gpp_context_step (GTask *task)
         MMBearerIpFamily ip_family;
 
         ip_family = mm_bearer_properties_get_ip_type (mm_base_bearer_peek_config (MM_BASE_BEARER (self)));
-        mm_3gpp_normalize_ip_family (&ip_family, self);
+        mm_3gpp_normalize_ip_family (&ip_family);
         if (ip_family != MM_BEARER_IP_FAMILY_IPV4) {
             g_task_return_new_error (task,
                                      MM_CORE_ERROR,
diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c
index d185eca48d..f2c16704e2 100644
--- a/src/mm-bearer-mbim.c
+++ b/src/mm-bearer-mbim.c
@@ -1054,7 +1054,7 @@ connect_context_step (GTask *task)
         }
 
         ip_family = mm_bearer_properties_get_ip_type (ctx->properties);
-        mm_3gpp_normalize_ip_family (&ip_family, self);
+        mm_3gpp_normalize_ip_family (&ip_family);
         ctx->requested_ip_type = mm_bearer_ip_family_to_mbim_context_ip_type (ip_family, &error);
         if (error) {
             g_task_return_error (task, error);
diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c
index 151d0be96c..bb754248e9 100644
--- a/src/mm-bearer-qmi.c
+++ b/src/mm-bearer-qmi.c
@@ -2068,7 +2068,7 @@ _connect (MMBaseBearer *_self,
         ctx->password = g_strdup (mm_bearer_properties_get_password (properties));
 
         ip_family = mm_bearer_properties_get_ip_type (properties);
-        if (mm_3gpp_normalize_ip_family (&ip_family, self))
+        if (mm_3gpp_normalize_ip_family (&ip_family))
             ctx->no_ip_family_preference = TRUE;
 
         if (ip_family & MM_BEARER_IP_FAMILY_IPV4)
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c
index 925439f2c6..3e9eff7d41 100644
--- a/src/mm-broadband-bearer.c
+++ b/src/mm-broadband-bearer.c
@@ -132,7 +132,7 @@ detailed_connect_context_new (MMBroadbandBearer *self,
     ctx->secondary = (secondary ? g_object_ref (secondary) : NULL);
 
     ctx->ip_family = mm_bearer_properties_get_ip_type (mm_base_bearer_peek_config (MM_BASE_BEARER (self)));
-    mm_3gpp_normalize_ip_family (&ctx->ip_family, self);
+    mm_3gpp_normalize_ip_family (&ctx->ip_family);
 
     return ctx;
 }
@@ -908,7 +908,7 @@ cid_selection_3gpp (MMBroadbandBearer   *self,
     ctx->cancellable = g_object_ref (cancellable);
 
     ctx->ip_family   = mm_bearer_properties_get_ip_type (mm_base_bearer_peek_config (MM_BASE_BEARER (self)));
-    mm_3gpp_normalize_ip_family (&ctx->ip_family, self);
+    mm_3gpp_normalize_ip_family (&ctx->ip_family);
 
     g_task_set_task_data (task, ctx, (GDestroyNotify) cid_selection_3gpp_context_free);
 
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index ce97cbc211..5ff2498c28 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -4100,8 +4100,7 @@ mm_3gpp_get_ip_family_from_pdp_type (const gchar *pdp_type)
 }
 
 gboolean
-mm_3gpp_normalize_ip_family (MMBearerIpFamily *family,
-                             gpointer          log_object)
+mm_3gpp_normalize_ip_family (MMBearerIpFamily *family)
 {
     /* if nothing specific requested, default to IPv4 */
     if (*family == MM_BEARER_IP_FAMILY_NONE || *family == MM_BEARER_IP_FAMILY_ANY) {
diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h
index ced2ef6ab2..06eb9444d7 100644
--- a/src/mm-modem-helpers.h
+++ b/src/mm-modem-helpers.h
@@ -439,8 +439,7 @@ gboolean mm_3gpp_parse_operator_id (const gchar *operator_id,
 
 const gchar      *mm_3gpp_get_pdp_type_from_ip_family (MMBearerIpFamily  family);
 MMBearerIpFamily  mm_3gpp_get_ip_family_from_pdp_type (const gchar      *pdp_type);
-gboolean          mm_3gpp_normalize_ip_family         (MMBearerIpFamily *family,
-                                                       gpointer          log_object);
+gboolean          mm_3gpp_normalize_ip_family         (MMBearerIpFamily *family);
 
 char *mm_3gpp_parse_iccid (const char *raw_iccid, GError **error);
 
-- 
GitLab