diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-10-07 19:04:46 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-10-18 10:16:09 +0200 |
commit | bd78c9d714208fb5d989bd8ad007ff0e2bcfb2a9 (patch) | |
tree | 1aeef6ad1c57c6a28f3a7b68a1a37d0695fbc5d3 /net | |
parent | modpost: fix ishtp MODULE_DEVICE_TABLE built on big-endian host (diff) | |
download | linux-bd78c9d714208fb5d989bd8ad007ff0e2bcfb2a9.tar.xz linux-bd78c9d714208fb5d989bd8ad007ff0e2bcfb2a9.zip |
modpost: define TO_NATIVE() using bswap_* functions
The current TO_NATIVE() has some limitations:
1) You cannot cast the argument.
2) You cannot pass a variable marked as 'const'.
3) Passing an array is a bug, but it is not detected.
Impelement TO_NATIVE() using bswap_*() functions. These are GNU
extensions. If we face portability issues, we can port the code from
include/uapi/linux/swab.h.
With this change, get_rel_type_and_sym() can be simplified by casting
the arguments directly.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions