Re: [PATCH] media: imx-pxp: Rewrite coeff expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fr, 2024-06-28 at 15:11 +0000, Ricardo Ribalda wrote:
> GCC5 cannot figure out that the expressions are constant, and that
> triggers a build failure. Rewrite the expressions.
> 
> The following gcc5 error is workaround:
> 
>  #define BM_PXP_CSC1_COEF0_YCBCR_MODE 0x80000000
>                                       ^
>     BM_PXP_CSC1_COEF0_YCBCR_MODE |
>     ^
>  #define BM_PXP_CSC1_COEF0_YCBCR_MODE 0x80000000
>                                       ^
> 
> drivers/media/platform/nxp/imx-pxp.c: In function 'pxp_setup_csc':
> drivers/media/platform/nxp/imx-pxp.h:582:38: error: initializer element is not constant
> drivers/media/platform/nxp/imx-pxp.c:374:4: note: in expansion of macro 'BM_PXP_CSC1_COEF0_YCBCR_MODE'
> drivers/media/platform/nxp/imx-pxp.h:582:38: note: (near initialization for 'csc1_coef_bt601_lim[0]')
> Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>

Can you elaborate on how this is triggered?

At least I couldn't reproduce this by just copy & pasting the
csc1_coef_bt601_lim initializer and the required macros into gcc 5.4 on
godbolt.

Can this be fixed by using GENMASK / FIELD_PREP instead?

regards
Philipp





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux