public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: staging: media: imx: imx7-media-utils: Fix a coding style problem
@ 2022-08-04  7:10 Chen Shi
  2022-08-04  8:23 ` Greg KH
  2022-08-04  8:46 ` Dan Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Chen Shi @ 2022-08-04  7:10 UTC (permalink / raw)
  To: slongerbeam, p.zabel; +Cc: linux-media, linux-staging, Chen Shi

Add parentheses to enclose macros with complex values.

Signed-off-by: Chen Shi <shichen01@baidu.com>
---
 drivers/staging/media/imx/imx-media-utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c
index 294c808b2ebe..c94013175181 100644
--- a/drivers/staging/media/imx/imx-media-utils.c
+++ b/drivers/staging/media/imx/imx-media-utils.c
@@ -7,7 +7,7 @@
 #include <linux/module.h>
 #include "imx-media.h"
 
-#define IMX_BUS_FMTS(fmt...) (const u32[]) {fmt, 0}
+#define IMX_BUS_FMTS(fmt...) {(const u32[]) {fmt, 0}}
 
 /*
  * List of supported pixel formats for the subdevs.
-- 
2.17.1


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

* Re: [PATCH] media: staging: media: imx: imx7-media-utils: Fix a coding style problem
  2022-08-04  7:10 [PATCH] media: staging: media: imx: imx7-media-utils: Fix a coding style problem Chen Shi
@ 2022-08-04  8:23 ` Greg KH
  2022-08-04  8:46 ` Dan Carpenter
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2022-08-04  8:23 UTC (permalink / raw)
  To: Chen Shi; +Cc: slongerbeam, p.zabel, linux-media, linux-staging

On Thu, Aug 04, 2022 at 03:10:46PM +0800, Chen Shi wrote:
> Add parentheses to enclose macros with complex values.

Why?

> 
> Signed-off-by: Chen Shi <shichen01@baidu.com>
> ---
>  drivers/staging/media/imx/imx-media-utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c
> index 294c808b2ebe..c94013175181 100644
> --- a/drivers/staging/media/imx/imx-media-utils.c
> +++ b/drivers/staging/media/imx/imx-media-utils.c
> @@ -7,7 +7,7 @@
>  #include <linux/module.h>
>  #include "imx-media.h"
>  
> -#define IMX_BUS_FMTS(fmt...) (const u32[]) {fmt, 0}
> +#define IMX_BUS_FMTS(fmt...) {(const u32[]) {fmt, 0}}

What does this change?  Why make this change at all?

confused,

greg k-h

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

* Re: [PATCH] media: staging: media: imx: imx7-media-utils: Fix a coding style problem
  2022-08-04  7:10 [PATCH] media: staging: media: imx: imx7-media-utils: Fix a coding style problem Chen Shi
  2022-08-04  8:23 ` Greg KH
@ 2022-08-04  8:46 ` Dan Carpenter
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-08-04  8:46 UTC (permalink / raw)
  To: Chen Shi; +Cc: slongerbeam, p.zabel, linux-media, linux-staging

On Thu, Aug 04, 2022 at 03:10:46PM +0800, Chen Shi wrote:
> Add parentheses to enclose macros with complex values.
> 
> Signed-off-by: Chen Shi <shichen01@baidu.com>

Always try to compile the code after you make a change.

regards,
dan carpenter


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

end of thread, other threads:[~2022-08-04  8:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-04  7:10 [PATCH] media: staging: media: imx: imx7-media-utils: Fix a coding style problem Chen Shi
2022-08-04  8:23 ` Greg KH
2022-08-04  8:46 ` Dan Carpenter

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