[Intel-gfx] [PATCH 09/21] fbcon: Replace FBCON_FLAGS_INIT with a boolean
Geert Uytterhoeven
geert at linux-m68k.org
Thu Feb 3 13:47:13 UTC 2022
On Wed, Feb 2, 2022 at 10:25 AM Thomas Zimmermann <tzimmermann at suse.de> 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 at intel.com>
> > Cc: Daniel Vetter <daniel at ffwll.ch>
> > Cc: Tetsuo Handa <penguin-kernel at I-love.SAKURA.ne.jp>
> > Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> > Cc: Du Cheng <ducheng2 at gmail.com>
> > Cc: Thomas Zimmermann <tzimmermann at suse.de>
> > Cc: Claudio Suarez <cssk at net-c.es>
>
> Acked-by: Thomas Zimmermann <tzimmermann at suse.de>
> > +++ 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 at linux-m68k.org
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
More information about the Intel-gfx
mailing list