From d38c5745d486004da1eb7b942b4ce3dbcf7a9be7 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Mon, 9 Aug 2021 09:37:45 +0000 Subject: zephyr: hooks: change priority to uint16_t Priority field goes from 0 to HOOK_PRIO_LAST, so 16 bits are enough. Switching to a 2 bytes field allows struct zephyr_shim_hook_list to pack up in 12 bytes, saves a bit of ram. BRANCH=none BUG=b:195521227 TEST=build and run on volteer Signed-off-by: Fabio Baltieri Change-Id: Ia8899d3d47a3c38ed20dfa5121d375a4419567f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3080573 Reviewed-by: Keith Short Reviewed-by: Jack Rosenthal Commit-Queue: Keith Short --- zephyr/shim/include/zephyr_hooks_shim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zephyr/shim/include') diff --git a/zephyr/shim/include/zephyr_hooks_shim.h b/zephyr/shim/include/zephyr_hooks_shim.h index 7175b5a6af..c53d05de9e 100644 --- a/zephyr/shim/include/zephyr_hooks_shim.h +++ b/zephyr/shim/include/zephyr_hooks_shim.h @@ -52,7 +52,7 @@ int hook_call_deferred(const struct deferred_data *data, int us); */ struct zephyr_shim_hook_list { void (*routine)(void); - int priority; + uint16_t priority; /* HOOK_PRIO_LAST = 9999 */ enum hook_type type; struct zephyr_shim_hook_list *next; }; -- cgit v1.2.1