From nobody Sat Apr 20 12:04:09 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+96530+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1669092484951416.93279000491475; Mon, 21 Nov 2022 20:48:04 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id uzuDYY1788612xoeQHlmbx23; Mon, 21 Nov 2022 20:48:03 -0800 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.67]) by mx.groups.io with SMTP id smtpd.web11.11695.1669092482783769830 for ; Mon, 21 Nov 2022 20:48:03 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FjozWaSFJMoCwSMuL9nyzoTbUTXkC2W7M480wWeDVzI9zMKaEy4B5reSa1RxkxxSJF8LukNTa/3jAUZPu0fjV/qPVdscJUsE6c3lqF8FzgjxN/XlWgUgKTgV3PYtPrDG7Yd7licjukFCR4A6oGk087z8+yddtPCZzS0x4QPZJn/NxAlGXhuehDRjYSf0x//mGd93mnCjcqAhN07n8RtFIBHVG0HbLk0nXwQNH7/CUpBbSt89791JueXXaPQ6Y5v/SldP13JflciruQ6F9X95ZJN98jDUkfWv7YFycTIjkDpJ6E9Q+Ho+kx4Qfdy7rGkymjkXcfP+HokUPw9uhHvGfw== 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=e9Ollg+xBnCWh5cfAk1uNJLzR1p0hgOQ3zloVK+DdKs=; b=d2nHKFYer7vufLtR2/uF3gLr0E/74xPf38in3rn1W35co5yglNChfEcWf4A1hSwrdgQBvFXLM9HmK4BrmOW2qc3zi2oBcnmxbzN/Ix3Mj4+5IuCRv1uamIqfooe4ATcaThi1ZcVmjTbDrG0e0yGvzdTzutIC3DEhvBm1ZVG6k7iKEnb5z2nNsXQgZNpamwcgRdUOIlWVglfKlvpfkF5ywuaXmYY9cn1X+Tpn+rSxjZC/ZSTs7kNI3s8CDj+DiLgBSfhIwvtdXn++XZLxJQW9wRdgXIX2JgjLYCZWFJGqHiGyPLUeNcqIYCKST/IVBWKHqc3jefgRYb8yvOma/emYVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from BN0PR02CA0007.namprd02.prod.outlook.com (2603:10b6:408:e4::12) by BL1PR12MB5779.namprd12.prod.outlook.com (2603:10b6:208:392::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 04:48:01 +0000 X-Received: from BN8NAM11FT097.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e4:cafe::1d) by BN0PR02CA0007.outlook.office365.com (2603:10b6:408:e4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15 via Frontend Transport; Tue, 22 Nov 2022 04:48:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.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+96530+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT097.mail.protection.outlook.com (10.13.176.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5834.8 via Frontend Transport; Tue, 22 Nov 2022 04:48:00 +0000 X-Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 21 Nov 2022 22:47:28 -0600 From: "Chang, Abner via groups.io" To: CC: Ray Ni , Michael D Kinney Subject: [edk2-devel] [PATCH] edk II C Coding Standard: Remove section 5.4.2.2 STATIC Date: Tue, 22 Nov 2022 12:47:08 +0800 Message-ID: <20221122044708.672-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT097:EE_|BL1PR12MB5779:EE_ X-MS-Office365-Filtering-Correlation-Id: e9676bea-199c-4733-3e98-08dacc44bbe8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: KxJT4fZxwcQmJ267YNYqZ0ZpPkme8n2MieorU8BVysuhxfPdR6J9AXCYkB5tf8R7Fb1NB19/QjLUWdeeYMDFmmMraggJZ4SDyMnatv95PORg5Kd3Ejf3GsodMZoqvPfAjzDfLVrftSGp0J+1sMdTYRV55Bk6WV51pFlD/y2ZI1B0uGHkGlPg20pzcHmA0anfQcerOs9O8bpqR1Z1UHlBtBxn8YljTO8YSQOI9FHjhhuA8JgIZT032EwQI4+kue4UE1gda/J9G2QOAg9EOTO9P5ZTMQ/Iz3rGAHB2aumjgjUkArvVoCg5toN2tSSUQzj/8i0WYF2Ig9FfdyRXXbdkKWbiqd9fSKdsGiPT1pyGMFp65GSDRFHNsm9DQCZ8QAw11tmjxXBHePuJBHFpZ9t0kixZQ+Hp/BZHf69yaVo9SpDa/WiVRMzapZgVaJblj9LeCd1gFXsGNRs8Cx/Awtj1VARegBWSnuplv+wHULXLnH2RP0kr+bDmAkl+Nh6fx+GISt2lAukXi3X3PDRItV7p4HWxPxNHRgq6Q0Irhcw3Ou4jjgTJcuLZ4YDDt6aPt9a0j9ZjIwg6ZGifVSv9BUDHof+YgfvRYJUqybrSJFvj6C5Fnn1IHQ+zCvpc9eaYJSIv8jKhkuPfHNoNob6XxzTWvsky6eGiHxyuP8rZmgS95RROOUjYkXE5JEawZFTFNfiU9Oo6sVZgmwEMxrRGv7QUulmKMF1WMbffoklAazLwBag= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 04:48:00.8279 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9676bea-199c-4733-3e98-08dacc44bbe8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT097.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5779 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,abner.chang@amd.com X-Gm-Message-State: tVxb5xS7XbFCOIoymnmXnh5Ex1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1669092483; bh=dtX0fW1BDZdFGHlyjiOeqwo431NUNPJH6MPLobhbivY=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=rO0eeV+qJM3yptncVnoQAmBTBGbnOWjwGmIyblG7X8UBIx5m0kiqCW8ttOjIBbDhH2s WCCTZMPjgkpgCHQf4aWokIca1V+pv7hFPbSZRjuTZE8zepftFaSOsd+J6eMrNQm1Zia17 Ucv3sv0QNswlAr6qZaamGNo7jGF7paW6SUM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1669092486449100003 Content-Type: text/plain; charset="utf-8" From: Abner Chang BZ #1766 Remove the entire 5.4.2.2 section. We are not allowed to use upper-case STATIC in the source file now. Just follow C standard and use the lower-case 'static'. Leave the macro "#deifne STATIC static" there without removing it to keep the backward compatable. Signed-off-by: Abner Chang Cc: Ray Ni Cc: Michael D Kinney --- 5_source_files/54_code_file_structure.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/5_source_files/54_code_file_structure.md b/5_source_files/54_c= ode_file_structure.md index 0c4d6a2..9acc620 100644 --- a/5_source_files/54_code_file_structure.md +++ b/5_source_files/54_code_file_structure.md @@ -267,19 +267,3 @@ specified in Section 5.4.1.3 "Compile-Time Names". Thus, while it might be legal C, do **not** declare external variables any= where other than at the top level of a file as specified by this document. =20 -#### 5.4.2.2 Static - -An object declared `STATIC` has either file or block scope. - -##### 5.4.2.2.1 Do not reuse an object or function identifier with static = storage duration. - -Throughout the set of source files defined within a single .inf file, do n= ot -reuse an identifier with static storage duration. The compiler may not be -confused by this, but the user may confuse unrelated variables with the sa= me -name. - -##### 5.4.2.2.2 Functions should not be declared STATIC. - -Some source-level debuggers are unable to resolve static functions. Until = it -can be verified that no one is dependent upon a debugger with this limitat= ion, -it is strongly recommended that functions not be declared static. --=20 2.37.1.windows.1 -=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 (#96530): https://edk2.groups.io/g/devel/message/96530 Mute This Topic: https://groups.io/mt/95190239/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-