* [PATCH RFC] reset: fix BIT macro reference
@ 2025-11-05 13:35 Encrow Thorne
2025-11-05 14:14 ` Philipp Zabel
2025-11-05 14:28 ` Troy Mitchell
0 siblings, 2 replies; 3+ messages in thread
From: Encrow Thorne @ 2025-11-05 13:35 UTC (permalink / raw)
To: Philipp Zabel, Troy Mitchell; +Cc: linux-kernel, 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.
Signed-off-by: Encrow Thorne <jyc0019@gmail.com>
---
include/linux/reset.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/reset.h b/include/linux/reset.h
index 840d75d172f6..d3102eef085e 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -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,
--
Encrow Thorne <jyc0019@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RFC] reset: fix BIT macro reference
2025-11-05 13:35 [PATCH RFC] reset: fix BIT macro reference Encrow Thorne
@ 2025-11-05 14:14 ` Philipp Zabel
2025-11-05 14:28 ` Troy Mitchell
1 sibling, 0 replies; 3+ messages in thread
From: Philipp Zabel @ 2025-11-05 14:14 UTC (permalink / raw)
To: Encrow Thorne, Troy Mitchell; +Cc: linux-kernel
Hi,
On Mi, 2025-11-05 at 21:35 +0800, Encrow Thorne wrote:
> 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.
> Signed-off-by: Encrow Thorne <jyc0019@gmail.com>
> ---
> include/linux/reset.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index 840d75d172f6..d3102eef085e 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RFC] reset: fix BIT macro reference
2025-11-05 13:35 [PATCH RFC] reset: fix BIT macro reference Encrow Thorne
2025-11-05 14:14 ` Philipp Zabel
@ 2025-11-05 14:28 ` Troy Mitchell
1 sibling, 0 replies; 3+ messages in thread
From: Troy Mitchell @ 2025-11-05 14:28 UTC (permalink / raw)
To: Encrow Thorne, Philipp Zabel, Troy Mitchell; +Cc: linux-kernel
On Wed, Nov 05, 2025 at 09:35:02PM +0800, Encrow Thorne wrote:
> RESET_CONTROL_FLAGS_BIT_* macros use BIT(), but reset.h does not
> include bits.h or bitops.h.
I believe bits.h is enough.
>
> 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.
> This patch is sent as RFC to discuss whether including bits.h in
> reset.h is appropriate.
>
> Signed-off-by: Encrow Thorne <jyc0019@gmail.com>
> ---
> include/linux/reset.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index 840d75d172f6..d3102eef085e 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -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:
Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev>
>
> struct device;
> struct device_node;
>
> ---
> base-commit: 8fec172c82c2b5f6f8e47ab837c1dc91ee3d1b87
> change-id: 20251105-rfc-reset-include-bits-4ec72344d1a3
>
> Best regards,
> --
> Encrow Thorne <jyc0019@gmail.com>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-05 14:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-05 13:35 [PATCH RFC] reset: fix BIT macro reference Encrow Thorne
2025-11-05 14:14 ` Philipp Zabel
2025-11-05 14:28 ` Troy Mitchell
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®