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

Configure Feed

Select the types of activity you want to include in your feed.

fbdev: Declare src parameter of fb_pad_ helpers as constant

Fbdev's padding helpers do not modify the source buffer. Declare the
parameter as 'const'.

Fbcon's font-rendering code calls these helpers with the font data.
Declaring src as const will allow for making the font data constant
as well.

While at it, also remove the extern qualifier from the function
declarations in the header file.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Thomas Zimmermann and committed by
Helge Deller
b9e0180b 02fe86e5

+8 -8
+3 -3
drivers/video/fbdev/core/fbmem.c
··· 91 91 /* 92 92 * Data padding functions. 93 93 */ 94 - void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u32 height) 94 + void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, const u8 *src, u32 s_pitch, u32 height) 95 95 { 96 96 __fb_pad_aligned_buffer(dst, d_pitch, src, s_pitch, height); 97 97 } 98 98 EXPORT_SYMBOL(fb_pad_aligned_buffer); 99 99 100 - void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 idx, u32 height, 101 - u32 shift_high, u32 shift_low, u32 mod) 100 + void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, const u8 *src, u32 idx, u32 height, 101 + u32 shift_high, u32 shift_low, u32 mod) 102 102 { 103 103 u8 mask = (u8) (0xff << shift_high), tmp; 104 104 int i, j;
+5 -5
include/linux/fb.h
··· 602 602 extern void unregister_framebuffer(struct fb_info *fb_info); 603 603 extern int devm_register_framebuffer(struct device *dev, struct fb_info *fb_info); 604 604 extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size); 605 - extern void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 idx, 606 - u32 height, u32 shift_high, u32 shift_low, u32 mod); 607 - extern void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u32 height); 605 + void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, const u8 *src, u32 idx, u32 height, 606 + u32 shift_high, u32 shift_low, u32 mod); 607 + void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, const u8 *src, u32 s_pitch, u32 height); 608 608 extern void fb_set_suspend(struct fb_info *info, int state); 609 609 extern int fb_get_color_depth(struct fb_var_screeninfo *var, 610 610 struct fb_fix_screeninfo *fix); ··· 630 630 #endif 631 631 } 632 632 633 - static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, 634 - u8 *src, u32 s_pitch, u32 height) 633 + static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, const u8 *src, u32 s_pitch, 634 + u32 height) 635 635 { 636 636 u32 i, j; 637 637