usb: uvc: Fix macro in uvc_driver.c for complex values
Commit Message
From: Fasih <fasih0001@gmail.com>
The macro UVC_INFO_QUIRK(q) in uvc_driver.c initializes a structure
using a compound literal, and the complex value within the macro was
not properly enclosed in parentheses. This could lead to operator
precedence issues and reduced code clarity.
This commit adds an extra set of parentheses to the macro definition
to ensure correct evaluation and adherence to best practices. This
change also improves code readability and portability.
Signed-off-by: Syed Muhammad Fasih Ul Hassan <fasih0001@gmail.com>
Signed-off-by: Fasih <fasih0001@gmail.com>
---
drivers/media/usb/uvc/uvc_driver.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -2417,9 +2417,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