diff options
author | Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | 2019-01-24 15:59:11 +0100 |
---|---|---|
committer | Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | 2019-02-15 19:50:07 +0100 |
commit | ff98e20ef2081b8620dada28fc2d4fb24ca0abf2 (patch) | |
tree | 21394fcfec2e86750f232566f29522f7b756f52d /drivers/tee/optee/core.c | |
parent | 8834f5600cf3c8db365e18a3d5cac2c2780c81e5 (diff) |
lib/crc32.c: mark crc32_le_base/__crc32c_le_base aliases as __pure
The upcoming GCC 9 release extends the -Wmissing-attributes warnings
(enabled by -Wall) to C and aliases: it warns when particular function
attributes are missing in the aliases but not in their target.
In particular, it triggers here because crc32_le_base/__crc32c_le_base
aren't __pure while their target crc32_le/__crc32c_le are.
These aliases are used by architectures as a fallback in accelerated
versions of CRC32. See commit 9784d82db3eb ("lib/crc32: make core crc32()
routines weak so they can be overridden").
Therefore, being fallbacks, it is likely that even if the aliases
were called from C, there wouldn't be any optimizations possible.
Currently, the only user is arm64, which calls this from asm.
Still, marking the aliases as __pure makes sense and is a good idea
for documentation purposes and possible future optimizations,
which also silences the warning.
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Diffstat (limited to 'drivers/tee/optee/core.c')
0 files changed, 0 insertions, 0 deletions