summaryrefslogtreecommitdiff
path: root/drivers/tee
diff options
context:
space:
mode:
authorMark-PK Tsai <mark-pk.tsai@mediatek.com>2024-06-27 14:59:09 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-25 09:50:53 +0200
commit58911b7abeb58915e700b642dbbc7c6df638c9b5 (patch)
tree3a3fdb6bf354de5a4619ff880741a8610ad86d0b /drivers/tee
parent945658c21105a4de876edb9f321706fb1b9ab2d2 (diff)
downloadlinux-58911b7abeb58915e700b642dbbc7c6df638c9b5.tar.gz
linux-58911b7abeb58915e700b642dbbc7c6df638c9b5.tar.bz2
linux-58911b7abeb58915e700b642dbbc7c6df638c9b5.zip
tee: optee: ffa: Fix missing-field-initializers warning
[ Upstream commit e0556255a53d6d3d406a28362dffd972018a997c ] The 'missing-field-initializers' warning was reported when building with W=2. This patch use designated initializers for 'struct ffa_send_direct_data' to suppress the warning and clarify the initialization intent. Signed-off-by: ming-jen.chang <ming-jen.chang@mediatek.com> Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/tee')
-rw-r--r--drivers/tee/optee/ffa_abi.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
index 0828240f27e6..b8ba360e863e 100644
--- a/drivers/tee/optee/ffa_abi.c
+++ b/drivers/tee/optee/ffa_abi.c
@@ -657,7 +657,9 @@ static bool optee_ffa_api_is_compatbile(struct ffa_device *ffa_dev,
const struct ffa_ops *ops)
{
const struct ffa_msg_ops *msg_ops = ops->msg_ops;
- struct ffa_send_direct_data data = { OPTEE_FFA_GET_API_VERSION };
+ struct ffa_send_direct_data data = {
+ .data0 = OPTEE_FFA_GET_API_VERSION,
+ };
int rc;
msg_ops->mode_32bit_set(ffa_dev);
@@ -674,7 +676,9 @@ static bool optee_ffa_api_is_compatbile(struct ffa_device *ffa_dev,
return false;
}
- data = (struct ffa_send_direct_data){ OPTEE_FFA_GET_OS_VERSION };
+ data = (struct ffa_send_direct_data){
+ .data0 = OPTEE_FFA_GET_OS_VERSION,
+ };
rc = msg_ops->sync_send_receive(ffa_dev, &data);
if (rc) {
pr_err("Unexpected error %d\n", rc);
@@ -694,7 +698,9 @@ static bool optee_ffa_exchange_caps(struct ffa_device *ffa_dev,
u32 *sec_caps,
unsigned int *rpc_param_count)
{
- struct ffa_send_direct_data data = { OPTEE_FFA_EXCHANGE_CAPABILITIES };
+ struct ffa_send_direct_data data = {
+ .data0 = OPTEE_FFA_EXCHANGE_CAPABILITIES,
+ };
int rc;
rc = ops->msg_ops->sync_send_receive(ffa_dev, &data);