Skip to contentSkip to conversation

tee: amdtee: Make use of the helper macro LIST_HEAD()

PATCH In review Cai Huoqing 3 participants 3 messages Feb 9, 2022 – Feb 15, 2022 TEE

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tee: amdtee: Make use of the helper macro LIST_HEAD()

Replace "struct list_head head = LIST_HEAD_INIT(head)" with "LIST_HEAD(head)" to simplify the code.

---
 drivers/tee/amdtee/call.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tee/amdtee/call.c +1 -1
index 07f36ac834c8..cec6e70f0ac9 100644
@@ -122,7 +122,7 @@ static int amd_params_to_tee_params(struct tee_param *tee, u32 count,
 }
 
 static DEFINE_MUTEX(ta_refcount_mutex);
-static struct list_head ta_list = LIST_HEAD_INIT(ta_list);
+static LIST_HEAD(ta_list);
 
 static u32 get_ta_refcount(u32 ta_handle)
 {
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Cai Huoqing

Replace "struct list_head head = LIST_HEAD_INIT(head)" with "LIST_HEAD(head)" to simplify the code.

---
 drivers/tee/amdtee/call.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tee/amdtee/call.c +0 -0
index 07f36ac834c8..cec6e70f0ac9 100644

drivers/tee/amdtee/call.c static int amd_params_to_tee_params(struct tee_param *tee, u32 count, · line 126

Quoted 6 lines
drivers/tee/amdtee/call.c +1 -1
@@ -122,7 +122,7 @@ static int amd_params_to_tee_params(struct tee_param *tee, u32 count,
 }
 
 static DEFINE_MUTEX(ta_refcount_mutex);
-static struct list_head ta_list = LIST_HEAD_INIT(ta_list);
+static LIST_HEAD(ta_list);
 

Thanks,
Rijo

Quoted 3 lines
drivers/tee/amdtee/call.c +0 -0
 static u32 get_ta_refcount(u32 ta_handle)
 {
#2 lore raw
Quoted 19 lines · Rijo Thomas
Quoted 15 lines · Cai Huoqing

Replace "struct list_head head = LIST_HEAD_INIT(head)" with "LIST_HEAD(head)" to simplify the code.

---
 drivers/tee/amdtee/call.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tee/amdtee/call.c +0 -0
index 07f36ac834c8..cec6e70f0ac9 100644
@@ -122,7 +122,7 @@ static int amd_params_to_tee_params(struct tee_param *tee, u32 count,
 }
 
Quoted 6 lines

drivers/tee/amdtee/call.c static int amd_params_to_tee_params(struct tee_param *tee, u32 count, · line 126

Quoted 4 lines
drivers/tee/amdtee/call.c +1 -1
 static DEFINE_MUTEX(ta_refcount_mutex);
-static struct list_head ta_list = LIST_HEAD_INIT(ta_list);
+static LIST_HEAD(ta_list);
 

I'm picking up this.

Thanks,
Jens

Quoted 7 lines

Thanks,
Rijo

Quoted 3 lines
drivers/tee/amdtee/call.c +0 -0
 static u32 get_ta_refcount(u32 ta_handle)
 {