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 171CCC35274 for ; Mon, 18 Dec 2023 15:05:47 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.656117.1024104 (Exim 4.92) (envelope-from ) id 1rFFBW-0005TD-MP; Mon, 18 Dec 2023 15:05:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 656117.1024104; Mon, 18 Dec 2023 15:05:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rFFBW-0005T6-Jh; Mon, 18 Dec 2023 15:05:34 +0000 Received: by outflank-mailman (input) for mailman id 656117; Mon, 18 Dec 2023 15:05:34 +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 1rFFBW-0005T0-5B for xen-devel@lists.xenproject.org; Mon, 18 Dec 2023 15:05:34 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e40ce329-9db6-11ee-98eb-6d05b1d4d9a1; Mon, 18 Dec 2023 16:05:33 +0100 (CET) Received: from [192.168.1.9] (net-37-182-35-120.cust.vodafonedsl.it [37.182.35.120]) by support.bugseng.com (Postfix) with ESMTPSA id 76E1C4EE0742; Mon, 18 Dec 2023 16:05:32 +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: e40ce329-9db6-11ee-98eb-6d05b1d4d9a1 Message-ID: Date: Mon, 18 Dec 2023 16:05:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/9] ACPI: address violations of MISRA C:2012 Rule 11.8 Content-Language: en-US To: Jan Beulich Cc: consulting@bugseng.com, Maria Celeste Cesario , xen-devel@lists.xenproject.org References: <44c8f94bcfe4f0e33e53a7eb8aef826e7d906196.1702555387.git.maria.celeste.cesario@bugseng.com> From: Simone Ballarin Organization: BUGSENG In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 14/12/23 17:36, Jan Beulich wrote: > On 14.12.2023 13:07, Simone Ballarin wrote: >> --- a/xen/include/acpi/acmacros.h >> +++ b/xen/include/acpi/acmacros.h >> @@ -116,7 +116,7 @@ >> #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) >> >> #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED >> -#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b))) >> +#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (const u32,(a)) == *ACPI_CAST_PTR (const u32,(b))) > > Hmm, I'm a little hesitant to take changes to this header. We've > inherited it from Linux, who in turn inherited / imported it from > ACPI CA. > >> #else >> #define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE)) >> #endif > > What about this alternative code, btw? > > Jan > If the file is not supposed to be changed, I would consider adding it in docs/misra/exclude-list*. For the moment, I think it is better to drop the change. -- Simone Ballarin, M.Sc. Field Application Engineer, BUGSENG (https://bugseng.com)