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]
Message-ID: <X+ScpMyiKFqhySG6@pendragon.ideasonboard.com>
Date:   Thu, 24 Dec 2020 15:50:28 +0200
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Ricardo Ribalda <ribalda@...omium.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Linux Media Mailing List <linux-media@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Joe Perches <joe@...ches.com>
Subject: Re: [PATCH v7 08/12] media: uvcvideo: Use dev_ printk aliases

Hi Andy,

On Thu, Dec 24, 2020 at 02:59:34PM +0200, Andy Shevchenko wrote:
> On Wed, Dec 23, 2020 at 3:39 PM Ricardo Ribalda wrote:
> >
> > Replace all the uses of printk() and uvc_printk() with its
> > equivalent dev_ alias macros.
> 
> > Modify uvc_warn_once() macro to use dev_info instead printk().
> 
> ...
> 
> > +#define uvc_warn_once(_dev, warn, fmt, ...)                            \
> > +do {                                                                   \
> > +       if (!test_and_set_bit(warn, &(_dev)->warnings))                 \
> > +               dev_info(&(_dev)->udev->dev, fmt, ##__VA_ARGS__);       \
> > +} while (0)
> 
> ...
> 
> Why not to use dev_warn_once() instead?

uvc_warn_once() prints the warning once per device, not once globally.

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ