Skip to content

Commit

Permalink
Add DIV_ROUND_UP() and roundup() wrappers
Browse files Browse the repository at this point in the history
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jan 1, 2021
1 parent a51a2b1 commit aadee28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,7 @@ struct completion {
int dummy;
};

#define DIV_ROUND_UP(a, b) (((a) + (b) - 1) / (b))
#define roundup(a, b) (DIV_ROUND_UP(a, b) * (b))

#endif /* __HDA_WRAPPER_H */

0 comments on commit aadee28

Please sign in to comment.