From nobody Fri Nov 22 06:16:11 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; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1718977299555559.0707431587488; Fri, 21 Jun 2024 06:41:39 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.745264.1152405 (Exim 4.92) (envelope-from ) id 1sKeVj-0005bJ-RF; Fri, 21 Jun 2024 13:41:03 +0000 Received: by outflank-mailman (output) from mailman id 745264.1152405; Fri, 21 Jun 2024 13:41:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sKeVj-0005bC-Ob; Fri, 21 Jun 2024 13:41:03 +0000 Received: by outflank-mailman (input) for mailman id 745264; Fri, 21 Jun 2024 13:41:02 +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 1sKeVi-0005b6-P6 for xen-devel@lists.xenproject.org; Fri, 21 Jun 2024 13:41:02 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e563ec7a-2fd3-11ef-90a3-e314d9c70b13; Fri, 21 Jun 2024 15:41:00 +0200 (CEST) Received: from delta.bugseng.com.homenet.telecomitalia.it (host-87-17-171-46.retail.telecomitalia.it [87.17.171.46]) by support.bugseng.com (Postfix) with ESMTPSA id A38BA4EE0738; Fri, 21 Jun 2024 15:40:58 +0200 (CEST) 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: e563ec7a-2fd3-11ef-90a3-e314d9c70b13 From: Alessandro Zucchelli To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Alessandro Zucchelli , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini Subject: [PATCH v2] common/unlzo: address violation of MISRA C Rule 7.3 Date: Fri, 21 Jun 2024 15:40:47 +0200 Message-Id: <847f9b715b3c8e2ba0637fdd79111f4f828389c6.1718976211.git.alessandro.zucchelli@bugseng.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1718977302200100001 Content-Type: text/plain; charset="utf-8" This addresses violations of MISRA C:2012 Rule 7.3 which states as following: the lowercase character `l' shall not be used in a literal suffix. The file common/unlzo.c defines the non-compliant constant LZO_BLOCK_SIZE w= ith having a lowercase 'l'. It is now defined as '256*1024L'. No functional change. Signed-off-by: Alessandro Zucchelli Reviewed-by: Stefano Stabellini --- Changes from v1: Instead of deviating /common/unlzo.c reports fro Rule 7.3 they are addresse= d by changing the non-compliant definition of LZO_BLOCK_SIZE. --- xen/common/unlzo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/unlzo.c b/xen/common/unlzo.c index bdcefa95b3..acb8dff600 100644 --- a/xen/common/unlzo.c +++ b/xen/common/unlzo.c @@ -52,7 +52,7 @@ static inline u32 get_unaligned_be32(const void *p) static const unsigned char lzop_magic[] =3D { 0x89, 0x4c, 0x5a, 0x4f, 0x00, 0x0d, 0x0a, 0x1a, 0x0a }; =20 -#define LZO_BLOCK_SIZE (256*1024l) +#define LZO_BLOCK_SIZE (256*1024L) #define HEADER_HAS_FILTER 0x00000800L #define HEADER_SIZE_MIN (9 + 7 + 4 + 8 + 1 + 4) #define HEADER_SIZE_MAX (9 + 7 + 1 + 8 + 8 + 4 + 1 + 255 + 4) --=20 2.34.1