mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-11 00:02:01 +08:00
13 lines
339 B
C
13 lines
339 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|||
|
|
|
||
|
|
#ifndef _TOOLS_LINUX_ALIGN_H
|
||
|
|
#define _TOOLS_LINUX_ALIGN_H
|
||
|
|
|
||
|
|
#include <uapi/linux/const.h>
|
||
|
|
|
||
|
|
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
|
||
|
|
#define ALIGN_DOWN(x, a) __ALIGN_KERNEL((x) - ((a) - 1), (a))
|
||
|
|
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
|
||
|
|
|
||
|
|
#endif /* _TOOLS_LINUX_ALIGN_H */
|