From nobody Wed May 15 08:48:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1657109560; cv=none; d=zohomail.com; s=zohoarc; b=fXR9lAR7SFvaEJvw0rnLC9jZj8dWJdBFtPxiwYZinj2ACvQsV9gZIHLqpUVP935vIfL998gnggBVFGsdtxe+B40UawcmQpWQFVqB6bGn00LP1kwHGCQGd52jh/nw29IZbOT8rV3cNVPYPyQc4c8oBOa6cdmNOt1wcFns1HG8SA0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657109560; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=w2XRrjOrjpaz12Jeqf1YAACZjWuCue/f9szg5gZlJPQ=; b=Ht7NC6CQN58vUAz7PxwmmDVNBCGbTRd0Qbidfy8OS/mmI8SmiRWfTmgPz+y0RRfuzT+gBNqWuKxk6QQBdvz5m8RuVzx2iEgTJfkJyxHVNFDmrvroX59OiiXnVHWhydnY07dCgIQtZYwmbzRwFCa9YEcG+8PAebxrgByTQ8fa2cY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1657109560266266.09717721782306; Wed, 6 Jul 2022 05:12:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.362219.592166 (Exim 4.92) (envelope-from ) id 1o93sw-0001SL-6S; Wed, 06 Jul 2022 12:12:02 +0000 Received: by outflank-mailman (output) from mailman id 362219.592166; Wed, 06 Jul 2022 12:12:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o93sw-0001SE-3F; Wed, 06 Jul 2022 12:12:02 +0000 Received: by outflank-mailman (input) for mailman id 362219; Wed, 06 Jul 2022 12:12:01 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o93sv-0001S8-7e for xen-devel@lists.xenproject.org; Wed, 06 Jul 2022 12:12:01 +0000 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [2a00:1450:4864:20::433]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d639c0f4-fd24-11ec-bd2d-47488cf2e6aa; Wed, 06 Jul 2022 14:12:00 +0200 (CEST) Received: by mail-wr1-x433.google.com with SMTP id d16so15460646wrv.10 for ; Wed, 06 Jul 2022 05:11:59 -0700 (PDT) Received: from uni.. (adsl-146.37.6.170.tellas.gr. [37.6.170.146]) by smtp.googlemail.com with ESMTPSA id r12-20020a05600c35cc00b003a04e900552sm25651811wmq.1.2022.07.06.05.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 05:11:58 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: d639c0f4-fd24-11ec-bd2d-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w2XRrjOrjpaz12Jeqf1YAACZjWuCue/f9szg5gZlJPQ=; b=NP/L+f/O8awS0i+uldSRpWzqBMjnmJ7EyhXpdvSOXO/IEiTV/hvqcK4Oom9KNwSP03 r8t5ugr9gY+xOKQNQySQ1/iQEAmyKSih+5DMCxj1R+m22yL3nPc88FPKJv8/sAAqS2HN PfeZNLNZOh05x5AGpgKjIiIeVCn06Hj6QZlxmsBBLKgKP7OCNCHz2uJINtdjHIi90V4/ 2T+uwLWDnMTNSRp+5ieu9/chJgVn68NxHSyOTTaIjrSxM7hQvjhWkP44p9eMSe5pZcCz ersNPWw4VuH0ZE2cfZ4UP4QJSKAccRJORTQ9NoI+UZmCRCB8QLr+lmtJhyTGAxe+ptzm oZ9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w2XRrjOrjpaz12Jeqf1YAACZjWuCue/f9szg5gZlJPQ=; b=eOlWZ5A8bmJWDMRM8j7vZl6vTujV9IY5T62kgI/p3tQMzN976Ipvcrh9DQD/0AJI+1 EOLPbO5n5E8y1pQwFRetziS9dcRnt2Ep8Ett9QVIrZSQJmg3Es1JfUHPaayFnbbKYRni jqFrlN1h21iL52IqZLT+YpF+sG3slelcmnoLpq2pHVdcsuwKAWEz++asNdbrgu9b4Gtt NeHhLoOFbMmP2l2cUSqAvqB9oIS+gBmdRS3XH2iqeNvfCt4M+Z07p3bkG4YDzfK1IlrJ 2JL38oHj65ykW0anSD8L0h9Ho023NrLlP78kz8dCvk+y1Cy8AySsGJVk2SFANKfXvgF2 ZmzQ== X-Gm-Message-State: AJIora+TzBzk2gt0ZWhkQC6PUlIq28HcirVPGqjLtgZ27VCLItQlrADS K9qyhDLUZ2Lian+fIDp6uHKuGo5m5MA= X-Google-Smtp-Source: AGRyM1t6fjaKIMGCK85ynYVZJHCY4T0hBuhA458hbYRcey/UQZ5+Y/Swtlvh10Mc47OhNrPqDcGFZA== X-Received: by 2002:a5d:4f02:0:b0:21d:63f6:380c with SMTP id c2-20020a5d4f02000000b0021d63f6380cmr19362119wru.635.1657109518960; Wed, 06 Jul 2022 05:11:58 -0700 (PDT) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, julien@xen.org, Volodymyr_Babchuk@epam.com, bertrand.marquis@arm.com Subject: [PATCH v2] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violation Date: Wed, 6 Jul 2022 15:11:56 +0300 Message-Id: <20220706121156.666500-1-burzalodowa@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1657109560598100001 Content-Type: text/plain; charset="utf-8" Add the function prototype of show_stack() in header file so that it is visible before its definition in traps.c. Although show_stack() is referenced only in traps.c, it is declared with external linkage because, during development, it is often called also by other files for debugging purposes. Declaring it static would increase development effort. Add appropriate comment Signed-off-by: Xenia Ragiadakou Acked-by: Stefano Stabellini --- Changes in v2: - add a new line after show_stack() to make obvious to which set of functio= ns the comment is referring to. xen/arch/arm/include/asm/processor.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/arm/include/asm/processor.h b/xen/arch/arm/include/as= m/processor.h index 4188ec6bfb..55f56b33bc 100644 --- a/xen/arch/arm/include/asm/processor.h +++ b/xen/arch/arm/include/asm/processor.h @@ -558,7 +558,10 @@ extern register_t __cpu_logical_map[]; void panic_PAR(uint64_t par); =20 void show_execution_state(const struct cpu_user_regs *regs); +/* Debugging functions are declared with external linkage to aid developme= nt. */ void show_registers(const struct cpu_user_regs *regs); +void show_stack(const struct cpu_user_regs *regs); + //#define dump_execution_state() run_in_exception_handler(show_execution_s= tate) #define dump_execution_state() WARN() =20 --=20 2.34.1