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

fbdev: Document that framebuffer_alloc() returns zero'ed data

Most fbdev drivers depend on framebuffer_alloc() to initialize the
allocated memory to 0. Document this guarantee.

v3:
* slightly reword the sentence (Miguel)

Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
Cc: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-19-tzimmermann@suse.de

+2 -1
+2 -1
drivers/video/fbdev/core/fb_info.c
··· 13 13 * 14 14 * Creates a new frame buffer info structure. Also reserves @size bytes 15 15 * for driver private data (info->par). info->par (if any) will be 16 - * aligned to sizeof(long). 16 + * aligned to sizeof(long). The new instances of struct fb_info and 17 + * the driver private data are both cleared to zero. 17 18 * 18 19 * Returns the new structure, or NULL if an error occurred. 19 20 *