mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] thermal/thresholds: Fix uapi header macros leading to a compilation error
@ 2024-12-12 20:13 Daniel Lezcano
  2024-12-16 20:31 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Lezcano @ 2024-12-12 20:13 UTC (permalink / raw)
  To: rafael; +Cc: Zhang Rui, Lukasz Luba, open list:THERMAL, open list

The macros giving the direction of the crossing thresholds use the BIT
macro which is not exported to the userspace. Consequently when an
userspace program includes the header, it fails to compile.

Replace the macros by their litteral to allow the compilation of
userspace program using this header.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 include/uapi/linux/thermal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/thermal.h b/include/uapi/linux/thermal.h
index ba8604bdf206..349718c271eb 100644
--- a/include/uapi/linux/thermal.h
+++ b/include/uapi/linux/thermal.h
@@ -3,8 +3,8 @@
 #define _UAPI_LINUX_THERMAL_H
 
 #define THERMAL_NAME_LENGTH	20
-#define THERMAL_THRESHOLD_WAY_UP	BIT(0)
-#define THERMAL_THRESHOLD_WAY_DOWN	BIT(1)
+#define THERMAL_THRESHOLD_WAY_UP	0x1
+#define THERMAL_THRESHOLD_WAY_DOWN	0x2
 
 enum thermal_device_mode {
 	THERMAL_DEVICE_DISABLED = 0,
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] thermal/thresholds: Fix uapi header macros leading to a compilation error
  2024-12-12 20:13 [PATCH] thermal/thresholds: Fix uapi header macros leading to a compilation error Daniel Lezcano
@ 2024-12-16 20:31 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2024-12-16 20:31 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: rafael, Zhang Rui, Lukasz Luba, open list:THERMAL, open list

On Thu, Dec 12, 2024 at 9:13 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> The macros giving the direction of the crossing thresholds use the BIT
> macro which is not exported to the userspace. Consequently when an
> userspace program includes the header, it fails to compile.
>
> Replace the macros by their litteral to allow the compilation of
> userspace program using this header.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  include/uapi/linux/thermal.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/uapi/linux/thermal.h b/include/uapi/linux/thermal.h
> index ba8604bdf206..349718c271eb 100644
> --- a/include/uapi/linux/thermal.h
> +++ b/include/uapi/linux/thermal.h
> @@ -3,8 +3,8 @@
>  #define _UAPI_LINUX_THERMAL_H
>
>  #define THERMAL_NAME_LENGTH    20
> -#define THERMAL_THRESHOLD_WAY_UP       BIT(0)
> -#define THERMAL_THRESHOLD_WAY_DOWN     BIT(1)
> +#define THERMAL_THRESHOLD_WAY_UP       0x1
> +#define THERMAL_THRESHOLD_WAY_DOWN     0x2
>
>  enum thermal_device_mode {
>         THERMAL_DEVICE_DISABLED = 0,
> --

Applied as 6.13-rc material, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-16 20:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-12 20:13 [PATCH] thermal/thresholds: Fix uapi header macros leading to a compilation error Daniel Lezcano
2024-12-16 20:31 ` Rafael J. Wysocki

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®