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:   Mon, 02 Jul 2018 13:06:38 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Daniel Vetter <daniel@...ll.ch>
Cc:     Yisheng Xie <ysxie@...mail.com>, b.zolnierkie@...sung.com,
        keescook@...omium.org, j.w.r.degoede@...il.com,
        david@...hnology.com, linux-fbdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] fbcon: introduce for_each_registered_fb() helper

On Mon, 2018-07-02 at 09:30 +0200, Daniel Vetter wrote:
> On Fri, Jun 29, 2018 at 07:20:13PM +0300, Andy Shevchenko wrote:
> > On Fri, 2018-06-29 at 00:20 +0800, Yisheng Xie wrote:

> > LGTM except macro implementation. That's why I have mentioned
> > for_each_pci_bridge() to look at.
> > 
> > > +#define for_each_registered_fb(i)		\
> > > +	for (i = 0; i < FB_MAX; i++)		\
> > > +		if (registered_fb[i])
> > > +
> > 
> > This needs to be protected against nested conditionals.
> > Otherwise compiler issues a warning and even may generate wrong
> > code.
> 
> See for_each_if() in include/drm/drmP.h ... we should probably lift
> that
> into a general header. The for_each_if() is used all over drm in
> iterator
> macros, exactly to avoid surprises.

Wow, didn't know we have a such. It's a good idea to forelift it for
wider use.

Yisheng, it seems you may use it in your patch directly.

-- 
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ