From nobody Wed Nov 13 11:05:00 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+105184+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16848470957311009.504639733444; Tue, 23 May 2023 06:04:55 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fl9BYY1788612x64fcFnbq6W; Tue, 23 May 2023 06:04:55 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.57]) by mx.groups.io with SMTP id smtpd.web10.21871.1684847093410720117 for ; Tue, 23 May 2023 06:04:53 -0700 X-Received: from DU2PR04CA0073.eurprd04.prod.outlook.com (2603:10a6:10:232::18) by DB3PR08MB8820.eurprd08.prod.outlook.com (2603:10a6:10:438::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Tue, 23 May 2023 13:04:45 +0000 X-Received: from DBAEUR03FT035.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:232:cafe::3b) by DU2PR04CA0073.outlook.office365.com (2603:10a6:10:232::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Tue, 23 May 2023 13:04:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+105184+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT035.mail.protection.outlook.com (100.127.142.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.14 via Frontend Transport; Tue, 23 May 2023 13:04:44 +0000 X-Received: ("Tessian outbound 3a01b65b5aad:v136"); Tue, 23 May 2023 13:04:44 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 11422318ec9da45a X-CR-MTA-TID: 64aa7808 X-Received: from f35e45dbfabe.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 468A759B-22DD-4B7D-AC47-886E5A1E1C21.1; Tue, 23 May 2023 13:04:33 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f35e45dbfabe.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 23 May 2023 13:04:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OfB4TRYKeM3SBMCHOfJ3fviL8xOuV1vLqdZpnGLVdcjIzFY7BVsRntuaMRkJaj7+GUvHIWiSXw/e428GRcNpimWieaZEnJzCy5kOiBCZqqUKr7AOfTt4RYJg68j5Ikb6+R/0rMxwx8uumibMshgmC0ViIzKP4SGXzEiqjngdxS7/fw7L7B7gIuDpmyB4wnTBAwfCLjUSNAeJpXXzvotJwITIDTg3hv8/MyAQqE83JbT5iVsP1WFSbwmjv+fv+WAscjlpwsAzguB+DrHrh1Zv3AU1ZYSeDiihIb6TCcC0wgVMKKdO25qoYrbe/mvC1Bg80XwIqDIHPKzgUa8emCDoUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CDsdIUErr5xs1zf3WLqrTh9p7VYyGHvcDdTjR/tZT1o=; b=Sw1enXVHaP9O4aSTB12uTy17RjQG6Q5X41KDsGXGlUAdhqgZ2YRdjj6PlJ4UYo9vXXlnMMjGwwptON8HL0m6z22w9QQBjxAVE7fUI5wqqwQDMHLXDwybZ51GeMOQr0cPfvkZNM0C3lXPFEOXXVmVPjizqtUQW8Tq1wFVqIGP0r6jwy1y74jBzXa3lJItikIfnepcjYAklxFnpYCTf0ri95oD6Tp879uiNPl9iV7P6riE0Nt2OuhDbI9QlLJHNvQh06RRLWAtQGLXnakR4GARWDk1W1KcYdRYnJ4FN9Lk9rvrSY97zmly8Zd9mp2OVWe5nkpwFEGNlOTUeKni/j2bIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from AS8P251CA0026.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::17) by GV2PR08MB9349.eurprd08.prod.outlook.com (2603:10a6:150:da::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Tue, 23 May 2023 13:04:29 +0000 X-Received: from AM7EUR03FT033.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2f2:cafe::37) by AS8P251CA0026.outlook.office365.com (2603:10a6:20b:2f2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Tue, 23 May 2023 13:04:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C X-Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT033.mail.protection.outlook.com (100.127.140.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6433.14 via Frontend Transport; Tue, 23 May 2023 13:04:29 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 23 May 2023 13:04:25 +0000 X-Received: from E114225.Arm.com (10.1.196.36) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Tue, 23 May 2023 13:04:24 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v1 04/12] ArmPkg: Fix Non-Boolean comparison in ArmGicEnableDistributor Date: Tue, 23 May 2023 14:04:13 +0100 Message-ID: <20230523130421.10804-5-sami.mujawar@arm.com> In-Reply-To: <20230523130421.10804-1-sami.mujawar@arm.com> References: <20230523130421.10804-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT033:EE_|GV2PR08MB9349:EE_|DBAEUR03FT035:EE_|DB3PR08MB8820:EE_ X-MS-Office365-Filtering-Correlation-Id: 1895ee7d-1440-4d34-ef22-08db5b8e47ae x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Uo1wDQTqXKyn215esUduxeT5pMPouCoDyFtqiBLb8DAo3p+rmVp5iuKvKhcstNk8l6Sd0amKkG3D/lyy+yXGwgW3wFFMauiKMgsaJDiJl9btn3MMKuHB3ageRl6qU4KJ4k0SdSjjLRUuH70Os3xXPAxNrUDqU3PFIeoORg8Wg10xxPEqXAAVmKgSmJo5Klu2Vi0U0uZmg/ZKBAwnu/lwslEFAQrITx464oI2Mhtp/b+pc/zDPVXCU9buOgS8SxH7aZr7qP1p8ryPMoJh5AI15TSJxD1J6mWflerM9UqlDEQCaOzMniIqKQjxl4bpR/tKML7jv5ZYRYLc3rC2hIkRpFRrs3wlDV6nRUOhgt4pV2uAljDkbynHJbZtahnho7SbAplWxxbHslPi9WCOBmb9Li+9jjEUrh0NL/ZV0S2yN+bssKBtKdk66SPn8aArsR+7xAvCvlaFWWuS8O0wPAeqhLxCVnQQL3FWnfR7gXYR/rBCOBvpiRLFWzLVHBA2JgjrsGtC+8MoG6nqCNp1vEW+nkOlgn086UcwJedpE7K55lB5KzVP0BqhdJhObfyD1mQwK8Yb3vO5jRdotzZXP0BV08ynvJL00JZ230uFkfcq+B71X7Z0FrCL1uVHvdUA4kHyylLfhe6YT1rJIvZIvfuWs6ySCOy9I1qcAMObVBl+Fj25sqtSfRe+co4f5PErhEmLKHgL1vfb3ch5pZLS/NWmVzw+jlNPFMkUvyo5PezhNSn5Cmhk1XEUgY3Ue4MIE1xc X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(346002)(136003)(39860400002)(451199021)(46966006)(40470700004)(36840700001)(966005)(478600001)(7696005)(6666004)(54906003)(36860700001)(426003)(47076005)(336012)(40480700001)(83380400001)(2616005)(36756003)(40460700003)(86362001)(6916009)(4326008)(82310400005)(186003)(1076003)(316002)(2906002)(26005)(82740400003)(356005)(81166007)(70206006)(70586007)(8936002)(8676002)(5660300002)(44832011)(41300700001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB9349 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT035.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 71b8014d-5447-4a55-9a93-08db5b8e3e93 X-Microsoft-Antispam-Message-Info: E5qDnYQvmRqWtxhwOmcfMvelNfRMJ5Qbb/zkyBSsesVvvzyGTrs3OHvdcZ0sEc3uBPXOfI8DGnHyfwWXi1fvhrjF+K53dDWzawWzAhge8m0GAO6Wi3mdUE/lbxqhgvyJlzVMf2QMmTV7cIOwIoV6f0PYEnEMuYViuCK3UUcGA58DDD148hgRrfjNNt+QtNtMy2es04KXfjdiw/D4VLt8J87pft4sY8KZKOTjFIDrZzNhp0GFe7bTbM/p2KzP71w+dvIR0wrvIUcOSwETGbAot4fmZT9A1bKYCEszl0h2k855VCgDxV2gZlCcpHmtihwwJ9vK1cQzLh7Tidg57vTUC0nQ59F44dHKZrJDAX42r38fZpqMwSjvOG4NbrEFyiLBvPqBbJbEjQiLT07D5NifKl5HUorQq6+uXjDjRSRTn9KT71E0h/z6O8MxPhMNrHlPFEX6rm9LAuGLrLqg3SIWxRjhKm+j7laQzHfUBnYQyqbipBS8L/7XavScsJ37fRq8W61RhGfg/4EJT38ptJvvMzyatb5GgFdiEU8Gs+2nfhFzb9OrM7nDUROW7E30N4C1a9TUxZ6T2peVjRw0sBKniR/raA0JAFPDyISeV0zao1aNrV8NBaoNa28+mVFYucOWCdlEGkZXIgRexeaHGx8bUBcyvPYUztqPF1g9mherH3QDH2v/CBOoMiTt0ZMrVo3ZtTiC+QniKo72ass1fh+mMCWi6PG8+CptU3hpPXF1nFg= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 13:04:44.9187 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1895ee7d-1440-4d34-ef22-08db5b8e47ae X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT035.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR08MB8820 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: 4RfNxPgYuUDSYwQsVKPw2Vvyx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684847095; bh=klCTBtmIIEfSygY+ye20KGymuC/WBIFNl1VK11WYOOs=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=smAwI6LuNFy13Ve3crhnz2ir/yt2cKKsA0XOKt6lcRIkQErrEcC4pKyyk6eCNFuEBBX +0wtOc+BT/P9PnoKPOGNZaS/RbemlE6vt4rQGa4TA+cG/N/D32vaLOsOPMQk1pjjGVYPH 0+ahcFeNihCWng1AznGHy/Do6UoR87XhaJg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684847096433100007 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" According to edk2 coding standard specification, Non-Boolean comparisons must use a compare operator (=3D=3D, !=3D, >, < >=3D, <=3D). See Section 5.7.2.1 at https://edk2-docs.gitbook.io/ edk-ii-c-coding-standards-specification/5_source_files/ 57_c_programming Therefore, fix the comparison in ArmGicEnableDistributor() Signed-off-by: Sami Mujawar --- ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c b/ArmPkg/Drivers/ArmGi= c/ArmGicNonSecLib.c index c17cbe041e8a9ceb8c8c3a6b953ff88b75f6f206..1ca66a40940434d6d89e243650f= 3e81aa3f588b5 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c @@ -26,7 +26,10 @@ ArmGicEnableDistributor ( if (Revision =3D=3D ARM_GIC_ARCH_REVISION_2) { MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1); } else { - if (MmioRead32 (GicDistributorBase + ARM_GIC_ICDDCR) & ARM_GIC_ICDDCR_= ARE) { + if ((MmioRead32 ( + GicDistributorBase + ARM_GIC_ICDDCR + ) & ARM_GIC_ICDDCR_ARE) !=3D 0) + { MmioOr32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x2); } else { MmioOr32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1); --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#105184): https://edk2.groups.io/g/devel/message/105184 Mute This Topic: https://groups.io/mt/99086468/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-