2020-06-26 04:46:10

by B K Karthik

[permalink] [raw]
Subject: [PATCH] fixing ERROR: Macros with complex values must be enclosed within parentheses.

soc_camera.c:

fixing ERROR: Macros with complex values must be enclused within parentheses.

Signed-off-by: B K Karthik <[email protected]>
---
drivers/staging/media/soc_camera/soc_camera.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/media/soc_camera/soc_camera.c b/drivers/staging/media/soc_camera/soc_camera.c
index 39f513f69b89..f609ecf6691c 100644
--- a/drivers/staging/media/soc_camera/soc_camera.c
+++ b/drivers/staging/media/soc_camera/soc_camera.c
@@ -238,8 +238,7 @@ unsigned long soc_camera_apply_board_flags(struct soc_camera_subdev_desc *ssdd,
}
EXPORT_SYMBOL(soc_camera_apply_board_flags);

-#define pixfmtstr(x) (x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, \
- ((x) >> 24) & 0xff
+#define pixfmtstr(x) ((x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, ((x) >> 24) & 0xff)

static int soc_camera_try_fmt(struct soc_camera_device *icd,
struct v4l2_format *f)
--
2.20.1


Attachments:
(No filename) (982.00 B)
signature.asc (673.00 B)
Download all attachments

2020-06-26 04:46:47

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH] fixing ERROR: Macros with complex values must be enclosed within parentheses.

Hi Karthik,

Thank you for the patch.

On Thu, Jun 25, 2020 at 10:17:23PM -0400, B K Karthik wrote:
> soc_camera.c:
>
> fixing ERROR: Macros with complex values must be enclused within parentheses.
>
> Signed-off-by: B K Karthik <[email protected]>
> ---
> drivers/staging/media/soc_camera/soc_camera.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/media/soc_camera/soc_camera.c b/drivers/staging/media/soc_camera/soc_camera.c
> index 39f513f69b89..f609ecf6691c 100644
> --- a/drivers/staging/media/soc_camera/soc_camera.c
> +++ b/drivers/staging/media/soc_camera/soc_camera.c
> @@ -238,8 +238,7 @@ unsigned long soc_camera_apply_board_flags(struct soc_camera_subdev_desc *ssdd,
> }
> EXPORT_SYMBOL(soc_camera_apply_board_flags);
>
> -#define pixfmtstr(x) (x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, \
> - ((x) >> 24) & 0xff
> +#define pixfmtstr(x) ((x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, ((x) >> 24) & 0xff)

This won't work. Try to compile this driver with CONFIG_DYNAMIC_DEBUG
and the compiler will tell you why.

Regardless, drivers/staging/media/soc_camera/soc_camera.c is in staging
because it will be removed from the kernel, cleanups for this file won't
be accepted.

> static int soc_camera_try_fmt(struct soc_camera_device *icd,
> struct v4l2_format *f)

--
Regards,

Laurent Pinchart

2020-06-26 04:54:13

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] fixing ERROR: Macros with complex values must be enclosed within parentheses.

On Thu, Jun 25, 2020 at 10:17:23PM -0400, B K Karthik wrote:
> soc_camera.c:
>
> fixing ERROR: Macros with complex values must be enclused within parentheses.
>
> Signed-off-by: B K Karthik <[email protected]>
> ---
> drivers/staging/media/soc_camera/soc_camera.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- You did not specify a description of why the patch is needed, or
possibly, any description at all, in the email body. Please read the
section entitled "The canonical patch format" in the kernel file,
Documentation/SubmittingPatches for what is needed in order to
properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
and everyone else, to know what this patch is all about. Please read
the section entitled "The canonical patch format" in the kernel file,
Documentation/SubmittingPatches for what a proper Subject: line should
look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot