* [PATCH 1/1] i3c: Add stub functions when I3C support is disabled
@ 2025-12-30 14:57 Frank Li
2026-01-14 15:02 ` Alexandre Belloni
0 siblings, 1 reply; 5+ messages in thread
From: Frank Li @ 2025-12-30 14:57 UTC (permalink / raw)
To: jonathan.cameron
Cc: Frank.Li, alexandre.belloni, andriy.shevchenko, carlos.song,
fluturel.adrian, linux-i3c, linux-iio, lkp, oe-kbuild-all
When I3C is disabled, unused functions are removed by the linker because
the driver relies on regmap and no I3C devices are registered, so normal
I3C paths are never called.
However, some drivers may still call low-level I3C transfer helpers.
Provide stub implementations to avoid adding conditional ifdefs everywhere.
Add stubs for i3c_device_do_xfers() and
i3c_device_get_supported_xfer_mode() only. Other stubs will be introduced
when they are actually needed.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512230418.nu3V6Yua-lkp@intel.com/
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
include/linux/i3c/device.h | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/include/linux/i3c/device.h b/include/linux/i3c/device.h
index 9fcb6410a584f..1dcce2876029e 100644
--- a/include/linux/i3c/device.h
+++ b/include/linux/i3c/device.h
@@ -308,8 +308,23 @@ static __always_inline void i3c_i2c_driver_unregister(struct i3c_driver *i3cdrv,
i3c_i2c_driver_unregister, \
__i2cdrv)
+#if IS_ENABLED(CONFIG_I3C)
int i3c_device_do_xfers(struct i3c_device *dev, struct i3c_xfer *xfers,
int nxfers, enum i3c_xfer_mode mode);
+u32 i3c_device_get_supported_xfer_mode(struct i3c_device *dev);
+#else
+static inline int
+i3c_device_do_xfers(struct i3c_device *dev, struct i3c_xfer *xfers,
+ int nxfers, enum i3c_xfer_mode mode)
+{
+ return -EOPNOTSUPP;
+}
+
+static inline u32 i3c_device_get_supported_xfer_mode(struct i3c_device *dev)
+{
+ return 0;
+}
+#endif
static inline int i3c_device_do_priv_xfers(struct i3c_device *dev,
struct i3c_xfer *xfers,
@@ -358,6 +373,5 @@ int i3c_device_request_ibi(struct i3c_device *dev,
void i3c_device_free_ibi(struct i3c_device *dev);
int i3c_device_enable_ibi(struct i3c_device *dev);
int i3c_device_disable_ibi(struct i3c_device *dev);
-u32 i3c_device_get_supported_xfer_mode(struct i3c_device *dev);
#endif /* I3C_DEV_H */
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] i3c: Add stub functions when I3C support is disabled
2025-12-30 14:57 [PATCH 1/1] i3c: Add stub functions when I3C support is disabled Frank Li
@ 2026-01-14 15:02 ` Alexandre Belloni
2026-01-15 17:12 ` Jonathan Cameron
0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Belloni @ 2026-01-14 15:02 UTC (permalink / raw)
To: jonathan.cameron, Frank Li
Cc: andriy.shevchenko, carlos.song, fluturel.adrian, linux-i3c,
linux-iio, lkp, oe-kbuild-all
On Tue, 30 Dec 2025 09:57:18 -0500, Frank Li wrote:
> When I3C is disabled, unused functions are removed by the linker because
> the driver relies on regmap and no I3C devices are registered, so normal
> I3C paths are never called.
>
> However, some drivers may still call low-level I3C transfer helpers.
> Provide stub implementations to avoid adding conditional ifdefs everywhere.
>
> [...]
Applied, thanks!
[1/1] i3c: Add stub functions when I3C support is disabled
https://git.kernel.org/i3c/c/8564f88df202
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] i3c: Add stub functions when I3C support is disabled
2026-01-14 15:02 ` Alexandre Belloni
@ 2026-01-15 17:12 ` Jonathan Cameron
2026-01-20 23:02 ` Alexandre Belloni
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2026-01-15 17:12 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Frank Li, andriy.shevchenko, carlos.song, fluturel.adrian,
linux-i3c, linux-iio, lkp, oe-kbuild-all
On Wed, 14 Jan 2026 16:02:06 +0100
Alexandre Belloni <alexandre.belloni@bootlin.com> wrote:
> On Tue, 30 Dec 2025 09:57:18 -0500, Frank Li wrote:
> > When I3C is disabled, unused functions are removed by the linker because
> > the driver relies on regmap and no I3C devices are registered, so normal
> > I3C paths are never called.
> >
> > However, some drivers may still call low-level I3C transfer helpers.
> > Provide stub implementations to avoid adding conditional ifdefs everywhere.
> >
> > [...]
>
> Applied, thanks!
>
> [1/1] i3c: Add stub functions when I3C support is disabled
> https://git.kernel.org/i3c/c/8564f88df202
>
> Best regards,
>
Hi Alexandre,
This is going to make for an 'interesting' merge window as I'm getting
build failures without that patch. I don't suppose you'd mind
doing an immutable branch?
If not, maybe best bet is some local ifdefs that we back out
next merge window. I don't really want to kick the driver back
a cycle just for this.
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] i3c: Add stub functions when I3C support is disabled
2026-01-15 17:12 ` Jonathan Cameron
@ 2026-01-20 23:02 ` Alexandre Belloni
2026-01-21 20:00 ` Jonathan Cameron
0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Belloni @ 2026-01-20 23:02 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Frank Li, andriy.shevchenko, carlos.song, fluturel.adrian,
linux-i3c, linux-iio, lkp, oe-kbuild-all
Hello,
On 15/01/2026 17:12:20+0000, Jonathan Cameron wrote:
> On Wed, 14 Jan 2026 16:02:06 +0100
> Alexandre Belloni <alexandre.belloni@bootlin.com> wrote:
>
> > On Tue, 30 Dec 2025 09:57:18 -0500, Frank Li wrote:
> > > When I3C is disabled, unused functions are removed by the linker because
> > > the driver relies on regmap and no I3C devices are registered, so normal
> > > I3C paths are never called.
> > >
> > > However, some drivers may still call low-level I3C transfer helpers.
> > > Provide stub implementations to avoid adding conditional ifdefs everywhere.
> > >
> > > [...]
> >
> > Applied, thanks!
> >
> > [1/1] i3c: Add stub functions when I3C support is disabled
> > https://git.kernel.org/i3c/c/8564f88df202
> >
> > Best regards,
> >
>
> Hi Alexandre,
>
> This is going to make for an 'interesting' merge window as I'm getting
> build failures without that patch. I don't suppose you'd mind
> doing an immutable branch?
>
I just sent it, let me know if this works for you.
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] i3c: Add stub functions when I3C support is disabled
2026-01-20 23:02 ` Alexandre Belloni
@ 2026-01-21 20:00 ` Jonathan Cameron
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2026-01-21 20:00 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Jonathan Cameron, Frank Li, andriy.shevchenko, carlos.song,
fluturel.adrian, linux-i3c, linux-iio, lkp, oe-kbuild-all
On Wed, 21 Jan 2026 00:02:18 +0100
Alexandre Belloni <alexandre.belloni@bootlin.com> wrote:
> Hello,
>
> On 15/01/2026 17:12:20+0000, Jonathan Cameron wrote:
> > On Wed, 14 Jan 2026 16:02:06 +0100
> > Alexandre Belloni <alexandre.belloni@bootlin.com> wrote:
> >
> > > On Tue, 30 Dec 2025 09:57:18 -0500, Frank Li wrote:
> > > > When I3C is disabled, unused functions are removed by the linker because
> > > > the driver relies on regmap and no I3C devices are registered, so normal
> > > > I3C paths are never called.
> > > >
> > > > However, some drivers may still call low-level I3C transfer helpers.
> > > > Provide stub implementations to avoid adding conditional ifdefs everywhere.
> > > >
> > > > [...]
> > >
> > > Applied, thanks!
> > >
> > > [1/1] i3c: Add stub functions when I3C support is disabled
> > > https://git.kernel.org/i3c/c/8564f88df202
> > >
> > > Best regards,
> > >
> >
> > Hi Alexandre,
> >
> > This is going to make for an 'interesting' merge window as I'm getting
> > build failures without that patch. I don't suppose you'd mind
> > doing an immutable branch?
> >
>
> I just sent it, let me know if this works for you.
>
Thanks. I've dropped the temp fix and merged that ib.
Looks good.
Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-21 20:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-30 14:57 [PATCH 1/1] i3c: Add stub functions when I3C support is disabled Frank Li
2026-01-14 15:02 ` Alexandre Belloni
2026-01-15 17:12 ` Jonathan Cameron
2026-01-20 23:02 ` Alexandre Belloni
2026-01-21 20:00 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox