From nobody Mon Feb 9 08:30:48 2026 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 1689158058859538.2044508112522; Wed, 12 Jul 2023 03:34:18 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.562212.878861 (Exim 4.92) (envelope-from ) id 1qJXAV-00084M-B2; Wed, 12 Jul 2023 10:33:59 +0000 Received: by outflank-mailman (output) from mailman id 562212.878861; Wed, 12 Jul 2023 10:33:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qJXAU-000837-Rb; Wed, 12 Jul 2023 10:33:58 +0000 Received: by outflank-mailman (input) for mailman id 562212; Wed, 12 Jul 2023 10:33:56 +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 1qJXAS-0006Dd-NG for xen-devel@lists.xenproject.org; Wed, 12 Jul 2023 10:33:56 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9a50ef10-209f-11ee-b239-6b7b168915f2; Wed, 12 Jul 2023 12:33:55 +0200 (CEST) Received: from beta.bugseng.com (unknown [37.161.151.90]) by support.bugseng.com (Postfix) with ESMTPSA id 7E3AD4EE0C88; Wed, 12 Jul 2023 12:33:54 +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: 9a50ef10-209f-11ee-b239-6b7b168915f2 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Gianluca Luparini , Jan Beulich , Paul Durrant , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Michal Orzel , Xenia Ragiadakou , Ayan Kumar Halder , Simone Ballarin Subject: [XEN PATCH v3 08/15] xen/pci: fix violations of MISRA C:2012 Rule 7.2 Date: Wed, 12 Jul 2023 12:32:09 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1689158060879100002 Content-Type: text/plain; charset="utf-8" From: Gianluca Luparini The xen sources contains violations of MISRA C:2012 Rule 7.2 whose headline states: "A 'u' or 'U' suffix shall be applied to all integer constants that are represented in an unsigned type". Add the 'U' suffix to integers literals with unsigned type and also to other literals used in the same contexts or near violations, when their positive nature is immediately clear. The latter changes are done for the sake of uniformity. Signed-off-by: Gianluca Luparini Signed-off-by: Simone Ballarin Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- Changes in v3: - change 'Signed-off-by' ordering Changes in v2: - minor change to commit title - change commit message --- xen/drivers/passthrough/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index 07d1986d33..95846e84f2 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -990,8 +990,8 @@ bool_t __init pci_device_detect(u16 seg, u8 bus, u8 dev= , u8 func) =20 vendor =3D pci_conf_read32(PCI_SBDF(seg, bus, dev, func), PCI_VENDOR_I= D); /* some broken boards return 0 or ~0 if a slot is empty: */ - if ( (vendor =3D=3D 0xffffffff) || (vendor =3D=3D 0x00000000) || - (vendor =3D=3D 0x0000ffff) || (vendor =3D=3D 0xffff0000) ) + if ( (vendor =3D=3D 0xffffffffU) || (vendor =3D=3D 0x00000000U) || + (vendor =3D=3D 0x0000ffffU) || (vendor =3D=3D 0xffff0000U) ) return 0; return 1; } --=20 2.41.0