fbdev: Remove FBINFO_DEFAULT from kzalloc()'ed structs
authorThomas Zimmermann <tzimmermann@suse.de>
Sat, 15 Jul 2023 18:51:45 +0000 (20:51 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 24 Jul 2023 14:50:38 +0000 (16:50 +0200)
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags
has been allocated to zero by kzalloc(). So do not set it.

Flags should signal differences from the default values. After cleaning
up all occurrences of FBINFO_DEFAULT, the token will be removed.

v4:
* clarify commit message (Geert, Dan)
v2:
* fix commit message (Miguel)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Russell King <linux@armlinux.org.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-4-tzimmermann@suse.de
drivers/video/fbdev/controlfb.c
drivers/video/fbdev/cyber2000fb.c
drivers/video/fbdev/valkyriefb.c
drivers/video/fbdev/vermilion/vermilion.c
drivers/video/fbdev/vt8500lcdfb.c

index 82eeb139c4ebb121a8805857965c9ced6c6b7fd6..717134c141ffe24ba04d0343be3f7315ed0c37bc 100644 (file)
@@ -775,7 +775,7 @@ static void __init control_init_info(struct fb_info *info, struct fb_info_contro
        info->par = &p->par;
        info->fbops = &controlfb_ops;
        info->pseudo_palette = p->pseudo_palette;
-        info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
+       info->flags = FBINFO_HWACCEL_YPAN;
        info->screen_base = p->frame_buffer + CTRLFB_OFF;
 
        fb_alloc_cmap(&info->cmap, 256, 0);
index 38c0a6866d760561b18db6195cf283a7a4a4cb7e..98ea56a9abf1e39e87ac78be83efec6f5e14fa71 100644 (file)
@@ -1459,7 +1459,7 @@ static struct cfb_info *cyberpro_alloc_fb_info(unsigned int id, char *name)
        cfb->fb.var.accel_flags = FB_ACCELF_TEXT;
 
        cfb->fb.fbops           = &cyber2000fb_ops;
-       cfb->fb.flags           = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
+       cfb->fb.flags           = FBINFO_HWACCEL_YPAN;
        cfb->fb.pseudo_palette  = cfb->pseudo_palette;
 
        spin_lock_init(&cfb->reg_b0_lock);
index b166b7cfe0e56fcf24cfeaf2205c860044087278..fd448877703225f7a69387f4ead6d0a3c3497efb 100644 (file)
@@ -535,7 +535,6 @@ static int __init valkyrie_init_info(struct fb_info *info,
 {
        info->fbops = &valkyriefb_ops;
        info->screen_base = p->frame_buffer + 0x1000;
-       info->flags = FBINFO_DEFAULT;
        info->pseudo_palette = p->pseudo_palette;
        info->par = &p->par;
        return fb_alloc_cmap(&info->cmap, 256, 0);
index 32e74e02a02fdfecbfc1f1f98abad45ce7c97dbc..71584c775efd49718b43990df60b6ea0cfcc57bd 100644 (file)
@@ -477,7 +477,7 @@ static int vml_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
        }
 
        info = &vinfo->info;
-       info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK;
+       info->flags = FBINFO_PARTIAL_PAN_OK;
 
        err = vmlfb_enable_mmio(par);
        if (err)
index 31d4e85b220c0f55184abb1498ed84725b2a2a06..42d39a9d5130f98fe9beb56774b0225e0240e2da 100644 (file)
@@ -300,8 +300,7 @@ static int vt8500lcd_probe(struct platform_device *pdev)
        fbi->fb.var.vmode       = FB_VMODE_NONINTERLACED;
 
        fbi->fb.fbops           = &vt8500lcd_ops;
-       fbi->fb.flags           = FBINFO_DEFAULT
-                               | FBINFO_HWACCEL_COPYAREA
+       fbi->fb.flags           = FBINFO_HWACCEL_COPYAREA
                                | FBINFO_HWACCEL_FILLRECT
                                | FBINFO_HWACCEL_YPAN
                                | FBINFO_VIRTFB