From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Nicolas Dufresne <nicolas@ndufresne.ca>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] uvcvideo: rename UVC_QUIRK_INFO to UVC_INFO_QUIRK
Date: Mon, 20 Aug 2018 14:38:55 +0300 [thread overview]
Message-ID: <2296972.qjimPh87rg@avalon> (raw)
In-Reply-To: <0121adf26dc5df64a3955253795dc2e04610b1b5.camel@ndufresne.ca>
Hi Nicolas,
On Saturday, 4 August 2018 18:58:18 EEST Nicolas Dufresne wrote:
> Le vendredi 03 août 2018 à 13:36 +0200, Guennadi Liakhovetski a écrit :
> > This macro defines "information about quirks," not "quirks for
> > information."
>
> Does not sound better to me. It's "Quirk's information", vs
> "information about quirks". I prefer the first one. In term of C
> namespace the orignal is also better. So the name space is UVC_QUIRK,
> and the detail is INFO.
>
> If we where to apply your logic, you'd rename driver_info, into
> info_driver, because it's information about the driver.
The macro initializes an info structure with the .quirks field. We'll need a
similar macro that will set the .meta_format field, and I proposed naming it
UVC_INFO_META, hence the rename of this macro.
The alternative would be to call the two macros UVC_QUIRK_INFO and
UVC_META_INFO, but I don't think that would be a good idea. All the macros
that initialize an info structure should start with the same UVC_INFO_ prefix.
> > Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com
> >
> > ---
> >
> > drivers/media/usb/uvc/uvc_driver.c | 18 +++++++++---------
> > 1 file changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/media/usb/uvc/uvc_driver.c
> > b/drivers/media/usb/uvc/uvc_driver.c
> > index d46dc43..699984b 100644
> > --- a/drivers/media/usb/uvc/uvc_driver.c
> > +++ b/drivers/media/usb/uvc/uvc_driver.c
> > @@ -2344,7 +2344,7 @@ static int uvc_clock_param_set(const char *val,
> > const struct kernel_param *kp)
> >
> > .quirks = UVC_QUIRK_FORCE_Y8,
> >
> > };
> >
> > -#define UVC_QUIRK_INFO(q) (kernel_ulong_t)&(struct
> > uvc_device_info){.quirks = q}
> > +#define UVC_INFO_QUIRK(q) (kernel_ulong_t)&(struct
> > uvc_device_info){.quirks = q}
> >
> > /*
> >
> > * The Logitech cameras listed below have their interface class set
> >
> > to
> > @@ -2453,7 +2453,7 @@ static int uvc_clock_param_set(const char *val,
> > const struct kernel_param *kp)
> >
> > .bInterfaceClass = USB_CLASS_VIDEO,
> > .bInterfaceSubClass = 1,
> > .bInterfaceProtocol = 0,
> >
> > - .driver_info =
> > UVC_QUIRK_INFO(UVC_QUIRK_RESTORE_CTRLS_ON_INIT) },
> > + .driver_info =
> > UVC_INFO_QUIRK(UVC_QUIRK_RESTORE_CTRLS_ON_INIT) },
> >
> > /* Chicony CNF7129 (Asus EEE 100HE) */
> > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> >
> > | USB_DEVICE_ID_MATCH_INT_INFO,
> >
> > @@ -2462,7 +2462,7 @@ static int uvc_clock_param_set(const char *val,
> > const struct kernel_param *kp)
> >
> > .bInterfaceClass = USB_CLASS_VIDEO,
> > .bInterfaceSubClass = 1,
> > .bInterfaceProtocol = 0,
> >
> > - .driver_info =
> > UVC_QUIRK_INFO(UVC_QUIRK_RESTRICT_FRAME_RATE) },
> > + .driver_info =
> > UVC_INFO_QUIRK(UVC_QUIRK_RESTRICT_FRAME_RATE) },
> >
> > /* Alcor Micro AU3820 (Future Boy PC USB Webcam) */
> > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> >
> > | USB_DEVICE_ID_MATCH_INT_INFO,
> >
> > @@ -2525,7 +2525,7 @@ static int uvc_clock_param_set(const char *val,
> > const struct kernel_param *kp)
> >
> > .bInterfaceClass = USB_CLASS_VIDEO,
> > .bInterfaceSubClass = 1,
> > .bInterfaceProtocol = 0,
> >
> > - .driver_info =
> > UVC_QUIRK_INFO(UVC_QUIRK_PROBE_MINMAX
> > + .driver_info =
> > UVC_INFO_QUIRK(UVC_QUIRK_PROBE_MINMAX
> >
> > | UVC_QUIRK_BUILTIN_ISIGHT) },
> >
> > /* Apple Built-In iSight via iBridge */
> > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> >
> > @@ -2607,7 +2607,7 @@ static int uvc_clock_param_set(const char *val,
> > const struct kernel_param *kp)
> >
> > .bInterfaceClass = USB_CLASS_VIDEO,
> > .bInterfaceSubClass = 1,
> > .bInterfaceProtocol = 0,
> >
> > - .driver_info =
> > UVC_QUIRK_INFO(UVC_QUIRK_PROBE_MINMAX
> > + .driver_info =
> > UVC_INFO_QUIRK(UVC_QUIRK_PROBE_MINMAX
> >
> > | UVC_QUIRK_PROBE_DEF) },
> >
> > /* IMC Networks (Medion Akoya) */
> > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> >
> > @@ -2707,7 +2707,7 @@ static int uvc_clock_param_set(const char *val,
> > const struct kernel_param *kp)
> >
> > .bInterfaceClass = USB_CLASS_VIDEO,
> > .bInterfaceSubClass = 1,
> > .bInterfaceProtocol = 0,
> >
> > - .driver_info =
> > UVC_QUIRK_INFO(UVC_QUIRK_PROBE_MINMAX
> > + .driver_info =
> > UVC_INFO_QUIRK(UVC_QUIRK_PROBE_MINMAX
> >
> > | UVC_QUIRK_PROBE_EXTRAFIELDS)
> >
> > },
> >
> > /* Aveo Technology USB 2.0 Camera (Tasco USB Microscope) */
> > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> >
> > @@ -2725,7 +2725,7 @@ static int uvc_clock_param_set(const char *val,
> > const struct kernel_param *kp)
> >
> > .bInterfaceClass = USB_CLASS_VIDEO,
> > .bInterfaceSubClass = 1,
> > .bInterfaceProtocol = 0,
> >
> > - .driver_info =
> > UVC_QUIRK_INFO(UVC_QUIRK_PROBE_EXTRAFIELDS) },
> > + .driver_info =
> > UVC_INFO_QUIRK(UVC_QUIRK_PROBE_EXTRAFIELDS) },
> >
> > /* Manta MM-353 Plako */
> > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> >
> > | USB_DEVICE_ID_MATCH_INT_INFO,
> >
> > @@ -2771,7 +2771,7 @@ static int uvc_clock_param_set(const char *val,
> > const struct kernel_param *kp)
> >
> > .bInterfaceClass = USB_CLASS_VIDEO,
> > .bInterfaceSubClass = 1,
> > .bInterfaceProtocol = 0,
> >
> > - .driver_info =
> > UVC_QUIRK_INFO(UVC_QUIRK_STATUS_INTERVAL) },
> > + .driver_info =
> > UVC_INFO_QUIRK(UVC_QUIRK_STATUS_INTERVAL) },
> >
> > /* MSI StarCam 370i */
> > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> >
> > | USB_DEVICE_ID_MATCH_INT_INFO,
> >
> > @@ -2798,7 +2798,7 @@ static int uvc_clock_param_set(const char *val,
> > const struct kernel_param *kp)
> >
> > .bInterfaceClass = USB_CLASS_VIDEO,
> > .bInterfaceSubClass = 1,
> > .bInterfaceProtocol = 0,
> >
> > - .driver_info =
> > UVC_QUIRK_INFO(UVC_QUIRK_PROBE_MINMAX
> > + .driver_info =
> > UVC_INFO_QUIRK(UVC_QUIRK_PROBE_MINMAX
> >
> > UVC_QUIRK_IGNORE_SELECTOR_UNIT) },
> >
> > /* Oculus VR Positional Tracker DK2 */
> > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2018-08-20 14:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-03 11:36 [PATCH v2 1/2] uvcvideo: rename UVC_QUIRK_INFO to UVC_INFO_QUIRK Guennadi Liakhovetski
2018-08-04 15:58 ` Nicolas Dufresne
2018-08-20 11:38 ` Laurent Pinchart [this message]
2018-08-20 6:45 ` Guennadi Liakhovetski
2018-08-20 12:42 ` Laurent Pinchart
2018-08-20 12:02 ` Laurent Pinchart
2018-08-20 12:05 ` Laurent Pinchart
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=2296972.qjimPh87rg@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=g.liakhovetski@gmx.de \
--cc=linux-media@vger.kernel.org \
--cc=nicolas@ndufresne.ca \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.