drm/i915: fix open-coded DIV_ROUND_UP
Use the nice Kernel macro, it makes the code much more readable. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Цей коміт міститься в:

зафіксовано
Daniel Vetter

джерело
dc39fff722
коміт
de45eaf7b9
@@ -261,7 +261,7 @@ i915_gem_dumb_create(struct drm_file *file,
|
||||
struct drm_mode_create_dumb *args)
|
||||
{
|
||||
/* have to work out size/pitch and return them */
|
||||
args->pitch = ALIGN(args->width * ((args->bpp + 7) / 8), 64);
|
||||
args->pitch = ALIGN(args->width * DIV_ROUND_UP(args->bpp, 8), 64);
|
||||
args->size = args->pitch * args->height;
|
||||
return i915_gem_create(file, dev,
|
||||
args->size, &args->handle);
|
||||
|
Посилання в новій задачі
Заблокувати користувача