From dd2408cac1ea0f5e9ab4b07539c6edaee57918cb Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 2 Aug 2019 09:44:18 -0600 Subject: env: Drop the ENTRY typedef U-Boot is not supposed to use typedef for structs anymore. Also this name is the same as the ENTRY() macro used in assembler files, and 'entry' itself is widely used in U-Boot (>8k matches). Drop the typedef and rename the struct to env_entry to reduce confusion. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- drivers/tee/sandbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/tee/sandbox.c') diff --git a/drivers/tee/sandbox.c b/drivers/tee/sandbox.c index 2f3355c7b77..4bbcf749673 100644 --- a/drivers/tee/sandbox.c +++ b/drivers/tee/sandbox.c @@ -79,7 +79,7 @@ static u32 ta_avb_invoke_func(struct udevice *dev, u32 func, uint num_params, struct tee_param *params) { struct sandbox_tee_state *state = dev_get_priv(dev); - ENTRY e, *ep; + struct env_entry e, *ep; char *name; u32 res; uint slot; -- cgit v1.2.3 From 3f0d6807459bb22431e5bc19e597c1786b3d1ce6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:47:09 -0600 Subject: env: Drop the ACTION typedef Avoid using a typedef here which is unnecessary. Add an 'env_' prefix to both the enum and its members to make it clear that these are related to the environment. Add an ENV prefix to these two flags so that it is clear what they relate to. Also move them to env.h since they are part of the public API. Use an enum rather than a #define to tie them together. Signed-off-by: Simon Glass --- drivers/tee/sandbox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/tee/sandbox.c') diff --git a/drivers/tee/sandbox.c b/drivers/tee/sandbox.c index 4bbcf749673..4b91e7db1bc 100644 --- a/drivers/tee/sandbox.c +++ b/drivers/tee/sandbox.c @@ -174,7 +174,7 @@ static u32 ta_avb_invoke_func(struct udevice *dev, u32 func, uint num_params, e.key = name; e.data = NULL; - hsearch_r(e, FIND, &ep, &state->pstorage_htab, 0); + hsearch_r(e, ENV_FIND, &ep, &state->pstorage_htab, 0); if (!ep) return TEE_ERROR_ITEM_NOT_FOUND; @@ -198,13 +198,13 @@ static u32 ta_avb_invoke_func(struct udevice *dev, u32 func, uint num_params, e.key = name; e.data = NULL; - hsearch_r(e, FIND, &ep, &state->pstorage_htab, 0); + hsearch_r(e, ENV_FIND, &ep, &state->pstorage_htab, 0); if (ep) hdelete_r(e.key, &state->pstorage_htab, 0); e.key = name; e.data = value; - hsearch_r(e, ENTER, &ep, &state->pstorage_htab, 0); + hsearch_r(e, ENV_ENTER, &ep, &state->pstorage_htab, 0); if (!ep) return TEE_ERROR_OUT_OF_MEMORY; -- cgit v1.2.3