[PATCH] video: Add parentheses around VNBYTES() macro
Simon Glass
sjg at chromium.org
Thu Jul 27 02:49:42 CEST 2023
On Wed, 26 Jul 2023 at 00:54, Dan Carpenter <dan.carpenter at linaro.org> wrote:
>
> The VNBYTES() macro needs to have parentheses to prevent some (harmless)
> macro expansion bugs. The VNBYTES() macro is used like this:
>
> VID_TO_PIXEL(x) * VNBYTES(vid_priv->bpix)
>
> The * operation is done before the / operation. It still ends up with
> the same results, but it's not ideal.
>
> Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
> ---
> include/video.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I'd argue that doing * before / is better, since it might be more
accurate. But I don't know if it actually matters.
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list