summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2021-06-22 16:05:53 +0300
committerEmil Renner Berthing <kernel@esmil.dk>2021-08-27 00:07:33 +0300
commit5e98340252b079a1fc40979a1a401411b32e9f68 (patch)
tree25072f990cf026f093a22fd5a0fe48f9751e22e6
parent17748dbe2edff21e76617296cfff4f33e1a54039 (diff)
downloadlinux-5e98340252b079a1fc40979a1a401411b32e9f68.tar.xz
video: fbdev: starfive: Use round_up() instead of _ALIGN_UP()
_ALIGN_UP() is being removed by commit efcec32fe84ab4ee ("riscv: Cleanup unused functions") in riscv/for-next: drivers/video/fbdev/starfive/starfive_displayer.c: In function ‘of_parse_wr_cmd’: drivers/video/fbdev/starfive/starfive_displayer.c:616:27: error: implicit declaration of function ‘_ALIGN_UP’ [-Werror=implic it-function-declaration] 616 | dev_cmds->cmds = kzalloc(_ALIGN_UP(alloc_bytes, 4), GFP_KERNEL); | ^~~~~~~~~ Just use roundup() instead. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Emil Renner Berthing <kernel@esmil.dk>
-rw-r--r--drivers/video/fbdev/starfive/starfive_displayer.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/video/fbdev/starfive/starfive_displayer.c b/drivers/video/fbdev/starfive/starfive_displayer.c
index 09d55c9e45fe..315a10382e5c 100644
--- a/drivers/video/fbdev/starfive/starfive_displayer.c
+++ b/drivers/video/fbdev/starfive/starfive_displayer.c
@@ -28,11 +28,6 @@
#include "starfive_fb.h"
#include "starfive_display_dev.h"
-#ifdef _ALIGN_UP
-#undef _ALIGN_UP
-#define _ALIGN_UP(addr, size) (((addr)+((size)-1))&(~((typeof(addr))(size)-1)))
-#endif
-
#define DSI_CMD_LEN(hdr) (sizeof(*hdr) + (hdr)->dlen)
static int sf_displayer_reset(struct sf_fb_data *fbi)
@@ -613,7 +608,7 @@ static int of_parse_wr_cmd(struct device_node *np,
return -EINVAL;
}
dev_cmds->n_pack = cnt;
- dev_cmds->cmds = kzalloc(_ALIGN_UP(alloc_bytes, 4), GFP_KERNEL);
+ dev_cmds->cmds = kzalloc(round_up(alloc_bytes, 4), GFP_KERNEL);
if (IS_ERR_OR_NULL(dev_cmds->cmds))
return -ENOMEM;