diff mbox series

[1/2] media: uapi: pisp_be_config: Drop BIT() from uAPI

Message ID 20240627143059.300796-2-jacopo.mondi@ideasonboard.com (mailing list archive)
State New
Headers show
Series media: uapi: pisp_be: Two late fixes | expand

Commit Message

Jacopo Mondi June 27, 2024, 2:30 p.m. UTC
The pisp_be_config.h uAPI header file contains a bit-field definition
that uses the BIT() helper macro.

As the BIT() identifier is not defined in userspace, drop it from the
uAPI header.

Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI")
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
 include/uapi/linux/media/raspberrypi/pisp_be_config.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tomi Valkeinen June 27, 2024, 2:46 p.m. UTC | #1
On 27/06/2024 17:30, Jacopo Mondi wrote:
> The pisp_be_config.h uAPI header file contains a bit-field definition
> that uses the BIT() helper macro.
> 
> As the BIT() identifier is not defined in userspace, drop it from the
> uAPI header.
> 
> Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI")
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
>   include/uapi/linux/media/raspberrypi/pisp_be_config.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/uapi/linux/media/raspberrypi/pisp_be_config.h b/include/uapi/linux/media/raspberrypi/pisp_be_config.h
> index 1684ae068d4f..18e313613a50 100644
> --- a/include/uapi/linux/media/raspberrypi/pisp_be_config.h
> +++ b/include/uapi/linux/media/raspberrypi/pisp_be_config.h
> @@ -146,7 +146,7 @@ struct pisp_be_dpc_config {
>    */
>   struct pisp_be_geq_config {
>   	__u16 offset;
> -#define PISP_BE_GEQ_SHARPER BIT(15)
> +#define PISP_BE_GEQ_SHARPER (1 << 15)
>   #define PISP_BE_GEQ_SLOPE ((1 << 10) - 1)
>   	/* top bit is the "sharper" flag, slope value is bottom 10 bits */
>   	__u16 slope_sharper;

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

  Tomi
Sakari Ailus June 27, 2024, 4:55 p.m. UTC | #2
Hi Jacopo,

On Thu, Jun 27, 2024 at 04:30:56PM +0200, Jacopo Mondi wrote:
> The pisp_be_config.h uAPI header file contains a bit-field definition
> that uses the BIT() helper macro.
> 
> As the BIT() identifier is not defined in userspace, drop it from the
> uAPI header.
> 
> Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI")
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
>  include/uapi/linux/media/raspberrypi/pisp_be_config.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/uapi/linux/media/raspberrypi/pisp_be_config.h b/include/uapi/linux/media/raspberrypi/pisp_be_config.h
> index 1684ae068d4f..18e313613a50 100644
> --- a/include/uapi/linux/media/raspberrypi/pisp_be_config.h
> +++ b/include/uapi/linux/media/raspberrypi/pisp_be_config.h
> @@ -146,7 +146,7 @@ struct pisp_be_dpc_config {
>   */
>  struct pisp_be_geq_config {
>  	__u16 offset;
> -#define PISP_BE_GEQ_SHARPER BIT(15)
> +#define PISP_BE_GEQ_SHARPER (1 << 15)

s/1/1U/

It's a good practice even if you're not dealing with the MSB.

>  #define PISP_BE_GEQ_SLOPE ((1 << 10) - 1)
>  	/* top bit is the "sharper" flag, slope value is bottom 10 bits */
>  	__u16 slope_sharper;
diff mbox series

Patch

diff --git a/include/uapi/linux/media/raspberrypi/pisp_be_config.h b/include/uapi/linux/media/raspberrypi/pisp_be_config.h
index 1684ae068d4f..18e313613a50 100644
--- a/include/uapi/linux/media/raspberrypi/pisp_be_config.h
+++ b/include/uapi/linux/media/raspberrypi/pisp_be_config.h
@@ -146,7 +146,7 @@  struct pisp_be_dpc_config {
  */
 struct pisp_be_geq_config {
 	__u16 offset;
-#define PISP_BE_GEQ_SHARPER BIT(15)
+#define PISP_BE_GEQ_SHARPER (1 << 15)
 #define PISP_BE_GEQ_SLOPE ((1 << 10) - 1)
 	/* top bit is the "sharper" flag, slope value is bottom 10 bits */
 	__u16 slope_sharper;