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_re
Hi all!
On Fri, 2018-06-29 at 00:20 +0800, Yisheng Xie wrote:
[...]
> diff --git a/include/linux/fb.h b/include/linux/fb.h
> index aa74a22..3e13b95 100644
> --- a/include/linux/fb.h
> +++ b/include/linux/fb.h
> @@ -650,6 +650,10 @@ extern int fb_get_color_depth(struct
> fb_var_screeninfo *var,
>
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.
> >
> > > +#
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:
> > Following pattern is often used:
> >
> > for (i = 0; i < FB_MAX; i++) {
> > if (registered_fb[i]) {
> > ...
> > }
> > }
> >
> > Therefore,
On Fri, 2018-06-29 at 00:20 +0800, Yisheng Xie wrote:
> Following pattern is often used:
>
> for (i = 0; i < FB_MAX; i++) {
> if (registered_fb[i]) {
> ...
> }
> }
>
> Therefore, as Andy's suggestion, for_each_registered_fb() helper can
Suggested-by then ?
> be
Hi Hans,
On 06/29/2018 02:50 AM, Hans de Goede wrote:
> Hi,
>
> Looks good, but you should probably do a new version based on:
>
> https://github.com/bzolnier/linux/tree/fbdev-for-next
>
> This has one more loop to replace, in the fbcon_output_notifier()
> function which was introduced by:
> https
Hi,
Looks good, but you should probably do a new version based on:
https://github.com/bzolnier/linux/tree/fbdev-for-next
This has one more loop to replace, in the fbcon_output_notifier()
function which was introduced by:
https://github.com/bzolnier/linux/commit/83d83bebf40132e2d55ec58af666713cc
Following pattern is often used:
for (i = 0; i < FB_MAX; i++) {
if (registered_fb[i]) {
...
}
}
Therefore, as Andy's suggestion, for_each_registered_fb() helper can
be introduced to make the code easier to read and write by reducing
indentation level. It also sav