From f5de1aba3327fec6b15061390a0d40e01ff93df1 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 26 Jul 2019 20:07:08 +0900 Subject: [PATCH] uniphier: replace DIV_ROUND_UP() with div_round_up() from utils_def.h Use the helper in utils_def.h instead of the own macro. Change-Id: I527f9e75914d60f66354e365006b960ba5e8cbae Signed-off-by: Masahiro Yamada --- plat/socionext/uniphier/uniphier_nand.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plat/socionext/uniphier/uniphier_nand.c b/plat/socionext/uniphier/uniphier_nand.c index 271aa0f49..27e10e4b7 100644 --- a/plat/socionext/uniphier/uniphier_nand.c +++ b/plat/socionext/uniphier/uniphier_nand.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -16,8 +16,6 @@ #include "uniphier.h" -#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) - #define NAND_CMD_READ0 0 #define NAND_CMD_READSTART 0x30 @@ -166,7 +164,7 @@ static size_t __uniphier_nand_read(struct uniphier_nand *nand, int lba, int pages_per_block = nand->pages_per_block; int page_size = nand->page_size; int blocks_to_skip = lba / pages_per_block; - int pages_to_read = DIV_ROUND_UP(size, page_size); + int pages_to_read = div_round_up(size, page_size); int page = lba % pages_per_block; int block = 0; uintptr_t p = buf;