From patchwork Tue Oct 24 14:31:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13434695 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 D9826C00A8F for ; Tue, 24 Oct 2023 14:32:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.622037.969158 (Exim 4.92) (envelope-from ) id 1qvIRm-0006qO-0z; Tue, 24 Oct 2023 14:31:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 622037.969158; Tue, 24 Oct 2023 14:31:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qvIRl-0006q9-TH; Tue, 24 Oct 2023 14:31:53 +0000 Received: by outflank-mailman (input) for mailman id 622037; Tue, 24 Oct 2023 14:31:51 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qvIRj-0006O8-Fy for xen-devel@lists.xenproject.org; Tue, 24 Oct 2023 14:31:51 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 0ff47a84-727a-11ee-9b0e-b553b5be7939; Tue, 24 Oct 2023 16:31:47 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id BE6584EE074A; Tue, 24 Oct 2023 16:31:46 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0ff47a84-727a-11ee-9b0e-b553b5be7939 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, jbeulich@suse.com, andrew.cooper3@citrix.com, roger.pau@citrix.com, Nicola Vetrini Subject: [RFC 4/4] amd/iommu: fully initialize array in 'flush_command_buffer' Date: Tue, 24 Oct 2023 16:31:38 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Fully explicit initialization of the cmd array resolves a violation of MISRA C:2012 Rule 9.3. Signed-off-by: Nicola Vetrini Acked-by: Jan Beulich --- xen/drivers/passthrough/amd/iommu_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.34.1 diff --git a/xen/drivers/passthrough/amd/iommu_cmd.c b/xen/drivers/passthrough/amd/iommu_cmd.c index cb28b36abc38..49b9fcac9410 100644 --- a/xen/drivers/passthrough/amd/iommu_cmd.c +++ b/xen/drivers/passthrough/amd/iommu_cmd.c @@ -66,7 +66,8 @@ static void flush_command_buffer(struct amd_iommu *iommu, IOMMU_COMP_WAIT_S_FLAG_MASK), (addr >> 32) | MASK_INSR(IOMMU_CMD_COMPLETION_WAIT, IOMMU_CMD_OPCODE_MASK), - CMD_COMPLETION_DONE + CMD_COMPLETION_DONE, + 0 }; s_time_t start, timeout; static unsigned int __read_mostly threshold = 1;