Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video: fbdev: starfive: Use round_up() instead of _ALIGN_UP() #26

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions drivers/video/fbdev/starfive/starfive_displayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down