Skip to contentSkip to conversation

reset: fix BIT macro reference

RFC PATCH Superseded Encrow Thorne 3 participants 3 messages Nov 5, 2025 Reset controller framework

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 reset: fix BIT macro reference

RESET_CONTROL_FLAGS_BIT_* macros use BIT(), but reset.h does not include bits.h or bitops.h. This causes compilation errors when including reset.h standalone.

Include bits.h to make reset.h self-contained.

This patch is sent as RFC to discuss whether including bits.h in reset.h is appropriate.

---
 include/linux/reset.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/reset.h +1 -0
index 840d75d172f6..d3102eef085e 100644
@@ -5,6 +5,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/types.h>
+#include <linux/bits.h>
 
 struct device;
 struct device_node;

---
base-commit: 8fec172c82c2b5f6f8e47ab837c1dc91ee3d1b87
change-id: 20251105-rfc-reset-include-bits-4ec72344d1a3

Best regards,

Signature · 1 line
Encrow Thorne <[email protected]>
maintainer
#1 lore raw

Hi,

Quoted 8 lines · Encrow Thorne

RESET_CONTROL_FLAGS_BIT_* macros use BIT(), but reset.h does not include bits.h or bitops.h. This causes compilation errors when including reset.h standalone.

Include bits.h to make reset.h self-contained.

This patch is sent as RFC to discuss whether including bits.h in reset.h is appropriate.

Yes, this is appropriate, thank you.

Quoted 10 lines
---
 include/linux/reset.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/reset.h +0 -0
index 840d75d172f6..d3102eef085e 100644

include/linux/reset.h line 8

Quoted 4 lines
include/linux/reset.h +1 -0
@@ -5,6 +5,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/types.h>
+#include <linux/bits.h>

Please keep includes sorted alphabetically.

regards
Philipp

Reviewed-by on v1 1/1
#2 lore raw
In reply to Encrow Thorne
Quoted 2 lines · Encrow Thorne

RESET_CONTROL_FLAGS_BIT_* macros use BIT(), but reset.h does not include bits.h or bitops.h.

I believe bits.h is enough.

Quoted 6 lines

This causes compilation errors when
including reset.h standalone.

Include bits.h to make reset.h self-contained.

Please remove below commit message when you send real patch. And I think you can send real patch now.

Quoted 13 lines

This patch is sent as RFC to discuss whether including bits.h in reset.h is appropriate.

---
 include/linux/reset.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/reset.h +0 -0
index 840d75d172f6..d3102eef085e 100644

include/linux/reset.h line 8

Quoted 4 lines
include/linux/reset.h +1 -0
@@ -5,6 +5,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/types.h>
+#include <linux/bits.h>

with keep sort as what Philipp said:

Quoted 12 lines
include/linux/reset.h +0 -1
 struct device;
 struct device_node;
 
---

base-commit: 8fec172c82c2b5f6f8e47ab837c1dc91ee3d1b87
change-id: 20251105-rfc-reset-include-bits-4ec72344d1a3

Best regards,

Signature · 1 line
Encrow Thorne <[email protected]>