Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: Remove FBINFO_DEFAULT from kzalloc()'ed structs

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

+4 -6
+1 -1
drivers/video/fbdev/controlfb.c
··· 775 775 info->par = &p->par; 776 776 info->fbops = &controlfb_ops; 777 777 info->pseudo_palette = p->pseudo_palette; 778 - info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; 778 + info->flags = FBINFO_HWACCEL_YPAN; 779 779 info->screen_base = p->frame_buffer + CTRLFB_OFF; 780 780 781 781 fb_alloc_cmap(&info->cmap, 256, 0);
+1 -1
drivers/video/fbdev/cyber2000fb.c
··· 1459 1459 cfb->fb.var.accel_flags = FB_ACCELF_TEXT; 1460 1460 1461 1461 cfb->fb.fbops = &cyber2000fb_ops; 1462 - cfb->fb.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; 1462 + cfb->fb.flags = FBINFO_HWACCEL_YPAN; 1463 1463 cfb->fb.pseudo_palette = cfb->pseudo_palette; 1464 1464 1465 1465 spin_lock_init(&cfb->reg_b0_lock);
-1
drivers/video/fbdev/valkyriefb.c
··· 535 535 { 536 536 info->fbops = &valkyriefb_ops; 537 537 info->screen_base = p->frame_buffer + 0x1000; 538 - info->flags = FBINFO_DEFAULT; 539 538 info->pseudo_palette = p->pseudo_palette; 540 539 info->par = &p->par; 541 540 return fb_alloc_cmap(&info->cmap, 256, 0);
+1 -1
drivers/video/fbdev/vermilion/vermilion.c
··· 477 477 } 478 478 479 479 info = &vinfo->info; 480 - info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK; 480 + info->flags = FBINFO_PARTIAL_PAN_OK; 481 481 482 482 err = vmlfb_enable_mmio(par); 483 483 if (err)
+1 -2
drivers/video/fbdev/vt8500lcdfb.c
··· 300 300 fbi->fb.var.vmode = FB_VMODE_NONINTERLACED; 301 301 302 302 fbi->fb.fbops = &vt8500lcd_ops; 303 - fbi->fb.flags = FBINFO_DEFAULT 304 - | FBINFO_HWACCEL_COPYAREA 303 + fbi->fb.flags = FBINFO_HWACCEL_COPYAREA 305 304 | FBINFO_HWACCEL_FILLRECT 306 305 | FBINFO_HWACCEL_YPAN 307 306 | FBINFO_VIRTFB