linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: firmware: psci: avoid BIT() macro usage in PSCI_1_0_OS_INITIATED
@ 2020-03-24  4:15 Eugene Syromiatnikov
  2020-03-24 18:18 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Eugene Syromiatnikov @ 2020-03-24  4:15 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, Ulf Hansson, Mark Rutland,
	Lorenzo Pieralisi
  Cc: Daniel Lezcano, Rafael J. Wysocki, Dmitry V. Levin

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")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
---
 include/uapi/linux/psci.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/psci.h b/include/uapi/linux/psci.h
index 2fcad1d..87afdeb 100644
--- a/include/uapi/linux/psci.h
+++ b/include/uapi/linux/psci.h
@@ -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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] drivers: firmware: psci: avoid BIT() macro usage in PSCI_1_0_OS_INITIATED
  2020-03-24  4:15 [PATCH] drivers: firmware: psci: avoid BIT() macro usage in PSCI_1_0_OS_INITIATED Eugene Syromiatnikov
@ 2020-03-24 18:18 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2020-03-24 18:18 UTC (permalink / raw)
  To: Eugene Syromiatnikov
  Cc: Mark Rutland, Lorenzo Pieralisi, Rafael J. Wysocki,
	Daniel Lezcano, Linux Kernel Mailing List, Dmitry V. Levin,
	Linux ARM

On Tue, 24 Mar 2020 at 05:15, Eugene Syromiatnikov <esyr@redhat.com> wrote:
>
> 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")
> Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe

> ---
>  include/uapi/linux/psci.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/psci.h b/include/uapi/linux/psci.h
> index 2fcad1d..87afdeb 100644
> --- a/include/uapi/linux/psci.h
> +++ b/include/uapi/linux/psci.h
> @@ -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
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-03-24 18:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-24  4:15 [PATCH] drivers: firmware: psci: avoid BIT() macro usage in PSCI_1_0_OS_INITIATED Eugene Syromiatnikov
2020-03-24 18:18 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).