OP-TEE / optee_os

Trusted side of the TEE
Other
1.6k stars 1.07k forks source link

notif: fix build when NS_VIRTIALIZATION is enabled #7060

Closed lorc closed 1 month ago

lorc commented 1 month ago

Right now OP-TEE build fails if CFG_NS_VIRTUALIZATION=y and CFG_CORE_ASYNC_NOTIF=n with the following error:

core/kernel/notif.c: In function 'nex_init_notif': core/kernel/notif.c:185:42: error: 'notif_data_id' undeclared (first use in this function); did you mean 'notif_wait'? 185 | return virt_add_guest_spec_data(&notif_data_id, | ^~~~~ | notif_wait core/kernel/notif.c:185:42: note: each undeclared identifier is reported only once for each function it appears in core/kernel/notif.c:186:48: error: invalid application of 'sizeof' to incomplete type 'struct notif_data' 186 | sizeof(struct notif_data), NULL); | ^~ core/kernel/notif.c:187:1: warning: control reaches end of non-void function [-Wreturn-type] 187 | } | ^

Move #ifdef CFG_NS_VIRTUALIZATION section under #ifdef CFG_CORE_ASYNC_NOTIF to fix this.

jenswi-linaro commented 1 month ago

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

lorc commented 1 month ago

Thanks. I have updated the commit message subject and added tags.

Looks like checkpatch is unhappy because included error message is too long.

jforissier commented 1 month ago

Thanks. I have updated the commit message subject and added tags.

Looks like checkpatch is unhappy because included error message is too long.

Yes, but let's ignore it. I believe checkpatch needs to be updated to better deal with these kind of messages with line numbers and pipe characters.