All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Emil Velikov <emil.velikov@collabora.com>
Subject: [PATCH BlueZ 6/8] bluetoothd: remove debug support for external plugins
Date: Tue, 16 Jan 2024 14:18:58 +0000	[thread overview]
Message-ID: <20240116-rm-ext-plugins-v1-6-62990fb07369@gmail.com> (raw)
In-Reply-To: <20240116-rm-ext-plugins-v1-0-62990fb07369@gmail.com>

From: Emil Velikov <emil.velikov@collabora.com>

External plugins are gone, drop the associated debug support code.
---
 src/log.c    | 10 +++-------
 src/log.h    |  3 +--
 src/plugin.c |  2 --
 src/plugin.h |  2 --
 4 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/log.c b/src/log.c
index 0155a6bba..db855d2b1 100644
--- a/src/log.c
+++ b/src/log.c
@@ -138,15 +138,11 @@ static gboolean is_enabled(struct btd_debug_desc *desc)
 	return 0;
 }
 
-void __btd_enable_debug(struct btd_debug_desc *start,
-					struct btd_debug_desc *stop)
+void __btd_enable_debug(void)
 {
 	struct btd_debug_desc *desc;
 
-	if (start == NULL || stop == NULL)
-		return;
-
-	for (desc = start; desc < stop; desc++) {
+	for (desc = __start___debug; desc < __stop___debug; desc++) {
 		if (is_enabled(desc))
 			desc->flags |= BTD_DEBUG_FLAG_PRINT;
 	}
@@ -167,7 +163,7 @@ void __btd_log_init(const char *debug, int detach)
 	if (debug != NULL)
 		enabled = g_strsplit_set(debug, ":, ", 0);
 
-	__btd_enable_debug(__start___debug, __stop___debug);
+	__btd_enable_debug();
 
 	bt_log_open();
 
diff --git a/src/log.h b/src/log.h
index 1ed742a0d..303fb36df 100644
--- a/src/log.h
+++ b/src/log.h
@@ -36,8 +36,7 @@ struct btd_debug_desc {
 	unsigned int flags;
 } __attribute__((aligned(8)));
 
-void __btd_enable_debug(struct btd_debug_desc *start,
-					struct btd_debug_desc *stop);
+void __btd_enable_debug(void);
 
 /**
  * DBG:
diff --git a/src/plugin.c b/src/plugin.c
index 1631f201c..e3eb12c0c 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -62,8 +62,6 @@ static void add_plugin(struct bluetooth_plugin_desc *desc)
 	plugin->active = FALSE;
 	plugin->desc = desc;
 
-	__btd_enable_debug(desc->debug_start, desc->debug_stop);
-
 	plugins = g_slist_insert_sorted(plugins, plugin, compare_priority);
 }
 
diff --git a/src/plugin.h b/src/plugin.h
index 7ff55e796..7a2d07b3d 100644
--- a/src/plugin.h
+++ b/src/plugin.h
@@ -17,8 +17,6 @@ struct bluetooth_plugin_desc {
 	int priority;
 	int (*init) (void);
 	void (*exit) (void);
-	void *debug_start;
-	void *debug_stop;
 };
 
 #define BLUETOOTH_PLUGIN_DEFINE(name, version, priority, init, exit) \

-- 
2.43.0


WARNING: multiple messages have this Message-ID (diff)
From: Emil Velikov via B4 Relay <devnull+emil.l.velikov.gmail.com@kernel.org>
To: linux-bluetooth@vger.kernel.org
Cc: Emil Velikov <emil.velikov@collabora.com>
Subject: [PATCH BlueZ 6/8] bluetoothd: remove debug support for external plugins
Date: Tue, 16 Jan 2024 14:18:58 +0000	[thread overview]
Message-ID: <20240116-rm-ext-plugins-v1-6-62990fb07369@gmail.com> (raw)
In-Reply-To: <20240116-rm-ext-plugins-v1-0-62990fb07369@gmail.com>

From: Emil Velikov <emil.velikov@collabora.com>

External plugins are gone, drop the associated debug support code.
---
 src/log.c    | 10 +++-------
 src/log.h    |  3 +--
 src/plugin.c |  2 --
 src/plugin.h |  2 --
 4 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/log.c b/src/log.c
index 0155a6bba..db855d2b1 100644
--- a/src/log.c
+++ b/src/log.c
@@ -138,15 +138,11 @@ static gboolean is_enabled(struct btd_debug_desc *desc)
 	return 0;
 }
 
-void __btd_enable_debug(struct btd_debug_desc *start,
-					struct btd_debug_desc *stop)
+void __btd_enable_debug(void)
 {
 	struct btd_debug_desc *desc;
 
-	if (start == NULL || stop == NULL)
-		return;
-
-	for (desc = start; desc < stop; desc++) {
+	for (desc = __start___debug; desc < __stop___debug; desc++) {
 		if (is_enabled(desc))
 			desc->flags |= BTD_DEBUG_FLAG_PRINT;
 	}
@@ -167,7 +163,7 @@ void __btd_log_init(const char *debug, int detach)
 	if (debug != NULL)
 		enabled = g_strsplit_set(debug, ":, ", 0);
 
-	__btd_enable_debug(__start___debug, __stop___debug);
+	__btd_enable_debug();
 
 	bt_log_open();
 
diff --git a/src/log.h b/src/log.h
index 1ed742a0d..303fb36df 100644
--- a/src/log.h
+++ b/src/log.h
@@ -36,8 +36,7 @@ struct btd_debug_desc {
 	unsigned int flags;
 } __attribute__((aligned(8)));
 
-void __btd_enable_debug(struct btd_debug_desc *start,
-					struct btd_debug_desc *stop);
+void __btd_enable_debug(void);
 
 /**
  * DBG:
diff --git a/src/plugin.c b/src/plugin.c
index 1631f201c..e3eb12c0c 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -62,8 +62,6 @@ static void add_plugin(struct bluetooth_plugin_desc *desc)
 	plugin->active = FALSE;
 	plugin->desc = desc;
 
-	__btd_enable_debug(desc->debug_start, desc->debug_stop);
-
 	plugins = g_slist_insert_sorted(plugins, plugin, compare_priority);
 }
 
diff --git a/src/plugin.h b/src/plugin.h
index 7ff55e796..7a2d07b3d 100644
--- a/src/plugin.h
+++ b/src/plugin.h
@@ -17,8 +17,6 @@ struct bluetooth_plugin_desc {
 	int priority;
 	int (*init) (void);
 	void (*exit) (void);
-	void *debug_start;
-	void *debug_stop;
 };
 
 #define BLUETOOTH_PLUGIN_DEFINE(name, version, priority, init, exit) \

-- 
2.43.0


  parent reply	other threads:[~2024-01-16 14:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16 14:18 [PATCH BlueZ 0/8] Remove support for external plugins Emil Velikov
2024-01-16 14:18 ` Emil Velikov via B4 Relay
2024-01-16 14:18 ` [PATCH BlueZ 1/8] obexd: remove " Emil Velikov
2024-01-16 14:18   ` Emil Velikov via B4 Relay
2024-01-16 16:47   ` Remove " bluez.test.bot
2024-01-16 14:18 ` [PATCH BlueZ 2/8] build: don't export internal obexd API Emil Velikov
2024-01-16 14:18   ` Emil Velikov via B4 Relay
2024-01-16 14:18 ` [PATCH BlueZ 3/8] plugins: remove external-dummy Emil Velikov
2024-01-16 14:18   ` Emil Velikov via B4 Relay
2024-01-16 14:18 ` [PATCH BlueZ 4/8] plugins: convert external sixaxis plugin to builtin Emil Velikov
2024-01-16 14:18   ` Emil Velikov via B4 Relay
2024-01-16 14:18 ` [PATCH BlueZ 5/8] bluetoothd: remove support for external plugins Emil Velikov
2024-01-16 14:18   ` Emil Velikov via B4 Relay
2024-01-16 14:18 ` Emil Velikov [this message]
2024-01-16 14:18   ` [PATCH BlueZ 6/8] bluetoothd: remove debug " Emil Velikov via B4 Relay
2024-01-16 14:18 ` [PATCH BlueZ 7/8] bluetoothd: don't export internal API Emil Velikov
2024-01-16 14:18   ` Emil Velikov via B4 Relay
2024-01-16 14:19 ` [PATCH BlueZ 8/8] android: export only (android) entrypoint from the modules Emil Velikov
2024-01-16 14:19   ` Emil Velikov via B4 Relay
2024-01-22 18:34 ` [PATCH BlueZ 0/8] Remove support for external plugins Luiz Augusto von Dentz
2024-01-23 13:54   ` Emil Velikov
2024-01-23 13:59     ` Luiz Augusto von Dentz
2024-01-23 15:09       ` Emil Velikov

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=20240116-rm-ext-plugins-v1-6-62990fb07369@gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=emil.velikov@collabora.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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 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.