From: Encrow Thorne jyc0019@gmail.com
[ Upstream commit f3d8b64ee46c9b4b0b82b1a4642027728bac95b8 ]
RESET_CONTROL_FLAGS_BIT_* macros use BIT(), but reset.h does not include bits.h. This causes compilation errors when including reset.h standalone.
Include bits.h to make reset.h self-contained.
Suggested-by: Troy Mitchell troy.mitchell@linux.dev Reviewed-by: Troy Mitchell troy.mitchell@linux.dev Reviewed-by: Philipp Zabel p.zabel@pengutronix.de Signed-off-by: Encrow Thorne jyc0019@gmail.com Signed-off-by: Philipp Zabel p.zabel@pengutronix.de Signed-off-by: Sasha Levin sashal@kernel.org ---
LLM Generated explanations, may be completely bogus:
## Summary of Findings
### Bug Introduction The bug was introduced by commit `dad35f7d2fc14` ("reset: replace boolean parameters with flags parameter") which added the `RESET_CONTROL_FLAGS_BIT_*` macros using `BIT()`. This was merged in **v6.13-rc1** (October 2024).
### Affected Stable Trees - **6.13.x stable**: YES - affected, needs this fix - **6.12.x and earlier**: NO - the `RESET_CONTROL_FLAGS_BIT_*` macros don't exist in these trees
### Stable Kernel Criteria Assessment
| Criterion | Assessment | |-----------|------------| | Obviously correct? | ✅ YES - adding a missing include is trivially correct | | Fixes real bug? | ✅ YES - compilation error when including reset.h standalone | | Important issue? | ✅ YES - build failures are hard blockers | | Small and contained? | ✅ YES - 1 line change | | No new features? | ✅ YES - only fixes missing dependency | | Low risk? | ✅ YES - zero runtime risk, cannot cause regressions |
### Why This Should Be Backported
1. **Build Fix Exception**: Build fixes are explicitly allowed in stable per `Documentation/process/stable-kernel-rules.rst` - this is an "include file fix" that makes the header self-contained.
2. **Zero Risk**: Adding a required include cannot cause runtime regressions. The `bits.h` header is universally available.
3. **Real Bug**: The compilation error is real - the header uses `BIT()` macro without including its definition.
4. **Reviewed by Maintainer**: Philipp Zabel (reset subsystem maintainer) reviewed and signed off, providing confidence in the fix.
5. **Minimal Change**: Single line addition - the smallest possible fix.
### Concerns
- No explicit `Cc: stable@vger.kernel.org` or `Fixes:` tag from maintainer, but this appears to be an oversight given the clear build- fix nature - Only applicable to 6.13.x stable (older trees don't have the affected code)
### Conclusion
This is a textbook example of a stable-appropriate build fix: minimal, zero-risk, fixes a real compilation error, and makes the header properly self-contained. The fix should be backported to the 6.13.x stable tree where the bug exists.
**YES**
include/linux/reset.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/linux/reset.h b/include/linux/reset.h index 840d75d172f62..44f9e3415f92c 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -2,6 +2,7 @@ #ifndef _LINUX_RESET_H_ #define _LINUX_RESET_H_
+#include <linux/bits.h> #include <linux/err.h> #include <linux/errno.h> #include <linux/types.h>