Skip to contentSkip to conversation

MEDIA: USB: UVC: Corrected Errors in Macro Definitions

PATCH In review aditya-chari25 2 participants 2 messages Jul 13, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MEDIA: USB: UVC: Corrected Errors in Macro Definitions

macro definitions had errors since they weren't enclosed in parenthesis hence I rectified those errors

---
 drivers/media/usb/uvc/uvc_driver.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/usb/uvc/uvc_driver.c +3 -3
index 8fe24c98087e..6e14b9dc3886 100644
@@ -2424,9 +2424,9 @@ 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}}
 
 /*
  * The Logitech cameras listed below have their interface class set to
Signature · 1 line
2.34.1
#1 lore raw

Le 13/07/2024 à 13:08, aditya-chari25 a écrit :

Quoted 2 lines

macro definitions had errors since they weren't enclosed in parenthesis hence I rectified those errors

Hi,

The driver does *not* compile anymore with this patch.

Can you elaborate on what you are trying to fix and if your chnage is at least compile-tested?

CJ

Quoted 23 lines
---
  drivers/media/usb/uvc/uvc_driver.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/usb/uvc/uvc_driver.c +3 -3
index 8fe24c98087e..6e14b9dc3886 100644
@@ -2424,9 +2424,9 @@ 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}}
 
  /*
   * The Logitech cameras listed below have their interface class set to