Files
erofs-linux/tools/include/vdso/unaligned.h
T
Arnaldo Carvalho de Melo 83dcc12fa5 tools headers: Sync the linux/unaligned.h copy with the kernel sources
To pick up the changes in:

  acea994327 ("vdso: Address variable shadowing in macros")

Addressing this perf tools build warning:

  Warning: Kernel ABI header differences:
    diff -u tools/include/linux/unaligned.h include/linux/unaligned.h

Please see tools/include/uapi/README for further details.

Cc: Adrian Hunter <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peng Jiang <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2025-05-20 12:57:18 -03:00

16 lines
457 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __VDSO_UNALIGNED_H
#define __VDSO_UNALIGNED_H
#define __get_unaligned_t(type, ptr) ({ \
const struct { type x; } __packed * __get_pptr = (typeof(__get_pptr))(ptr); \
__get_pptr->x; \
})
#define __put_unaligned_t(type, val, ptr) do { \
struct { type x; } __packed * __put_pptr = (typeof(__put_pptr))(ptr); \
__put_pptr->x = (val); \
} while (0)
#endif /* __VDSO_UNALIGNED_H */