[PATCH v2 0/3] media: uvcvideo: Automate quirk sorting

From: Ricardo Ribalda

Date: Mon Nov 30 2026 - 09:47:11 EST


As the number of quirks grows it becomes more complicated to keep them
sorted.

Let's rely on automation to check that all the quirks are where they are
supposed to be, so we can focus on reviewing the more fun code.

We use this opportunity to modernize a bit the quirks.

I have added an "optional" patch to relax the 80 column rules. Please
feel free to either squash it with the previous patch or drop it. I
think that the code is nicer with it... but I am biased.

An LLM has figured out the regex for the second group of devices (it is
more clever than me writing regex). I have tested it.

Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
---
Changes in v2:
- Drop the patch converting Bodelin ProScopeHR to a per-device check in
uvc_status.c; keep it in uvc_ids[] under a separate open-coded
matching keep-sorted block and update the uvc_ids[] comments to
document the grouping.
- Remove --- from the commit message of "media: uvcvideo: Use
USB_DEVICE_AND_INTERFACE_INFO macro".
- Allow longer lines for quirks.
- Link to v1: https://lore.kernel.org/r/20261002-uvc-sorted-v1-0-65f52e4d7e16@xxxxxxxxxxxx

---
Ricardo Ribalda (3):
media: uvcvideo: Use USB_DEVICE_AND_INTERFACE_INFO macro
media: uvcvideo: Relax the 80 columns rules for the quirk db
media: uvcvideo: Sort all the uvc_ids quirks

drivers/media/usb/uvc/uvc_driver.c | 737 ++++++-------------------------------
1 file changed, 122 insertions(+), 615 deletions(-)
---
base-commit: 79dd149ff9244884f7c62356a9e499a934ed6071
change-id: 20261002-uvc-sorted-9be5e3e605f4

Best regards,
--
Ricardo Ribalda <ribalda@xxxxxxxxxxxx>