[PATCH AUTOSEL 6.16-5.4] i3c: add missing include to internal header
Sasha Levin
sashal at kernel.org
Fri Aug 8 08:31:10 PDT 2025
From: Wolfram Sang <wsa+renesas at sang-engineering.com>
[ Upstream commit 3b661ca549b9e5bb11d0bc97ada6110aac3282d2 ]
LKP found a random config which failed to build because IO accessors
were not defined:
In file included from drivers/i3c/master.c:21:
drivers/i3c/internals.h: In function 'i3c_writel_fifo':
>> drivers/i3c/internals.h:35:9: error: implicit declaration of function 'writesl' [-Werror=implicit-function-declaration]
Add the proper header to where the IO accessors are used.
Reported-by: kernel test robot <lkp at intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507150208.BZDzzJ5E-lkp@intel.com/
Signed-off-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
Reviewed-by: Frank Li <Frank.Li at nxp.com>
Link: https://lore.kernel.org/r/20250717120046.9022-2-wsa+renesas@sang-engineering.com
Signed-off-by: Alexandre Belloni <alexandre.belloni at bootlin.com>
Signed-off-by: Sasha Levin <sashal at kernel.org>
---
LLM Generated explanations, may be completely bogus:
**Backport Status: YES**
This commit should be backported to stable kernel trees for the
following reasons:
1. **Fixes a real build failure**: The commit fixes an actual
compilation error where `writesl` function is used without including
the proper header (`<linux/io.h>`). This is a concrete build
regression that prevents kernel compilation in certain
configurations.
2. **Minimal and safe change**: The fix is extremely simple - it only
adds a single `#include <linux/io.h>` line to the internals.h header
file. This is a one-line change with virtually no risk of introducing
regressions.
3. **Detected by kernel test robot**: The issue was found by the Linux
Kernel Test Robot (LKP), indicating it affects real-world build
configurations that are tested regularly. The error message shows:
```
drivers/i3c/internals.h:35:9: error: implicit declaration of function
'writesl'
```
4. **Affects core I3C infrastructure**: The internals.h header is
included by core I3C files (master.c and device.c), so a build
failure here can prevent the entire I3C subsystem from compiling.
5. **Recent regression**: Looking at the git history, the
`i3c_writel_fifo()` and `i3c_readl_fifo()` functions were recently
added in commit 733b439375b4, and are already being used by I3C
controller drivers (dw-i3c-master.c and cdns-i3c-master.c as shown in
commits 6e055b1fb2fc and c20d3fa70491). This missing include is a
regression that breaks builds after these recent changes.
6. **Clear stable backport criteria**: This meets the stable kernel
rules perfectly:
- It fixes a real bug (build failure)
- It's obviously correct (missing include for used functions)
- It's a minimal change (1 line)
- No new features or architectural changes
- Zero risk of functional regression
The commit is a textbook example of what should be backported to stable
trees - a simple, obvious fix for a build regression with no side
effects.
drivers/i3c/internals.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i3c/internals.h b/drivers/i3c/internals.h
index 433f6088b7ce..ce04aa4f269e 100644
--- a/drivers/i3c/internals.h
+++ b/drivers/i3c/internals.h
@@ -9,6 +9,7 @@
#define I3C_INTERNALS_H
#include <linux/i3c/master.h>
+#include <linux/io.h>
void i3c_bus_normaluse_lock(struct i3c_bus *bus);
void i3c_bus_normaluse_unlock(struct i3c_bus *bus);
--
2.39.5
More information about the linux-i3c
mailing list