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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 5 Nov 2020 20:52:26 +0100
From:   Ricardo Ribalda <ribalda@...omium.org>
To:     Joe Perches <joe@...ches.com>
Cc:     Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/7] media: uvcvideo: Use pr_cont() macro

Hi Joe

On Thu, Nov 5, 2020 at 7:58 PM Joe Perches <joe@...ches.com> wrote:
>
> On Thu, 2020-11-05 at 10:50 +0100, Ricardo Ribalda wrote:
> > Hi Joe
>
> Rehi Ricardo.
>
> > On Thu, Nov 5, 2020 at 12:59 AM Joe Perches <joe@...ches.com> wrote:
> > > It looks as if all the pr_cont uses in the code are odd and repetitive.
> > >
> > > Perhaps it'd be sensible to add something like:
> >
> > Looks like a great idea. Queued for my v3
> >
> > https://github.com/ribalda/linux/commit/1623b648331d7f69c8a9f6b199e119f6c8ee61c6
> >
> > I let Laurent decide if we should squash with the previous patch or not.
> >
> > Thanks!
> >
> > >
> > > #define uvc_trace_cont(flag, fmt, ...)                                  \
> > > do {                                                                    \
> > >         if (uvc_trace_param & (flag))                                   \
> > >                 pr_cont(fmt, ##__VA_ARGS__);                            \
> > > } while (0)
> > >
> > > and change all the uses like:
> > >
> > > -               if (uvc_trace_param & UVC_TRACE_PROBE)
> > > -                       printk(KERN_CONT " <- SU %d", entity->id);
> > > +               uvc_trace_cont(UVC_TRACE_PROBE, " <- SU %d", entity->id);
> > >
>
> While I know the only uses of uvc_trace_cont are with UVC_TRACE_PROBE,
> there are other existing uvc_trace(flag, ...) uses.
>
> I think the uvc_trace_cont mechanism should require a flag and not
> assume UVC_TRACE_PROBE so it's possible, even though currently unused,
> for other uvc_trace calls to be continued.
>
> $ git grep -Poh '\buvc_trace\(\w+' drivers/media | sort | uniq -c
>       1 uvc_trace(flag
>       6 uvc_trace(UVC_TRACE_CALLS
>       1 uvc_trace(UVC_TRACE_CAPTURE
>       2 uvc_trace(UVC_TRACE_CLOCK
>      15 uvc_trace(UVC_TRACE_CONTROL
>      42 uvc_trace(UVC_TRACE_DESCR
>       6 uvc_trace(UVC_TRACE_FORMAT
>      12 uvc_trace(UVC_TRACE_FRAME
>       7 uvc_trace(UVC_TRACE_PROBE
>       1 uvc_trace(UVC_TRACE_STATS
>       6 uvc_trace(UVC_TRACE_STATUS
>       4 uvc_trace(UVC_TRACE_SUSPEND
>       6 uvc_trace(UVC_TRACE_VIDEO
>
>

There you are:

https://github.com/ribalda/linux/commit/7b3e2214dde38dc4534eec7399a4053881c2589e

Thanks!

-- 
Ricardo Ribalda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ