Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp465519rdb; Tue, 16 Jan 2024 06:06:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQkcYjfSCdIqN5zvpmOs6We/3rU3FxQ71qtEsQ9qv6hTmIF+h8AgooRcDR+Sg2KRZCKEZL X-Received: by 2002:a17:906:ac2:b0:a2c:6d6b:5061 with SMTP id z2-20020a1709060ac200b00a2c6d6b5061mr1828048ejf.97.1705413972048; Tue, 16 Jan 2024 06:06:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705413972; cv=none; d=google.com; s=arc-20160816; b=QLL8Drn4s+VNbsEYl5uXRiayIMiABD47u5IelC5J5XWJIEU0uwgkC7Wwrx1PQj2Qxx 1fCo/qScGqmHAgBOlEMVlR/NxABEPoLSRrNx5rulPev2tIxWqUmv5E8vka1yk5U8CJKc KnedFiyGWo+ypnO/PAMv59qfejwz6Zeru16PwnWFYlcdc5jfNpasdknMFO9hptQdwGPn cZ+6LoxqfI5dzodY8KX2iPQpTR7HLwdB04bc3nzYRxM17/j0DHmnW+Kc8W/GH9i09KDI KC/PNmwQpuaz0slqbURJXyAEFZtS1dSb13ZQ2n4LcZLCEm94KcWMDbGYCoRSC9Hy/e8x lBGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:from:dkim-signature; bh=kPo5oI5ET8nk8NJtBvRp3sbUMb3U2pMJ+ltHgUJBFpE=; fh=wm3knQjNzlzhSYO3l6/R1dJNTO7aXLaAzT309a/t7Bw=; b=SpzcBsxowDMaX6N4PGwDMvnZ7PEwysoxpZNT9MgvoA8azUNxer4Ayc7m6jYcAwqnJx 00VbF2VzLX0L6TltJmPrX4yupQLiQrYHbCrpG8hrWzYABUBdqM7Ujhaw+Ou1k09Et6hl 5eQ6iDn51zE5iwCX2Cure+a6Dd8RR7dEOGUGO56yqo9j2lezGiOeIVWsEgsH5FgKk1+w 4KTeTNozku3Dhoi0zu+jdiGrQijjDeyIz4i7RP/KFArRP+L0bC5hHTAuwAvnbxaMEKL3 WhIisiYF3MQpmSEt8HoJ5Kdh9/NzDgpK+xt/01F0AOwTD0sLah74KOM2bpPds7MFdjcE NNcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i70SKndx; spf=pass (google.com: domain of linux-bluetooth+bounces-1099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1099-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j3-20020a1709062a0300b00a2d54f1b85esi2572473eje.52.2024.01.16.06.06.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 06:06:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i70SKndx; spf=pass (google.com: domain of linux-bluetooth+bounces-1099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1099-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 749E21F24B60 for ; Tue, 16 Jan 2024 14:00:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57D4F1BF27; Tue, 16 Jan 2024 14:00:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i70SKndx" X-Original-To: linux-bluetooth@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBAC41BF23 for ; Tue, 16 Jan 2024 14:00:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 5B724C433F1; Tue, 16 Jan 2024 14:00:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705413639; bh=kh1sBC15ggrzL6V70nVyIyM9BK7L/wflKntRRL2THNU=; h=From:Subject:Date:To:Cc:Reply-To:From; b=i70SKndxA8HWSC7kFe7RmbpnN7gDlVfJmyyN9By1vwBzLLZer57MDFLpKH2MRLQIh wNQZBq7JKXev0aVBNhVjKEdhI75Rf816INwS62cE9oLGDjJRUPIHtTOaZbin3y9l20 3Ve/JEgquAvKEwHSjUdlm3/hpSr76bTa1RPhWOBPFsz7T+cRtinmf5NxVEpMe6Zx6y 6/749SJNAjCNcX5ShF8beG5PcewPhV30uiY/c3zid5zwoykiFqQ8hpsnV5Of0PQdiU WRNBOmGwXuGA4mcTknZXpaZKxa1sX0GB4Se9056waHrRL3u1Y/gD1III9AhQ5/9++x uanPGXWXJVIkw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 430B9C47DA2; Tue, 16 Jan 2024 14:00:39 +0000 (UTC) From: Emil Velikov via B4 Relay Subject: [PATCH BlueZ 00/20] Constify all the things Date: Tue, 16 Jan 2024 14:00:25 +0000 Message-Id: <20240116-const-v1-0-17c87978f40b@gmail.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAPmLpmUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDQ0Mz3eT8vOIS3aRkS8OUNFNLw1RLYyWg2oKi1LTMCrA50bG1tQClxl0 wVwAAAA== To: linux-bluetooth@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705413636; l=4292; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=kh1sBC15ggrzL6V70nVyIyM9BK7L/wflKntRRL2THNU=; b=MJhi6vOwX9bJyjH8ZmF0hzGRfofaGOHw4hdM8Zf/bMbdVfpztu8Mq5yI3Utws/NP5J4c7IHQ4 uzzI+xIUTOZDItTxn0TpxA4cKx2b/epuNC0BuXGPbtgBt2zwOGwCwKT X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: 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, -- Emil Velikov