From c07e1f20dcbe010ceefb7ccdeac0198222366168 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Sat, 15 Jul 2023 20:52:00 +0200 Subject: [PATCH] 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 Signed-off-by: Thomas Zimmermann Reviewed-by: Miguel Ojeda Reviewed-by: Sui Jingfeng Cc: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-19-tzimmermann@suse.de --- drivers/video/fbdev/core/fb_info.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fb_info.c b/drivers/video/fbdev/core/fb_info.c index 8bdbefdd4b701..4847ebe50d7d7 100644 --- a/drivers/video/fbdev/core/fb_info.c +++ b/drivers/video/fbdev/core/fb_info.c @@ -13,7 +13,8 @@ * * Creates a new frame buffer info structure. Also reserves @size bytes * for driver private data (info->par). info->par (if any) will be - * aligned to sizeof(long). + * aligned to sizeof(long). The new instances of struct fb_info and + * the driver private data are both cleared to zero. * * Returns the new structure, or NULL if an error occurred. * -- 2.30.2