lkml.org 
[lkml]   [2018]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] fbcon: introduce for_each_registered_fb() helper
From
Date
On Mon, 2018-07-02 at 09:36 +0200, Bernd Petrovitsch wrote:


> > +#define for_each_registered_fb(i) \
> > + for (i = 0; i < FB_MAX; i++) \
> > + if (registered_fb[i])
> > +
>
> That leaves the possibility of a dangling-else.
> ---- snip ----
> #define for_each_registered_fb(i) \
> for (i = 0; i < FB_MAX; i++) \
> if (!registered_fb[i]) \
> continue; \
> else
> ---- snip ----
> avoids that.

Yes, you not alone :-)

AFAIU there is a v2 which fixes that, though Daniel pointed out that DRM
has a specific macro to make life easier.

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

\
 
 \ /
  Last update: 2018-07-02 12:16    [W:0.063 / U:1.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site