[PATCH] video: Fix VNBYTES() macro comment

The VNBYTES() macro has been updated to silence possible warnings regarding authorized (but unusual) uses of this macro, but the comment was kept unchanged. A year has passed so let's fix the comment now to avoid confusions.
Fixes: cc05d352fbc ("video: Add parentheses around VNBYTES() macro") Suggested-by: Tom Rini trini@konsulko.com Link: https://lore.kernel.org/u-boot/20240906183432.GG3879073@bill-the-cat/ Signed-off-by: Miquel Raynal miquel.raynal@bootlin.com --- include/video.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/include/video.h b/include/video.h index 4d8df9baaad..59b56014874 100644 --- a/include/video.h +++ b/include/video.h @@ -57,12 +57,8 @@ enum video_log2_bpp { VIDEO_BPP32, };
-/* - * Convert enum video_log2_bpp to bytes and bits. Note we omit the outer - * brackets to allow multiplication by fractional pixels. - */ +/* Convert enum video_log2_bpp to bytes and bits */ #define VNBYTES(bpix) ((1 << (bpix)) / 8) - #define VNBITS(bpix) (1 << (bpix))
enum video_format {

On Tue, 10 Sept 2024 at 03:12, Miquel Raynal miquel.raynal@bootlin.com wrote:
The VNBYTES() macro has been updated to silence possible warnings regarding authorized (but unusual) uses of this macro, but the comment was kept unchanged. A year has passed so let's fix the comment now to avoid confusions.
Fixes: cc05d352fbc ("video: Add parentheses around VNBYTES() macro") Suggested-by: Tom Rini trini@konsulko.com Link: https://lore.kernel.org/u-boot/20240906183432.GG3879073@bill-the-cat/ Signed-off-by: Miquel Raynal miquel.raynal@bootlin.com
include/video.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
diff --git a/include/video.h b/include/video.h index 4d8df9baaad..59b56014874 100644 --- a/include/video.h +++ b/include/video.h @@ -57,12 +57,8 @@ enum video_log2_bpp { VIDEO_BPP32, };
-/*
- Convert enum video_log2_bpp to bytes and bits. Note we omit the outer
- brackets to allow multiplication by fractional pixels.
- */
+/* Convert enum video_log2_bpp to bytes and bits */ #define VNBYTES(bpix) ((1 << (bpix)) / 8)
#define VNBITS(bpix) (1 << (bpix))
enum video_format {
2.43.0

On Tue, 10 Sep 2024 11:11:59 +0200 Miquel Raynal miquel.raynal@bootlin.com wrote:
The VNBYTES() macro has been updated to silence possible warnings regarding authorized (but unusual) uses of this macro, but the comment was kept unchanged. A year has passed so let's fix the comment now to avoid confusions.
Fixes: cc05d352fbc ("video: Add parentheses around VNBYTES() macro") Suggested-by: Tom Rini trini@konsulko.com Link: https://lore.kernel.org/u-boot/20240906183432.GG3879073@bill-the-cat/ Signed-off-by: Miquel Raynal miquel.raynal@bootlin.com
include/video.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
applied to u-boot-video/master, thanks!
-- Anatolij
participants (3)
-
Anatolij Gustschin
-
Miquel Raynal
-
Simon Glass