Re: [PATCH] coresight: do not use the BIT() macro in the UAPI header

From: Mathieu Poirier
Date: Tue Mar 24 2020 - 11:31:28 EST


On Mon, 23 Mar 2020 at 22:22, Eugene Syromiatnikov <esyr@xxxxxxxxxx> wrote:
>
> The BIT() macro definition is not available for the UAPI headers
> (moreover, it can be defined differently in the user space); replace
> its usage with the _BITUL() macro that is defined in <linux/const.h>.
>
> Fixes: 237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")
> Signed-off-by: Eugene Syromiatnikov <esyr@xxxxxxxxxx>
> ---
> include/uapi/linux/coresight-stm.h | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/include/uapi/linux/coresight-stm.h b/include/uapi/linux/coresight-stm.h
> index aac550a..8847dbf 100644
> --- a/include/uapi/linux/coresight-stm.h
> +++ b/include/uapi/linux/coresight-stm.h
> @@ -2,8 +2,10 @@
> #ifndef __UAPI_CORESIGHT_STM_H_
> #define __UAPI_CORESIGHT_STM_H_
>
> -#define STM_FLAG_TIMESTAMPED BIT(3)
> -#define STM_FLAG_GUARANTEED BIT(7)
> +#include <linux/const.h>
> +
> +#define STM_FLAG_TIMESTAMPED _BITUL(3)
> +#define STM_FLAG_GUARANTEED _BITUL(7)

Greg, if you want to pick this up right away:

Reviewed-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>

Otherwise let me know and I'll add it to my next tree.

Thanks,
Mathieu

>
> /*
> * The CoreSight STM supports guaranteed and invariant timing
> --
> 2.1.4
>