Re: [PATCH 09/21] fbcon: Replace FBCON_FLAGS_INIT with a boolean

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 2, 2022 at 10:25 AM Thomas Zimmermann <tzimmermann@xxxxxxx> wrote:
> Am 31.01.22 um 22:05 schrieb Daniel Vetter:
> > It's only one flag and slightly tidier code.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> > Cc: Daniel Vetter <daniel@xxxxxxxx>
> > Cc: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
> > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Cc: Du Cheng <ducheng2@xxxxxxxxx>
> > Cc: Thomas Zimmermann <tzimmermann@xxxxxxx>
> > Cc: Claudio Suarez <cssk@xxxxxxxx>
>
> Acked-by: Thomas Zimmermann <tzimmermann@xxxxxxx>

> > +++ b/drivers/video/fbdev/core/fbcon.h
> > @@ -18,8 +18,6 @@
> >
> >   #include <asm/io.h>
> >
> > -#define FBCON_FLAGS_INIT         1
> > -
> >      /*
> >       *    This is the interface between the low-level console driver and the
> >       *    low-level frame buffer device
> > @@ -77,7 +75,7 @@ struct fbcon_ops {
> >       int    blank_state;
> >       int    graphics;
> >       int    save_graphics; /* for debug enter/leave */
> > -     int    flags;
> > +     bool   initialized;
>
> This will add 3 bytes of padding. Maybe you can put the bool elsewhere.

Several of the int variables are used as boolean flags, too.
Perhaps convert them all to bitfields?

    unsigned int initialized : 1;
    ...

> >       int    rotate;
> >       int    cur_rotate;
> >       char  *cursor_data;

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux