serial: sh-sci: Use min_t()/max_t() instead of casts
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 21 Aug 2015 18:02:41 +0000 (20:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 16:33:48 +0000 (17:33 +0100)
commit092248aa326794ce758b7a4bb60827b661abafa8
tree73a4070e42b796bc822d918f4d24bc21a8bad08f
parent8e14ba8f8b733840659d79e38758fb2b6c765dc5
serial: sh-sci: Use min_t()/max_t() instead of casts

When comparing differently sized types, it's better to use
min_t()/max_t() than adding casts.

Also use "unsigned int" instead of "int", as that's the right type for
the length of an SG entry.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c