The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Hans de Goede <hansg@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] media: uvcvideo: Enclose UVC_INFO_* macros in parentheses
Date: Tue, 1 Dec 2026 15:32:28 +0900	[thread overview]
Message-ID: <20261201063228.GE57763@killaraus.ideasonboard.com> (raw)
In-Reply-To: <20261201-uvc-sorted-v3-3-a68b2f3afb08@chromium.org>

On Tue, Dec 01, 2026 at 06:20:45AM +0000, Ricardo Ribalda wrote:
> Wrap the values around UVC_INFO_QUIRK() and UVC_INFO_META() in
> parentheses to fix checkpatch.pl errors:
> 
>   ERROR: Macros with complex values should be enclosed in parentheses

It's one of those cases where I would have ignored checkpatch, as those
macros are used in very specific contexts that should make them safe
without parentheses. If you think parentheses are better, I don't mind.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> No functional change intended.
> 
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
> ---
>  drivers/media/usb/uvc/uvc_driver.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
> index 81373cafad2c..4ca3502df2a2 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -2536,9 +2536,10 @@ static const struct uvc_device_info uvc_quirk_force_y8 = {
>  	.quirks = UVC_QUIRK_FORCE_Y8,
>  };
>  
> -#define UVC_INFO_QUIRK(q) (kernel_ulong_t)&(struct uvc_device_info){.quirks = q}
> -#define UVC_INFO_META(m) (kernel_ulong_t)&(struct uvc_device_info) \
> -	{.meta_format = m}
> +#define UVC_INFO_QUIRK(q) \
> +	((kernel_ulong_t)&(struct uvc_device_info){ .quirks = (q) })
> +#define UVC_INFO_META(m) \
> +	((kernel_ulong_t)&(struct uvc_device_info){ .meta_format = (m) })
>  #define UVC_INFO_VERSION(v) \
>  	((kernel_ulong_t)&(const struct uvc_device_info){ .uvc_version = (v) })
>  

-- 
Regards,

Laurent Pinchart

      reply	other threads:[~2026-12-01  6:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  6:20 [PATCH v3 0/3] media: uvcvideo: Automate quirk sorting Ricardo Ribalda
2026-12-01  6:20 ` [PATCH v3 1/3] media: uvcvideo: Use USB_DEVICE_AND_INTERFACE_INFO macro Ricardo Ribalda
2026-12-01  6:20 ` [PATCH v3 2/3] media: uvcvideo: Sort all the uvc_ids quirks Ricardo Ribalda
2026-12-01  6:20 ` [PATCH v3 3/3] media: uvcvideo: Enclose UVC_INFO_* macros in parentheses Ricardo Ribalda
2026-12-01  6:32   ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261201063228.GE57763@killaraus.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox