From patchwork Thu Jun 27 05:11:17 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: 13713822 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 74303C2BD09 for ; Thu, 27 Jun 2024 05:22:07 +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=iQzqbkPgiFi/rlQxpl1z1jRA4cpZEngiRGiwDf3ts9A=; b=uHNxaT36xvMW0s20owwjosQWLo KtRsLGM7K6YEmWjPQhJel4RnUjcp62XTRBjbmW5PFSmitZkV9f4wiux3jXCfuxPo2HnBQrDx4F4qn NNJNEWwN8xdMFkbOqO5sm7pkFhpKgLt3lrDWQUA+rB8rSkZR6GHwPtcTFNkP/wRi2wT1fkDrbKwia 3+lRIWBJAJFgb561vXClnYhU/z8BlkB3Xm++X0ZTASyXhucibjFnHz7Cwvd/2zm6fzi56f7xrxw23 oLPDPjBCVhuTG4Oe+yeQ9913fyU8GqJ3mT548EqOREvIB4q8eObR8Hqc6H79MIuL8rVyZQBKXwgrq x3n1guIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMhZu-00000009FWv-23Gg; Thu, 27 Jun 2024 05:21:50 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMhZl-00000009FVI-2idi; Thu, 27 Jun 2024 05:21:43 +0000 X-UUID: 1e012ba0344511efb2966dae1f787272-20240626 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=iQzqbkPgiFi/rlQxpl1z1jRA4cpZEngiRGiwDf3ts9A=; b=RdmepvZsetO/fTI+4H24d6CFZP+x/CjrMWBU+oUEEMXamOELWjzbGJFyGYxNBCprwUq7ZaNnvX4yl5X92spbWG4RkqJZWARKBT6CHE8mFSiBer2TkUFKKR3nhHXlTgWDObhkWzXE21Dxt/+jxhnS6rPKaEM+Y0BT7KoUsFpPpQs=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.39,REQID:18f77407-34b8-4264-b5e2-26d4f63f7081,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:393d96e,CLOUDID:e5c67d94-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: 1e012ba0344511efb2966dae1f787272-20240626 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2013297392; Wed, 26 Jun 2024 22:21:33 -0700 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs10n1.mediatek.inc (172.21.101.34) 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 13:11:29 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 27 Jun 2024 13:11:29 +0800 From: Mark-PK Tsai To: Jens Wiklander , Sumit Garg , Matthias Brugger , AngeloGioacchino Del Regno CC: , Mark-PK Tsai , "ming-jen . chang" , , , , Subject: [PATCH] tee: optee: ffa: Fix missing-field-initializers warning Date: Thu, 27 Jun 2024 13:11:17 +0800 Message-ID: <20240627051125.24084-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--6.025600-8.000000 X-TMASE-MatchedRID: LgKL3nvPUKSE9zgVMk3pXuIfK/Jd5eHmbtUOg4wiVGD7a38GZa638wXG B3tb8aAxThbvLLI8RvPxY0WGgfScA89tfSEZlKTRjtK7dC6UBnmOhEhoAl74KJsoi2XrUn/Jn6K dMrRsL14qtq5d3cxkNetBOdQ/FYIPqaYAMJWlyDYC/JB2Q6Hcy9VFGi+YsWFlpv2b2upGJmjAvp LE+mvX8g== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--6.025600-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 278060FC629C8497EE8B26FBEC3A4804E38C7605AD06555C004F5A98FE2A032E2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240626_222141_815855_82B31D8B X-CRM114-Status: GOOD ( 10.09 ) 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 ensures that the remaining fields of 'ffa_send_direct_data' are zero-initialized. Signed-off-by: ming-jen.chang Signed-off-by: Mark-PK Tsai --- drivers/tee/optee/ffa_abi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c index 3235e1c719e8..1aa995752682 100644 --- a/drivers/tee/optee/ffa_abi.c +++ b/drivers/tee/optee/ffa_abi.c @@ -660,7 +660,7 @@ 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 = { OPTEE_FFA_GET_API_VERSION, 0, 0, 0, 0 }; int rc; msg_ops->mode_32bit_set(ffa_dev); @@ -677,7 +677,7 @@ 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){ OPTEE_FFA_GET_OS_VERSION, 0, 0, 0, 0 }; rc = msg_ops->sync_send_receive(ffa_dev, &data); if (rc) { pr_err("Unexpected error %d\n", rc); @@ -698,7 +698,7 @@ 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 = { OPTEE_FFA_EXCHANGE_CAPABILITIES, 0, 0, 0, 0 }; int rc; rc = ops->msg_ops->sync_send_receive(ffa_dev, &data);