public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] video: Fix VNBYTES() macro comment
@ 2024-09-10  9:11 Miquel Raynal
  2024-09-12  0:59 ` Simon Glass
  2024-10-22 20:21 ` Anatolij Gustschin
  0 siblings, 2 replies; 3+ messages in thread
From: Miquel Raynal @ 2024-09-10  9:11 UTC (permalink / raw)
  To: Anatolij Gustschin, Tom Rini
  Cc: Dan Carpenter, u-boot, Thomas Petazzoni, Ian Ray, Miquel Raynal

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 {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] video: Fix VNBYTES() macro comment
  2024-09-10  9:11 [PATCH] video: Fix VNBYTES() macro comment Miquel Raynal
@ 2024-09-12  0:59 ` Simon Glass
  2024-10-22 20:21 ` Anatolij Gustschin
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2024-09-12  0:59 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Anatolij Gustschin, Tom Rini, Dan Carpenter, u-boot,
	Thomas Petazzoni, Ian Ray

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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] video: Fix VNBYTES() macro comment
  2024-09-10  9:11 [PATCH] video: Fix VNBYTES() macro comment Miquel Raynal
  2024-09-12  0:59 ` Simon Glass
@ 2024-10-22 20:21 ` Anatolij Gustschin
  1 sibling, 0 replies; 3+ messages in thread
From: Anatolij Gustschin @ 2024-10-22 20:21 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: Tom Rini, Dan Carpenter, u-boot, Thomas Petazzoni, Ian Ray

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-22 20:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-10  9:11 [PATCH] video: Fix VNBYTES() macro comment Miquel Raynal
2024-09-12  0:59 ` Simon Glass
2024-10-22 20:21 ` Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox