]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drm/udl: fix Bpp calculation in dumb_create()
authorDavid Herrmann <dh.herrmann@gmail.com>
Mon, 20 Jan 2014 18:54:18 +0000 (19:54 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Sun, 16 Mar 2014 11:11:01 +0000 (12:11 +0100)
commit2b932d8ef009f37d397c211b1dc5d0b056f6ef64
tree9313f2bcbe28ad619fe25608bf80005500d6232e
parent06c99161b66d36b0345c443bd0934cfc3f4d7f54
drm/udl: fix Bpp calculation in dumb_create()

Probably a typo.. we obviously need "(bpp + 7) / 8" instead of
"(bpp + 1) / 8". Unlikely to be hit in any sane code, but lets be safe.
Use DIV_ROUND_UP() to avoid the problem entirely and make the core more
readable.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
drivers/gpu/drm/udl/udl_gem.c