media: imx: fix macro style error
PATCH 1/1 media: imx: fix macro style error
Wrap macro in parenthesis to fix checkpatch error.
Tested it by compiling the driver successfully.
--- drivers/staging/media/imx/imx-media-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/imx/imx-media-utils.c +1 -1
@@ -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.
Signature · 1 line
2.40.0
Quoted 6 lines · Angel Alberto Carretero
Wrap macro in parenthesis to fix checkpatch error.
Tested it by compiling the driver successfully.
Signed-off-by Angel Alberto Carretero <[email protected]>---
Hi Angel,
The code change looks fine. Here are a few patch style suggestions:
- If you do 'git log --oneline imx-media-utils.c' you'll see that changes in utils file only, seem to have utils in the patch subject prefix. "media: imx: utils:"
- Commit message is vague. How about being explicit so anyone persuing those one-liners knows exactly what change was made. "Enclose IMX_BUS_FMTS macro in parentheses"
- The commit log 'why' is to conform to the kernel coding style, not to fix a checkpatch error. It is good to say Issue found by checkpatch, but that itself is not the 'why'.
Alison
Quoted 19 lines
drivers/staging/media/imx/imx-media-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/media/imx/imx-media-utils.c +1
-1@@ -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. Signature · 1 line
2.40.0
PATCH v2 1/1 media: imx: utils: Enclose IMX_BUS_FMTS macro in parenthesis
Conform to kernel coding style by wrapping macro in parenthesis. Issue found by checkpatch.
---
v2: changed commit message and description thanks to Alison suggestion
--- drivers/staging/media/imx/imx-media-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/imx/imx-media-utils.c +1 -1
@@ -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.
Signature · 1 line
2.40.0