OSDN Git Service

exynos/fimg2d: make g2d_add_cmd() less heavy
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Tue, 8 Sep 2015 15:22:32 +0000 (17:22 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 21 Sep 2015 16:43:14 +0000 (17:43 +0100)
commitbf666b5e999236ec6406afd60ca35a465c6b3262
tree7d7825867b3f4e75b174624c1f32c36e39c14ffb
parent6a4479da71e93ef5141d9c493c235c2beb64170a
exynos/fimg2d: make g2d_add_cmd() less heavy

The function currently checks for each added command
if an overflow of the corresponding command buffers
occurs, but none of the callers ever checks the
return value.

Since all callers are now converted to use
g2d_check_space() simplify the function.

(1) The overflow checks become asserts, so they're only
    active for debug builds. This is fine since
    g2d_add_cmd() is not part of the public API.

(2) Switch the return value to void.

(3) Explicitly state that the caller has to check
    buffer space before calling g2d_add_cmd().

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
exynos/exynos_fimg2d.c