All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] [RFC] Clean up undefined function pointer casts
@ 2016-04-26  6:19 John Ernberg
  2016-04-26  6:19 ` [PATCH v2 1/2] configure: Bump glib dependecy to 2.32 John Ernberg
  2016-04-26 13:06 ` [PATCH v2 0/2] [RFC] Clean up undefined function pointer casts Denis Kenzior
  0 siblings, 2 replies; 6+ messages in thread
From: John Ernberg @ 2016-04-26  6:19 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

From: John Ernberg <john.ernberg@actia.se>

v2: Bump glib requirement to version 2.32 to gain access to g_queue_free_full,
this saves using a wrapper function to clean up the queue in the stk.

John Ernberg (2):
  configure: Bump glib dependecy to 2.32
  stk: clean up undefined function pointer casts

 configure.ac | 4 ++--
 src/stk.c    | 6 ++----
 2 files changed, 4 insertions(+), 6 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/2] configure: Bump glib dependecy to 2.32
  2016-04-26  6:19 [PATCH v2 0/2] [RFC] Clean up undefined function pointer casts John Ernberg
@ 2016-04-26  6:19 ` John Ernberg
  2016-04-26  6:19   ` [PATCH v2 2/2] stk: clean up undefined function pointer casts John Ernberg
  2016-04-26  7:39   ` [PATCH v2 1/2] configure: Bump glib dependecy to 2.32 Daniel Wagner
  2016-04-26 13:06 ` [PATCH v2 0/2] [RFC] Clean up undefined function pointer casts Denis Kenzior
  1 sibling, 2 replies; 6+ messages in thread
From: John Ernberg @ 2016-04-26  6:19 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 690 bytes --]

From: John Ernberg <john.ernberg@actia.se>

Needed to support g_queue_free_full
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index f6253e5..88ac6db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,8 +63,8 @@ AC_CHECK_FUNC(signalfd, dummy=yes,
 AC_CHECK_LIB(dl, dlopen, dummy=yes,
 			AC_MSG_ERROR(dynamic linking loader is required))
 
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
-				AC_MSG_ERROR(GLib >= 2.28 is required))
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
+				AC_MSG_ERROR(GLib >= 2.32 is required))
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] stk: clean up undefined function pointer casts
  2016-04-26  6:19 ` [PATCH v2 1/2] configure: Bump glib dependecy to 2.32 John Ernberg
@ 2016-04-26  6:19   ` John Ernberg
  2016-04-26  7:39   ` [PATCH v2 1/2] configure: Bump glib dependecy to 2.32 Daniel Wagner
  1 sibling, 0 replies; 6+ messages in thread
From: John Ernberg @ 2016-04-26  6:19 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

From: John Ernberg <john.ernberg@actia.se>

---
 src/stk.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/stk.c b/src/stk.c
index 01c95b5..373f696 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -2315,8 +2315,7 @@ static gboolean handle_command_refresh(const struct stk_command *cmd,
 			break;
 		}
 
-		g_slist_foreach(file_list, (GFunc) g_free, NULL);
-		g_slist_free(file_list);
+		g_slist_free_full(file_list, g_free);
 
 		return FALSE;
 	}
@@ -3163,8 +3162,7 @@ static void stk_unregister(struct ofono_atom *atom)
 		stk->main_menu = NULL;
 	}
 
-	g_queue_foreach(stk->envelope_q, (GFunc) g_free, NULL);
-	g_queue_free(stk->envelope_q);
+	g_queue_free_full(stk->envelope_q, g_free);
 
 	ofono_modem_remove_interface(modem, OFONO_STK_INTERFACE);
 	g_dbus_unregister_interface(conn, path, OFONO_STK_INTERFACE);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] configure: Bump glib dependecy to 2.32
  2016-04-26  6:19 ` [PATCH v2 1/2] configure: Bump glib dependecy to 2.32 John Ernberg
  2016-04-26  6:19   ` [PATCH v2 2/2] stk: clean up undefined function pointer casts John Ernberg
@ 2016-04-26  7:39   ` Daniel Wagner
  2016-04-26 13:11     ` Denis Kenzior
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Wagner @ 2016-04-26  7:39 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

On 04/26/2016 08:19 AM, John Ernberg wrote:

> -PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
> -				AC_MSG_ERROR(GLib >= 2.28 is required))
> +PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
> +				AC_MSG_ERROR(GLib >= 2.32 is required))

Some time ago we had a discussion on the ConnMan mailing list doing the
same thing. IIRC, 2.32 has a larger memory footprint compared to 2.28.
That was an issue back than. Don't know if that is still relevant.

cheers,
daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/2] [RFC] Clean up undefined function pointer casts
  2016-04-26  6:19 [PATCH v2 0/2] [RFC] Clean up undefined function pointer casts John Ernberg
  2016-04-26  6:19 ` [PATCH v2 1/2] configure: Bump glib dependecy to 2.32 John Ernberg
@ 2016-04-26 13:06 ` Denis Kenzior
  1 sibling, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2016-04-26 13:06 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

Hi John,

On 04/26/2016 01:19 AM, John Ernberg wrote:
> From: John Ernberg <john.ernberg@actia.se>
>
> v2: Bump glib requirement to version 2.32 to gain access to g_queue_free_full,
> this saves using a wrapper function to clean up the queue in the stk.
>
> John Ernberg (2):
>    configure: Bump glib dependecy to 2.32
>    stk: clean up undefined function pointer casts
>
>   configure.ac | 4 ++--
>   src/stk.c    | 6 ++----
>   2 files changed, 4 insertions(+), 6 deletions(-)
>

Both applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] configure: Bump glib dependecy to 2.32
  2016-04-26  7:39   ` [PATCH v2 1/2] configure: Bump glib dependecy to 2.32 Daniel Wagner
@ 2016-04-26 13:11     ` Denis Kenzior
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2016-04-26 13:11 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

Hi Daniel,

On 04/26/2016 02:39 AM, Daniel Wagner wrote:
> On 04/26/2016 08:19 AM, John Ernberg wrote:
>
>> -PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
>> -				AC_MSG_ERROR(GLib >= 2.28 is required))
>> +PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
>> +				AC_MSG_ERROR(GLib >= 2.32 is required))
>
> Some time ago we had a discussion on the ConnMan mailing list doing the
> same thing. IIRC, 2.32 has a larger memory footprint compared to 2.28.
> That was an issue back than. Don't know if that is still relevant.
>

Yes, that is a good point.  Still, I don't think it makes sense to try 
and depend on a version from 2011.  Newer glib versions are even worse.

Our goal is to migrate oFono away from glib and onto ell, which is the 
proper solution to the footprint problem long-term.

Regards,
-Denis


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-04-26 13:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26  6:19 [PATCH v2 0/2] [RFC] Clean up undefined function pointer casts John Ernberg
2016-04-26  6:19 ` [PATCH v2 1/2] configure: Bump glib dependecy to 2.32 John Ernberg
2016-04-26  6:19   ` [PATCH v2 2/2] stk: clean up undefined function pointer casts John Ernberg
2016-04-26  7:39   ` [PATCH v2 1/2] configure: Bump glib dependecy to 2.32 Daniel Wagner
2016-04-26 13:11     ` Denis Kenzior
2016-04-26 13:06 ` [PATCH v2 0/2] [RFC] Clean up undefined function pointer casts Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.