From: Sam Agazaryan <samagazaryan@google.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
linux-i3c@lists.infradead.org
Cc: Frank Li <Frank.Li@nxp.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Jeremy Kerr <jk@codeconstruct.com.au>,
Joel Stanley <joel@jms.id.au>,
Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>,
Ravindra Yashvant Shinde <ravindra.yashvant.shinde@nxp.com>,
Bart Van Assche <bvanassche@acm.org>,
linux-kernel@vger.kernel.org,
Sam Agazaryan <samagazaryan@google.com>
Subject: [PATCH v2 2/4] i3c: master: Move generic IBI pool definitions
Date: Sat, 5 Dec 2026 06:55:50 +0000 [thread overview]
Message-ID: <20261205065552.2594113-3-samagazaryan@google.com> (raw)
In-Reply-To: <20261205065552.2594113-1-samagazaryan@google.com>
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@google.com>
---
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
next prev parent reply other threads:[~2026-12-05 6:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 6:55 [PATCH v2 0/4] i3c: master: Fix IBI teardown when DAA re-adds a device Sam Agazaryan
2026-12-05 6:55 ` [PATCH v2 1/4] i3c: dw: Fix IBI slot leak on oversized payload Sam Agazaryan
2026-12-05 6:55 ` Sam Agazaryan [this message]
2026-12-05 6:55 ` [PATCH v2 3/4] i3c: master: Drain IBI slot pool before freeing Sam Agazaryan
2026-12-05 6:55 ` [PATCH v2 4/4] i3c: master: Preserve IBI workqueue across DAA Sam Agazaryan
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=20261205065552.2594113-3-samagazaryan@google.com \
--to=samagazaryan@google.com \
--cc=Frank.Li@nxp.com \
--cc=adrian.hunter@intel.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bvanassche@acm.org \
--cc=jk@codeconstruct.com.au \
--cc=joel@jms.id.au \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=ravindra.yashvant.shinde@nxp.com \
--cc=zbigniew.lukwinski@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®