[PATCH v2 2/4] i3c: master: Move generic IBI pool definitions

From: Sam Agazaryan

Date: Sat Dec 05 2026 - 01:56:05 EST


The next patch uses struct i3c_generic_ibi_slot and struct
i3c_generic_ibi_pool in i3c_master_queue_ibi() and
i3c_master_handle_ibi(). Move both definitions above those functions.

No functional change.

Signed-off-by: Sam Agazaryan <samagazaryan@xxxxxxxxxx>
---

Notes:
New in v2, split out of the next patch (Frank).

drivers/i3c/master.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 2bd1bd25c674..17f9e8025e49 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -3660,6 +3660,20 @@ static void i3c_master_unregister_i3c_devs(struct i3c_master_controller *master)
/* Approximate time for IBI handler to run */
#define I3C_WAKEUP_PROCESSING_TIME_MS 100

+struct i3c_generic_ibi_slot {
+ struct list_head node;
+ struct i3c_ibi_slot base;
+};
+
+struct i3c_generic_ibi_pool {
+ spinlock_t lock;
+ unsigned int num_slots;
+ void *payload_buf;
+ struct list_head free_slots;
+ struct list_head pending;
+ struct i3c_generic_ibi_slot slots[] __counted_by(num_slots);
+};
+
/**
* i3c_master_queue_ibi() - Queue an IBI
* @dev: the device this IBI is coming from
@@ -3706,20 +3720,6 @@ static void i3c_master_init_ibi_slot(struct i3c_dev_desc *dev,
INIT_WORK(&slot->work, i3c_master_handle_ibi);
}

-struct i3c_generic_ibi_slot {
- struct list_head node;
- struct i3c_ibi_slot base;
-};
-
-struct i3c_generic_ibi_pool {
- spinlock_t lock;
- unsigned int num_slots;
- void *payload_buf;
- struct list_head free_slots;
- struct list_head pending;
- struct i3c_generic_ibi_slot slots[] __counted_by(num_slots);
-};
-
/**
* i3c_generic_ibi_free_pool() - Free a generic IBI pool
* @pool: the IBI pool to free
--
2.56.1.915.g69d5ec7298-goog