Skip to contentSkip to conversation

drivers: firmware: psci: avoid BIT() macro usage in PSCI_1_0_OS_INITIATED

PATCH In review Eugene Syromiatnikov 2 participants 2 messages Mar 24, 2020 Power state coordination interface (psci)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: firmware: psci: avoid BIT() macro usage in PSCI_1_0_OS_INITIATED

The BIT() macro is not available in UAPI headers, so let's replace it with similarly defined _BITUL() macro provided by <linux/const.h>.

Fixes 60dd1ead65e8 ("drivers: firmware: psci: Announce support for OS initiated suspend mode")
---
 include/uapi/linux/psci.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/uapi/linux/psci.h +3 -1
index 2fcad1d..87afdeb 100644
@@ -12,6 +12,8 @@
 #ifndef _UAPI_LINUX_PSCI_H
 #define _UAPI_LINUX_PSCI_H
 
+#include <linux/const.h>
+
 /*
  * PSCI v0.1 interface
  *
@@ -100,7 +102,7 @@
 #define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK	\
 			(0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT)
 
-#define PSCI_1_0_OS_INITIATED			BIT(0)
+#define PSCI_1_0_OS_INITIATED			_BITUL(0)
 #define PSCI_1_0_SUSPEND_MODE_PC		0
 #define PSCI_1_0_SUSPEND_MODE_OSI		1
 
Signature · 1 line
2.1.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Eugene Syromiatnikov

The BIT() macro is not available in UAPI headers, so let's replace it with similarly defined _BITUL() macro provided by <linux/const.h>.

Fixes 60dd1ead65e8 ("drivers: firmware: psci: Announce support for OS initiated suspend mode")

Kind regards
Uffe

Quoted 29 lines
---
 include/uapi/linux/psci.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/uapi/linux/psci.h +3 -2
index 2fcad1d..87afdeb 100644
@@ -12,6 +12,8 @@
 #ifndef _UAPI_LINUX_PSCI_H
 #define _UAPI_LINUX_PSCI_H
 
+#include <linux/const.h>
+
 /*
  * PSCI v0.1 interface
  *
@@ -100,7 +102,7 @@
 #define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK  \
                        (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT)
 
-#define PSCI_1_0_OS_INITIATED                  BIT(0)
+#define PSCI_1_0_OS_INITIATED                  _BITUL(0)
 #define PSCI_1_0_SUSPEND_MODE_PC               0
 #define PSCI_1_0_SUSPEND_MODE_OSI              1
 
--

2.1.4