[PATCH] platform/raspberrypi: vchiq: Remove unused macros
From: Tomasz Unger
Date: Wed Nov 11 2026 - 04:28:24 EST
VCHIQ_SLOT_HANDLER_STACK, VCHIQ_PORT_IS_VALID(), VCHIQ_FOURCC_IS_LEGAL(),
HANDLE_STATE_SHIFT and DEBUGFS_WRITE_BUF_SIZE are defined but have no
users anywhere in the tree. Remove them.
No functional change.
Signed-off-by: Tomasz Unger <tomasz.unger@xxxxxxxx>
---
Compiled the vchiq module for arm64 (defconfig) without warnings.
The generated code is unchanged except for the __LINE__ values stored
by DEBUG_TRACE() in vchiq_core.c, which shift by the six removed lines.
Verified on a Raspberry Pi 4 Model B Rev 1.5: the module loads, connects
to the VideoCore firmware, bcm2835-audio playback works and dmesg shows
no errors.
---
drivers/platform/raspberrypi/vchiq-interface/vchiq_core.c | 6 ------
drivers/platform/raspberrypi/vchiq-interface/vchiq_debugfs.c | 2 --
2 files changed, 8 deletions(-)
diff --git a/drivers/platform/raspberrypi/vchiq-interface/vchiq_core.c b/drivers/platform/raspberrypi/vchiq-interface/vchiq_core.c
index 48d6b1d74329..e9054bfc421a 100644
--- a/drivers/platform/raspberrypi/vchiq-interface/vchiq_core.c
+++ b/drivers/platform/raspberrypi/vchiq-interface/vchiq_core.c
@@ -18,8 +18,6 @@
#include <linux/raspberrypi/vchiq_arm.h>
#include <linux/raspberrypi/vchiq_core.h>
-#define VCHIQ_SLOT_HANDLER_STACK 8192
-
#define VCHIQ_MSG_PADDING 0 /* - */
#define VCHIQ_MSG_CONNECT 1 /* - */
#define VCHIQ_MSG_OPEN 2 /* + (srcport, -), fourcc, client_id */
@@ -40,7 +38,6 @@
#define VCHIQ_PORT_MAX (VCHIQ_MAX_SERVICES - 1)
#define VCHIQ_PORT_FREE 0x1000
-#define VCHIQ_PORT_IS_VALID(port) ((port) < VCHIQ_PORT_FREE)
#define VCHIQ_MAKE_MSG(type, srcport, dstport) \
(((type) << TYPE_SHIFT) | ((srcport) << 12) | ((dstport) << 0))
#define VCHIQ_MSG_TYPE(msgid) ((unsigned int)(msgid) >> TYPE_SHIFT)
@@ -78,7 +75,6 @@ static_assert((unsigned int)VCHIQ_PORT_MAX < (unsigned int)VCHIQ_PORT_FREE);
#define VCHIQ_MSGID_CLAIMED 0x40000000
#define VCHIQ_FOURCC_INVALID 0x00000000
-#define VCHIQ_FOURCC_IS_LEGAL(fourcc) ((fourcc) != VCHIQ_FOURCC_INVALID)
#define VCHIQ_BULK_ACTUAL_ABORTED -1
@@ -93,8 +89,6 @@ static_assert((unsigned int)VCHIQ_PORT_MAX < (unsigned int)VCHIQ_PORT_FREE);
#define VCHIQ_SERVICE_STATS_ADD(service, stat, addend) ((void)0)
#endif
-#define HANDLE_STATE_SHIFT 12
-
#define SLOT_INFO_FROM_INDEX(state, index) (state->slot_info + (index))
#define SLOT_DATA_FROM_INDEX(state, index) (state->slot_data + (index))
#define SLOT_INDEX_FROM_DATA(state, data) \
diff --git a/drivers/platform/raspberrypi/vchiq-interface/vchiq_debugfs.c b/drivers/platform/raspberrypi/vchiq-interface/vchiq_debugfs.c
index c82326a9b6d9..f8eabb302f35 100644
--- a/drivers/platform/raspberrypi/vchiq-interface/vchiq_debugfs.c
+++ b/drivers/platform/raspberrypi/vchiq-interface/vchiq_debugfs.c
@@ -11,8 +11,6 @@
#ifdef CONFIG_DEBUG_FS
-#define DEBUGFS_WRITE_BUF_SIZE 256
-
/* Global 'vchiq' debugfs and clients entry used by all instances */
static struct dentry *vchiq_dbg_dir;
static struct dentry *vchiq_dbg_clients;
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261111-vchiq-unused-macros-16fc16f94dbb
Best regards,
--
Tomasz Unger <tomasz.unger@xxxxxxxx>