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

video: fbdev: mx3fb: Fix kernel-doc, set but not used and string warnings

Fix W=1 warnings:
- Fix kernel-doc
- Drop unused code/variables
- Use memcpy to copy a string without zero-termination
strncpy() generates a warning

v2:
- Updated subject (Lee)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Xiaofei Tan <tanxiaofei@huawei.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Lee Jones <lee.jones@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-19-sam@ravnborg.org

+8 -5
+8 -5
drivers/video/fbdev/mx3fb.c
··· 445 445 static void sdc_disable_channel(struct mx3fb_info *mx3_fbi) 446 446 { 447 447 struct mx3fb_data *mx3fb = mx3_fbi->mx3fb; 448 - uint32_t enabled; 449 448 unsigned long flags; 450 449 451 450 if (mx3_fbi->txd == NULL) ··· 452 453 453 454 spin_lock_irqsave(&mx3fb->lock, flags); 454 455 455 - enabled = sdc_fb_uninit(mx3_fbi); 456 + sdc_fb_uninit(mx3_fbi); 456 457 457 458 spin_unlock_irqrestore(&mx3fb->lock, flags); 458 459 ··· 731 732 732 733 /** 733 734 * mx3fb_set_fix() - set fixed framebuffer parameters from variable settings. 734 - * @info: framebuffer information pointer 735 + * @fbi: framebuffer information pointer 735 736 * @return: 0 on success or negative error code on failure. 736 737 */ 737 738 static int mx3fb_set_fix(struct fb_info *fbi) ··· 739 740 struct fb_fix_screeninfo *fix = &fbi->fix; 740 741 struct fb_var_screeninfo *var = &fbi->var; 741 742 742 - strncpy(fix->id, "DISP3 BG", 8); 743 + memcpy(fix->id, "DISP3 BG", 8); 743 744 744 745 fix->line_length = var->xres_virtual * var->bits_per_pixel / 8; 745 746 ··· 1104 1105 1105 1106 /** 1106 1107 * mx3fb_blank() - blank the display. 1108 + * @blank: blank value for the panel 1109 + * @fbi: framebuffer information pointer 1107 1110 */ 1108 1111 static int mx3fb_blank(int blank, struct fb_info *fbi) 1109 1112 { ··· 1127 1126 /** 1128 1127 * mx3fb_pan_display() - pan or wrap the display 1129 1128 * @var: variable screen buffer information. 1130 - * @info: framebuffer information pointer. 1129 + * @fbi: framebuffer information pointer. 1131 1130 * 1132 1131 * We look only at xoffset, yoffset and the FB_VMODE_YWRAP flag 1133 1132 */ ··· 1388 1387 1389 1388 /** 1390 1389 * mx3fb_init_fbinfo() - initialize framebuffer information object. 1390 + * @dev: the device 1391 + * @ops: framebuffer device operations 1391 1392 * @return: initialized framebuffer structure. 1392 1393 */ 1393 1394 static struct fb_info *mx3fb_init_fbinfo(struct device *dev,