From patchwork Thu Jun 27 06:59:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TWFyay1QSyBUc2FpICjolKHmspvliZsp?= X-Patchwork-Id: 13713889 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 423EFC3064D for ; Thu, 27 Jun 2024 07:09:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=kLAc7E9Oi9Jrs8uorhGYEdcPB60PfHSdbCCEjUS0hco=; b=b7PNuOSHfz79J+fU5tVO3JH+l6 VJNSbCA5Nk599/nhiua7+AE98yidaCujflS++KvHZv/LnYTUzvxHOeXoBZokQCWyAgugqL4z4F/lE KdVRs5qJX1Hvcmf6Xl2JesKCVNB8yHaFiE2kNQ7uuU29ITrF+bbtifok4hCO+Ng2W2B9XbsDRV4Ap pkhQej1ely8B+RyuuZG+bAbQcKzYqNe1AIBMTPHgupi8MwjihYV/79FjVErNeyglVdHjmj1EnleXs gCNvjzKtzm1Rx+mCe4maWUyMNkU/ph8bv7oWzoye7MrJ3DSN5jy/4if6LptP4gz2yzEklIthRaSUZ EVQsRH0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMjGE-00000009VHD-2Dbm; Thu, 27 Jun 2024 07:09:38 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMjG4-00000009VCb-13fX; Thu, 27 Jun 2024 07:09:31 +0000 X-UUID: 2b0b68ce345411ef9daba96ee3f3cc8c-20240627 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=kLAc7E9Oi9Jrs8uorhGYEdcPB60PfHSdbCCEjUS0hco=; b=ahRApsXLtRoQ3DgnnuEjaHjBU6veYpU/9ZFDX3f8x4kGyP5kIm5sWoqvkuZAksG4lpz567cWtKcBXIl7t4pl6uX/Lr/3UMF1Q9kL/QFyvhC80jn/f3KLwFFQgAZGipR+ypUeChpOYYR5Tx7GPSPuMh4jmMCelYq/tiBKdt1ZalQ=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.39,REQID:611523d0-7117-47e2-978d-8c000d08bde7,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:393d96e,CLOUDID:a40e7f94-e2c0-40b0-a8fe-7c7e47299109,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 2b0b68ce345411ef9daba96ee3f3cc8c-20240627 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1338424509; Thu, 27 Jun 2024 00:09:17 -0700 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by MTKMBS14N2.mediatek.inc (172.21.101.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 27 Jun 2024 14:59:12 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 27 Jun 2024 14:59:12 +0800 From: Mark-PK Tsai To: Jens Wiklander , Sumit Garg , Matthias Brugger , AngeloGioacchino Del Regno CC: , Mark-PK Tsai , "ming-jen . chang" , , , , Subject: [PATCH v2] tee: optee: ffa: Fix missing-field-initializers warning Date: Thu, 27 Jun 2024 14:59:09 +0800 Message-ID: <20240627065911.4157-1-mark-pk.tsai@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--7.322900-8.000000 X-TMASE-MatchedRID: CYZljv4C7xqE9zgVMk3pXrMjW/sniEQK+qTrCpYSyMKwLFgnUb4vDwXG B3tb8aAxThbvLLI8RvPxY0WGgfScA89tfSEZlKTRjtK7dC6UBnmOhEhoAl74KJsoi2XrUn/J8m+ hzBStansfRoCwBzgRYnnN0DN7HnFmbmilSA2tkYg+1mgAmqXE1jZ3zgTLWwJKqtShzPE1t2E21o KvI31ATpRMZUCEHkRt X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--7.322900-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: B4B92C5369CD79974B00915F190C831DEEF3D86B376C1856D39F0358C2F1402B2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240627_000928_326432_EA20E8E4 X-CRM114-Status: GOOD ( 10.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Signed-off-by: Mark-PK Tsai --- drivers/tee/optee/ffa_abi.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c index 3235e1c719e8..3e73efa51bba 100644 --- a/drivers/tee/optee/ffa_abi.c +++ b/drivers/tee/optee/ffa_abi.c @@ -660,7 +660,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); @@ -677,7 +679,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); @@ -698,7 +702,9 @@ static bool optee_ffa_exchange_caps(struct ffa_device *ffa_dev, unsigned int *rpc_param_count, unsigned int *max_notif_value) { - 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);