* [PATCH] input: avoid BIT() macro usage in the serio.h UAPI header
@ 2020-03-24 4:13 Eugene Syromiatnikov
2020-03-24 22:54 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Eugene Syromiatnikov @ 2020-03-24 4:13 UTC (permalink / raw)
To: linux-kernel, Benjamin Tissoires
Cc: Dmitry Torokhov, Markus Koch, Dmitry V. Levin
The commit 19ba1eb15a2a ("Input: psmouse - add a custom serio protocol
to send extra information") introduced usage of the BIT() macro
for SERIO_* flags; this macro is not provided in UAPI headers.
Replace if with similarly defined _BITUL() macro defined
in <linux/const.h>.
Cc: <stable@vger.kernel.org> # v5.0+
Fixes: 19ba1eb15a2a ("Input: psmouse - add a custom serio protocol to send extra information")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
---
include/uapi/linux/serio.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/uapi/linux/serio.h b/include/uapi/linux/serio.h
index 50e9919..ed2a96f 100644
--- a/include/uapi/linux/serio.h
+++ b/include/uapi/linux/serio.h
@@ -9,7 +9,7 @@
#ifndef _UAPI_SERIO_H
#define _UAPI_SERIO_H
-
+#include <linux/const.h>
#include <linux/ioctl.h>
#define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
@@ -18,10 +18,10 @@
/*
* bit masks for use in "interrupt" flags (3rd argument)
*/
-#define SERIO_TIMEOUT BIT(0)
-#define SERIO_PARITY BIT(1)
-#define SERIO_FRAME BIT(2)
-#define SERIO_OOB_DATA BIT(3)
+#define SERIO_TIMEOUT _BITUL(0)
+#define SERIO_PARITY _BITUL(1)
+#define SERIO_FRAME _BITUL(2)
+#define SERIO_OOB_DATA _BITUL(3)
/*
* Serio types
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] input: avoid BIT() macro usage in the serio.h UAPI header
2020-03-24 4:13 [PATCH] input: avoid BIT() macro usage in the serio.h UAPI header Eugene Syromiatnikov
@ 2020-03-24 22:54 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2020-03-24 22:54 UTC (permalink / raw)
To: Eugene Syromiatnikov
Cc: linux-kernel, Benjamin Tissoires, Markus Koch, Dmitry V. Levin
On Tue, Mar 24, 2020 at 05:13:41AM +0100, Eugene Syromiatnikov wrote:
> The commit 19ba1eb15a2a ("Input: psmouse - add a custom serio protocol
> to send extra information") introduced usage of the BIT() macro
> for SERIO_* flags; this macro is not provided in UAPI headers.
> Replace if with similarly defined _BITUL() macro defined
> in <linux/const.h>.
>
> Cc: <stable@vger.kernel.org> # v5.0+
> Fixes: 19ba1eb15a2a ("Input: psmouse - add a custom serio protocol to send extra information")
> Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Applied, thank you.
> ---
> include/uapi/linux/serio.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/include/uapi/linux/serio.h b/include/uapi/linux/serio.h
> index 50e9919..ed2a96f 100644
> --- a/include/uapi/linux/serio.h
> +++ b/include/uapi/linux/serio.h
> @@ -9,7 +9,7 @@
> #ifndef _UAPI_SERIO_H
> #define _UAPI_SERIO_H
>
> -
> +#include <linux/const.h>
> #include <linux/ioctl.h>
>
> #define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
> @@ -18,10 +18,10 @@
> /*
> * bit masks for use in "interrupt" flags (3rd argument)
> */
> -#define SERIO_TIMEOUT BIT(0)
> -#define SERIO_PARITY BIT(1)
> -#define SERIO_FRAME BIT(2)
> -#define SERIO_OOB_DATA BIT(3)
> +#define SERIO_TIMEOUT _BITUL(0)
> +#define SERIO_PARITY _BITUL(1)
> +#define SERIO_FRAME _BITUL(2)
> +#define SERIO_OOB_DATA _BITUL(3)
>
> /*
> * Serio types
> --
> 2.1.4
>
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-24 22:54 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:13 [PATCH] input: avoid BIT() macro usage in the serio.h UAPI header Eugene Syromiatnikov
2020-03-24 22:54 ` Dmitry Torokhov
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).