[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cc1b6c9efa197d7dcf3ebec69eebdb4c3ca90eef.camel@linux.intel.com>
Date: Mon, 02 Jul 2018 13:15:09 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Bernd Petrovitsch <bernd@...rovitsch.priv.at>,
Yisheng Xie <ysxie@...mail.com>, b.zolnierkie@...sung.com,
keescook@...omium.org, j.w.r.degoede@...il.com,
david@...hnology.com
Cc: dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fbcon: introduce for_each_registered_fb() helper
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@...ux.intel.com>
Intel Finland Oy
Powered by blists - more mailing lists