Skip to content
  • Jiri Slaby's avatar
    tty: vt, cleanup and document con_scroll · d705ff38
    Jiri Slaby authored
    
    
    Scrolling helpers scrup and scrdown both accept 'top' and 'bottom' as
    unsigned int. Number of lines 'nr' is accepted as int, but all callers
    pass down unsigned too. So change the type of 'nr' to unsigned too.
    Now, promote unsigned int from the helpers up to the con_scroll
    hook which actually accepted all those as signed int.
    
    Next, the 'dir' parameter can have only two values and we define
    constants for that: SM_UP and SM_DOWN. Switch them to enum and do
    proper type checking on 'dir' too.
    
    Finally, document the behaviour of the hook.
    
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    Cc: Thomas Winischhofer <thomas@winischhofer.net>
    Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
    Cc: Helge Deller <deller@gmx.de>
    Cc: <linux-fbdev@vger.kernel.org>
    Cc: <linux-usb@vger.kernel.org>
    Cc: <linux-parisc@vger.kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    d705ff38