From patchwork Fri Jun 21 13:40:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alessandro Zucchelli X-Patchwork-Id: 13707619 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 BB72DC27C4F for ; Fri, 21 Jun 2024 13:41:30 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 with 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 addressed 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[] = { 0x89, 0x4c, 0x5a, 0x4f, 0x00, 0x0d, 0x0a, 0x1a, 0x0a }; -#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)