From patchwork Thu Dec 14 11:44:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13492898 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 81CC9C4167B for ; Thu, 14 Dec 2023 11:44:30 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.654491.1021429 (Exim 4.92) (envelope-from ) id 1rDk8Z-0001iq-DU; Thu, 14 Dec 2023 11:44:19 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 654491.1021429; Thu, 14 Dec 2023 11:44:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rDk8Z-0001gZ-6p; Thu, 14 Dec 2023 11:44:19 +0000 Received: by outflank-mailman (input) for mailman id 654491; Thu, 14 Dec 2023 11:44:17 +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 1rDk8X-00016v-Tc for xen-devel@lists.xenproject.org; Thu, 14 Dec 2023 11:44:17 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 1c0e4ffd-9a76-11ee-9b0f-b553b5be7939; Thu, 14 Dec 2023 12:44:16 +0100 (CET) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id A1EF04EE0746; Thu, 14 Dec 2023 12:44:15 +0100 (CET) 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: 1c0e4ffd-9a76-11ee-9b0f-b553b5be7939 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Nicola Vetrini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH 5/5] xen/wait: address violations of MISRA C Rule 11.9 Date: Thu, 14 Dec 2023 12:44:10 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 No functional change. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/common/wait.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/common/wait.c b/xen/common/wait.c index 86d3b15419db..cb6f5ff3c20a 100644 --- a/xen/common/wait.c +++ b/xen/common/wait.c @@ -125,7 +125,7 @@ static void __prepare_to_wait(struct waitqueue_vcpu *wqv) struct vcpu *curr = current; unsigned long dummy; - ASSERT(wqv->esp == 0); + ASSERT(wqv->esp == NULL); /* Save current VCPU affinity; force wakeup on *this* CPU only. */ if ( vcpu_temporary_affinity(curr, smp_processor_id(), VCPU_AFFINITY_WAIT) ) @@ -171,7 +171,7 @@ static void __prepare_to_wait(struct waitqueue_vcpu *wqv) [sz] "i" (PAGE_SIZE) : "memory", "rax", "rdx", "r8", "r9", "r10", "r11" ); - if ( unlikely(wqv->esp == 0) ) + if ( unlikely(wqv->esp == NULL) ) { gdprintk(XENLOG_ERR, "Stack too large in %s\n", __func__); domain_crash(curr->domain);