From: Emil Velikov <emil.l.velikov@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Emil Velikov <emil.velikov@collabora.com>
Subject: [PATCH BlueZ 08/20] attrib: annotate immutable data as const
Date: Tue, 16 Jan 2024 14:00:33 +0000 [thread overview]
Message-ID: <20240116-const-v1-8-17c87978f40b@gmail.com> (raw)
In-Reply-To: <20240116-const-v1-0-17c87978f40b@gmail.com>
From: Emil Velikov <emil.velikov@collabora.com>
---
attrib/gatttool.c | 8 ++++----
attrib/interactive.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/attrib/gatttool.c b/attrib/gatttool.c
index 2d03875b0..4309d20b1 100644
--- a/attrib/gatttool.c
+++ b/attrib/gatttool.c
@@ -454,7 +454,7 @@ static gboolean parse_uuid(const char *key, const char *value,
return TRUE;
}
-static GOptionEntry primary_char_options[] = {
+static const GOptionEntry primary_char_options[] = {
{ "start", 's' , 0, G_OPTION_ARG_INT, &opt_start,
"Starting handle (optional)", "0x0001" },
{ "end", 'e' , 0, G_OPTION_ARG_INT, &opt_end,
@@ -464,7 +464,7 @@ static GOptionEntry primary_char_options[] = {
{ NULL },
};
-static GOptionEntry char_rw_options[] = {
+static const GOptionEntry char_rw_options[] = {
{ "handle", 'a' , 0, G_OPTION_ARG_INT, &opt_handle,
"Read/Write characteristic by handle (required)", "0x0001" },
{ "value", 'n' , 0, G_OPTION_ARG_STRING, &opt_value,
@@ -473,7 +473,7 @@ static GOptionEntry char_rw_options[] = {
{NULL},
};
-static GOptionEntry gatt_options[] = {
+static const GOptionEntry gatt_options[] = {
{ "primary", 0, 0, G_OPTION_ARG_NONE, &opt_primary,
"Primary Service Discovery", NULL },
{ "characteristics", 0, 0, G_OPTION_ARG_NONE, &opt_characteristics,
@@ -494,7 +494,7 @@ static GOptionEntry gatt_options[] = {
{ NULL },
};
-static GOptionEntry options[] = {
+static const GOptionEntry options[] = {
{ "adapter", 'i', 0, G_OPTION_ARG_STRING, &opt_src,
"Specify local adapter interface", "hciX" },
{ "device", 'b', 0, G_OPTION_ARG_STRING, &opt_dst,
diff --git a/attrib/interactive.c b/attrib/interactive.c
index 171b95738..c0262e87c 100644
--- a/attrib/interactive.c
+++ b/attrib/interactive.c
@@ -760,7 +760,7 @@ static void cmd_mtu(int argcp, char **argvp)
gatt_exchange_mtu(attrib, opt_mtu, exchange_mtu_cb, NULL);
}
-static struct {
+static const struct {
const char *cmd;
void (*func)(int argcp, char **argvp);
const char *params;
--
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 08/20] attrib: annotate immutable data as const
Date: Tue, 16 Jan 2024 14:00:33 +0000 [thread overview]
Message-ID: <20240116-const-v1-8-17c87978f40b@gmail.com> (raw)
In-Reply-To: <20240116-const-v1-0-17c87978f40b@gmail.com>
From: Emil Velikov <emil.velikov@collabora.com>
---
attrib/gatttool.c | 8 ++++----
attrib/interactive.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/attrib/gatttool.c b/attrib/gatttool.c
index 2d03875b0..4309d20b1 100644
--- a/attrib/gatttool.c
+++ b/attrib/gatttool.c
@@ -454,7 +454,7 @@ static gboolean parse_uuid(const char *key, const char *value,
return TRUE;
}
-static GOptionEntry primary_char_options[] = {
+static const GOptionEntry primary_char_options[] = {
{ "start", 's' , 0, G_OPTION_ARG_INT, &opt_start,
"Starting handle (optional)", "0x0001" },
{ "end", 'e' , 0, G_OPTION_ARG_INT, &opt_end,
@@ -464,7 +464,7 @@ static GOptionEntry primary_char_options[] = {
{ NULL },
};
-static GOptionEntry char_rw_options[] = {
+static const GOptionEntry char_rw_options[] = {
{ "handle", 'a' , 0, G_OPTION_ARG_INT, &opt_handle,
"Read/Write characteristic by handle (required)", "0x0001" },
{ "value", 'n' , 0, G_OPTION_ARG_STRING, &opt_value,
@@ -473,7 +473,7 @@ static GOptionEntry char_rw_options[] = {
{NULL},
};
-static GOptionEntry gatt_options[] = {
+static const GOptionEntry gatt_options[] = {
{ "primary", 0, 0, G_OPTION_ARG_NONE, &opt_primary,
"Primary Service Discovery", NULL },
{ "characteristics", 0, 0, G_OPTION_ARG_NONE, &opt_characteristics,
@@ -494,7 +494,7 @@ static GOptionEntry gatt_options[] = {
{ NULL },
};
-static GOptionEntry options[] = {
+static const GOptionEntry options[] = {
{ "adapter", 'i', 0, G_OPTION_ARG_STRING, &opt_src,
"Specify local adapter interface", "hciX" },
{ "device", 'b', 0, G_OPTION_ARG_STRING, &opt_dst,
diff --git a/attrib/interactive.c b/attrib/interactive.c
index 171b95738..c0262e87c 100644
--- a/attrib/interactive.c
+++ b/attrib/interactive.c
@@ -760,7 +760,7 @@ static void cmd_mtu(int argcp, char **argvp)
gatt_exchange_mtu(attrib, opt_mtu, exchange_mtu_cb, NULL);
}
-static struct {
+static const struct {
const char *cmd;
void (*func)(int argcp, char **argvp);
const char *params;
--
2.43.0
next prev parent reply other threads:[~2024-01-16 14:00 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 14:00 [PATCH BlueZ 00/20] Constify all the things Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 01/20] src: const annotate the bluetooth plugin API Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 18:37 ` Constify all the things bluez.test.bot
2024-01-16 14:00 ` [PATCH BlueZ 02/20] monitor: const annotate util_ltv_debugger instances and API Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 03/20] monitor: const annotate cmd/handler tables Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 04/20] monitor: const annotate misc arrays Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 05/20] monitor: const annotate intel_version_tlv_desc::type_str and API Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 06/20] monitor: const annotate type_table and related API Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 07/20] profiles: annotate immutable data as const Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` Emil Velikov [this message]
2024-01-16 14:00 ` [PATCH BlueZ 08/20] attrib: " Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 09/20] client: annotate struct option instances " Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 10/20] emulator: const annotate rfcomm_crc_table[] Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 11/20] gobex: const annotate RO arrays, use G_N_ELEMENTS Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 12/20] lib: const annotate hci_map instances and related API Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 13/20] lib: const annotate tupla instances and API Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 14/20] mesh: const annotate misc data Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 15/20] obexd: remove obex_mime_type_driver::set_io_watch Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 16/20] obexd: const obex_mime_type_driver instances and API Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 17/20] obexd: const obex_service_driver " Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 18/20] obexd: const obex_transport_driver " Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 19/20] obexd: const annotate misc immutable data Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-16 14:00 ` [PATCH BlueZ 20/20] obexd: const annotate obex_plugin_desc entrypoint Emil Velikov
2024-01-16 14:00 ` Emil Velikov via B4 Relay
2024-01-22 23:53 ` [PATCH BlueZ 00/20] Constify all the things patchwork-bot+bluetooth
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-const-v1-8-17c87978f40b@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.