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 1CB11C001E0 for ; Mon, 23 Oct 2023 15:11:07 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.621535.968087 (Exim 4.92) (envelope-from ) id 1quwZo-0001T8-Ir; Mon, 23 Oct 2023 15:10:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 621535.968087; Mon, 23 Oct 2023 15:10:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1quwZo-0001T1-Fv; Mon, 23 Oct 2023 15:10:44 +0000 Received: by outflank-mailman (input) for mailman id 621535; Mon, 23 Oct 2023 15:10:43 +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 1quwZn-0001Sv-Fo for xen-devel@lists.xenproject.org; Mon, 23 Oct 2023 15:10:43 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5478fb0d-71b6-11ee-9b0e-b553b5be7939; Mon, 23 Oct 2023 17:10:41 +0200 (CEST) Received: from [192.168.1.9] (net-188-218-250-245.cust.vodafonedsl.it [188.218.250.245]) by support.bugseng.com (Postfix) with ESMTPSA id 76E364EE0747; Mon, 23 Oct 2023 17:10:40 +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: 5478fb0d-71b6-11ee-9b0e-b553b5be7939 Message-ID: <177e5404-bb86-466e-a23a-60098a477c5b@bugseng.com> Date: Mon, 23 Oct 2023 17:10:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [XEN PATCH 1/4] xen/arm: address violations of MISRA C:2012 Rule 13.1 Content-Language: en-US To: Julien Grall , Stefano Stabellini Cc: xen-devel@lists.xenproject.org, consulting@bugseng.com, Bertrand Marquis , Volodymyr Babchuk References: <31a926a09dfcef43d13a402fd3b235aeba48009d.1697638210.git.simone.ballarin@bugseng.com> <41d82896-5471-4eaa-8bdd-a192e28d5546@xen.org> <3de5e340-30bb-44aa-affd-89f343ed1fa1@bugseng.com> <7066a646-711c-4dce-f3c0-effb6ae91a39@xen.org> <67782815-7803-4ef5-80f4-db6181f7a6e2@bugseng.com> <15923aaf-c005-45fb-8bb4-50d2e0995f18@xen.org> <8734535a-0c00-44b4-8257-64155807b052@bugseng.com> From: Simone Ballarin Organization: BUGSENG In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 20/10/23 10:28, Julien Grall wrote: > Hi Stefano, > > On 19/10/2023 19:30, Stefano Stabellini wrote: >>>> We usually use this trick when 'current' is used multiple time to save >>>> process (using 'current' is not cost free). But in this case, this is >>>> renaming without any apparent benefits. >>>> >>>> If we wanted to go down this route, then this would likely want a >>>> comment. >>>> At which point we should just deviate. >>>> >>>> I will have a think if there are something else we can do. Could we >>>> consider >>>> to not address it for now? >>>> >>> >>> I totally agree. >> >> I am wondering if we could deviate "current" because even with the >> implementation using volatile we know it doesn't have "side effects" in >> the sense of changing things for other code outside the function. > > I will let Simone to confirm whether it is possible to do it from a > technical point of view. Yes, it is possible. > > Leaving the technical part aside, is the only violations are the one in > this patch? If so, I don't think it makes sense to deviate 'current' > globally. It would be better to have local deviations. > > Cheers, > For this specific case I agree in using a local deviation. In the next version of the patch, I will use a SAF comment. -- Simone Ballarin, M.Sc. Field Application Engineer, BUGSENG (https://bugseng.com)