Skip to content

Constify all the things

Emil Velikov b4-sent linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected] change-id 20240116-const-bc91df591e93

Versions newest first

  1. v1 Latest20 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20src: const annotate the bluetooth plugin APIsrc/genbuiltin src/log.c src/plugin.c +1 more+9 -91 reply
2/20monitor: const annotate util_ltv_debugger instances and APImonitor/att.c+6 -60 replies
3/20monitor: const annotate cmd/handler tablesmonitor/att.c+17 -170 replies
4/20monitor: const annotate misc arraysmonitor/att.c monitor/avctp.c monitor/intel.c +3 more+10 -100 replies
5/20monitor: const annotate intel_version_tlv_desc::type_str and APImonitor/intel.c+13 -130 replies
6/20monitor: const annotate type_table and related APImonitor/sdp.c+3 -30 replies
7/20profiles: annotate immutable data as constprofiles/audio/avctp.c profiles/audio/avrcp.c profiles/audio/media.c +5 more+24 -250 replies
8/20attrib: annotate immutable data as constattrib/gatttool.c attrib/interactive.c+5 -50 replies
9/20client: annotate struct option instances as constclient/mgmt.c+20 -200 replies
10/20emulator: const annotate rfcomm_crc_table[]emulator/bthost.c+1 -10 replies
11/20gobex: const annotate RO arrays, use G_N_ELEMENTSgobex/gobex.c+4 -40 replies
12/20lib: const annotate hci_map instances and related APIclient/mgmt.c lib/hci.c lib/hci_lib.h+24 -240 replies
13/20lib: const annotate tupla instances and APIlib/sdp.c+10 -100 replies
14/20mesh: const annotate misc datamesh/agent.c+2 -20 replies
15/20obexd: remove obex_mime_type_driver::set_io_watchobexd/src/mimetype.c obexd/src/mimetype.h obexd/src/obex.c+12 -180 replies
16/20obexd: const obex_mime_type_driver instances and APIobexd/client/mns.c obexd/plugins/filesystem.c obexd/plugins/irmc.c +7 more+30 -300 replies
17/20obexd: const obex_service_driver instances and APIobexd/client/mns.c obexd/plugins/bluetooth.c obexd/plugins/ftp.c +10 more+25 -250 replies
18/20obexd: const obex_transport_driver instances and APIobexd/plugins/bluetooth.c obexd/src/obex.c obexd/src/server.c +3 more+18 -180 replies
19/20obexd: const annotate misc immutable dataobexd/client/manager.c obexd/client/map.c obexd/client/mns.c +3 more+10 -100 replies
20/20obexd: const annotate obex_plugin_desc entrypointobexd/src/genbuiltin obexd/src/plugin.c obexd/src/plugin.h+8 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH BlueZ 00/20] Constify all the things

Hello list,

Here is series#2 of the paper cut fixes. Here we annotate a handful of the data as constant alongside updating all the respective APIs.

There's nothing particularly existing or controversial here, despite the size of the series. That said, I'm not 100% sure that all code-paths have been (runtime) tested.

As always - any input will be appreciated.

Thanks
Emil

---
Emil Velikov (20):
src: const annotate the bluetooth plugin API
monitor: const annotate util_ltv_debugger instances and API
monitor: const annotate cmd/handler tables
monitor: const annotate misc arrays
monitor: const annotate intel_version_tlv_desc::type_str and API
monitor: const annotate type_table and related API
profiles: annotate immutable data as const
attrib: annotate immutable data as const
client: annotate struct option instances as const
emulator: const annotate rfcomm_crc_table[]
gobex: const annotate RO arrays, use G_N_ELEMENTS
lib: const annotate hci_map instances and related API
lib: const annotate tupla instances and API
mesh: const annotate misc data
obexd: remove obex_mime_type_driver::set_io_watch
obexd: const obex_mime_type_driver instances and API
obexd: const obex_service_driver instances and API
obexd: const obex_transport_driver instances and API
obexd: const annotate misc immutable data
obexd: const annotate obex_plugin_desc entrypoint

 attrib/gatttool.c               |  8 +++---
 attrib/interactive.c            |  2 +-
 client/mgmt.c                   | 42 ++++++++++++++++----------------
 emulator/bthost.c               |  2 +-
 gobex/gobex.c                   |  8 +++---
 lib/hci.c                       | 42 ++++++++++++++++----------------
 lib/hci_lib.h                   |  4 +--
 lib/sdp.c                       | 20 +++++++--------
 mesh/agent.c                    |  4 +--
 monitor/att.c                   | 54 ++++++++++++++++++++---------------------
 monitor/avctp.c                 |  2 +-
 monitor/intel.c                 | 28 ++++++++++-----------
 monitor/l2cap.c                 |  2 +-
 monitor/rfcomm.c                |  2 +-
 monitor/sdp.c                   | 10 ++++----
 obexd/client/manager.c          |  6 ++---
 obexd/client/map.c              |  4 +--
 obexd/client/mns.c              |  8 +++---
 obexd/plugins/bluetooth.c       |  6 ++---
 obexd/plugins/filesystem.c      |  8 +++---
 obexd/plugins/ftp.c             |  2 +-
 obexd/plugins/irmc.c            |  4 +--
 obexd/plugins/mas.c             | 18 +++++++-------
 obexd/plugins/opp.c             |  2 +-
 obexd/plugins/pbap.c            |  8 +++---
 obexd/plugins/pcsuite.c         |  4 +--
 obexd/plugins/phonebook-ebook.c |  2 +-
 obexd/plugins/syncevolution.c   |  4 +--
 obexd/src/genbuiltin            |  4 +--
 obexd/src/main.c                |  2 +-
 obexd/src/mimetype.c            | 26 +++++++-------------
 obexd/src/mimetype.h            | 12 +++++----
 obexd/src/obex-priv.h           |  4 +--
 obexd/src/obex.c                | 18 +++++++-------
 obexd/src/plugin.c              |  8 +++---
 obexd/src/plugin.h              |  4 +--
 obexd/src/server.c              | 10 ++++----
 obexd/src/server.h              |  2 +-
 obexd/src/service.c             | 20 +++++++--------
 obexd/src/service.h             |  6 ++---
 obexd/src/transport.c           | 14 +++++------
 obexd/src/transport.h           |  6 ++---
 profiles/audio/avctp.c          |  2 +-
 profiles/audio/avrcp.c          |  8 +++---
 profiles/audio/media.c          |  6 ++---
 profiles/audio/sink.c           |  2 +-
 profiles/audio/source.c         |  2 +-
 profiles/audio/transport.c      | 12 ++++-----
 profiles/health/hdp_util.c      | 15 ++++++------
 profiles/iap/main.c             |  2 +-
 src/genbuiltin                  |  4 +--
 src/log.c                       |  2 +-
 src/plugin.c                    |  6 ++---
 src/plugin.h                    |  6 ++---
 54 files changed, 251 insertions(+), 258 deletions(-)

---
base-commit: 770ad5614e7e8074133e6f563495ce4822f63fe4
change-id: 20240116-const-bc91df591e93

Best regards,

Signature · 1 line
Emil Velikov <[email protected]>