summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorBill XIE <persmule@hardenedlinux.org>2022-07-08 16:53:21 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-07-14 23:08:09 +0000
commitac136250b26ddcb54d61ed8428f110b607cb3c88 (patch)
tree40be3a5d3f1674bd18b44e3c45cc3ac1ef9af017 /src/ec
parentf7ba881f98db6561e8c4964663f8774e1a82f41b (diff)
commonlib: Substitude macro "__unused" in compiler.h
Since there are many identifiers whose name contain "__unused" in headers of musl libc, introducing a macro which expands "__unused" to the source of a util may have disastrous effect during its compiling under a musl-based platform. However, it is hard to detect musl at build time as musl is notorious for having explicitly been refusing to add a macro like "__MUSL__" to announce its own presence. Using __always_unused and __maybe_unused for everything may be a good idea. This is how it works in the Linux kernel, so that would at least make us match some other standard rather than doing our own thing (especially since the other compiler.h shorthand macros are also inspired by Linux). Signed-off-by: Bill XIE <persmule@hardenedlinux.org> Change-Id: I547ae3371d7568f5aed732ceefe0130a339716a9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65717 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/google/chromeec/ec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index b0b4de7d45..6604abd49e 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -219,7 +219,7 @@ static int google_chromeec_clear_mask(uint8_t type, uint64_t mask)
EC_HOST_EVENT_CLEAR, &mask);
}
-static int __unused google_chromeec_set_mask(uint8_t type, uint64_t mask)
+static int google_chromeec_set_mask(uint8_t type, uint64_t mask)
{
if (google_chromeec_is_uhepi_supported())
return google_chromeec_uhepi_cmd(type,