Message ID | 20220804071046.31520-1-shichen01@baidu.com |
---|---|
State | New |
Headers | show |
Series | media: staging: media: imx: imx7-media-utils: Fix a coding style problem | expand |
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
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.
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(-)