lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiDSCvTQzur1UqEKdwkd9vKcPQhG1sjWvbtwyf0jokFY-S2tA@mail.gmail.com>
Date: Tue, 17 Jun 2025 15:02:00 +0200
From: Ricardo Ribalda <ribalda@...omium.org>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Hans Verkuil <hans@...erkuil.nl>, Hans de Goede <hansg@...nel.org>, 
	Mauro Carvalho Chehab <mchehab@...nel.org>, linux-media@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] media: uvcvideo: Enable keep-sorted

On Tue, 17 Jun 2025 at 14:54, Laurent Pinchart
<laurent.pinchart@...asonboard.com> wrote:
>
> On Tue, Jun 17, 2025 at 01:52:50PM +0200, Hans Verkuil wrote:
> > On 16/06/2025 15:38, Hans de Goede wrote:
> > > On 16-Jun-25 15:31, Ricardo Ribalda wrote:
> > >> On Mon, 16 Jun 2025 at 15:26, Hans de Goede <hansg@...nel.org> wrote:
> > >>> On 16-Jun-25 15:22, Ricardo Ribalda wrote:
> > >>>> On Mon, 16 Jun 2025 at 15:05, Hans de Goede <hansg@...nel.org> wrote:
> > >>>>> On 29-Apr-25 15:47, Ricardo Ribalda wrote:
> > >>>>>> When committers contribute quirks to the uvc driver, they usually add
> > >>>>>> them out of order.
> > >>>>>>
> > >>>>>> We can automatically validate that their follow our guidelines with the
> > >>>>>> use of keep-sorted.
> > >>>>>>
> > >>>>>> This patchset adds support for keep-sorted in the uvc driver. The two
> > >>>>>> patches can be squashed if needed.
> > >>>>>>
> > >>>>>> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> > >>>>>
> > >>>>> I've no objections against these 2 patches, but these need to be
> > >>>>> rebased on top of the latest uvc/for-next. Can you send out a new
> > >>>>> version please ?
> > >>>>
> > >>>> I was waiting for HansV to say that keep-sorted was useful and then
> > >>>> add it to the CI.
> > >>>
> > >>> Ok, so should we drop this series from patchwork then ?
> > >>
> > >> If the series does not bother you too much in patchwork let it stay
> > >> there until HansV replies to the makefile series.
> >
> > I did that. Basically I don't like the keep-sorted annotation unless it
> > is rolled out kernel-wide. It's not something we should do just in the
> > media subsystem.
> >
> > That doesn't mean that a patch fixing the uvc_ids order isn't welcome,
> > but just drop the annotation.
> >
> > If we do that, then patch 1/2 is also no longer needed. Although it
> > feels more logical that match_flags is at the end. I leave that to
> > HdG and Laurent to decide.
>
> .match_flags is first to match the order of the fields in the
> usb_device_id structure. Is there a need to move it last, or is only the
>
>         }, {
>
> construct that the tool doesn't like ?

The },{ construct is fine.

The tool sorts all the content in the block

Eg:
{
 tail= AA;
 head = BBB;
}

is sorted before:
{
 tail = CC;
 head= AAAA;
}
It can be tuned with a regex:
https://github.com/google/keep-sorted?tab=readme-ov-file#regular-expressions
But the syntax is not particularly nice.

This is why I moved "head" to the beginning of every struct.

Anyway, since keep-sorted is not going to be part of the CI unless it
is adopted by other subsystems we can ignore this for now.

Regards!

>
> > > Sure that works for me.
>
> --
> Regards,
>
> Laurent Pinchart



-- 
Ricardo Ribalda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ