fbcon: Avoid 'cap' set but not used warning
authorHelge Deller <deller@gmx.de>
Mon, 7 Feb 2022 15:59:31 +0000 (16:59 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 8 Feb 2022 13:44:15 +0000 (14:44 +0100)
commit50b10528aad568c95f772039d4b3093b4aea7439
tree2825db49dc5fd24c2189e370d232fa62693ca5f9
parent200e8e3e43c4da4bd5ca83722523754ddb14ca02
fbcon: Avoid 'cap' set but not used warning

Fix this kernel test robot warning:

  drivers/video/fbdev/core/fbcon.c: In function 'fbcon_init':
  drivers/video/fbdev/core/fbcon.c:1028:6: warning: variable 'cap' set but not used [-Wunused-but-set-variable]

The cap variable is only used when CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION
is enabled. Drop the temporary variable and use info->flags instead.

Fixes: 87ab9f6b7417 ("Revert "fbcon: Disable accelerated scrolling")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/YgFB4xqI+As196FR@p100
drivers/video/fbdev/core/fbcon.c