From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0143145B51; Wed, 16 Oct 2024 16:03:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E02A402B8; Wed, 16 Oct 2024 16:03:25 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2043.outbound.protection.outlook.com [40.107.20.43]) by mails.dpdk.org (Postfix) with ESMTP id 8964740150 for ; Wed, 16 Oct 2024 16:03:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JeDxVdgOUPU3KOv/bGkMhiUaMaOn8ceRqc5Gwbl1qu86Y0nR2zSja+aEZ7E8GrX7fpF5bp6jik56EdQC/90shmYwrfGXp8O/c6QUqMfSXvqwPEK+CM01vuBd81DbupncnaE0SdWFPYL+fJ46iy3XRjFP0sfJ4sGDgWx7nyih2mfGjA/7ZDGjN03ypdxRDfGLOIUQ1/qNDBgbqoIZ39pcFPvpzFYe7C/S0fUrzFqsyqRLyCXdtnl9mYV+IOigSFeevLkC00Dcbj9O4k9Obg/T+uN4DVcTctLo+fK8nBEUZ+GYBg+pl5+ZK5DGVACwod4jPPpkOhRwPAJLlV230oLadw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=lHp867A9DU+SRwqBfE6C4uQSsqfmlY/wHsWcdlzy2Ic=; b=Ie70sGo2Cbzt8edKCKOVGus9HTRdEIFvL8hTClUTUqFDMCP8XOtk6ZbNTOOS+bdkQBpftxXjbiKznZsoJ1hF5z5NqU61N69NstngnSydVKHj67rVZ5Hcnjg7YMwwvfrTQOKRxfSp/mcCaMVdmAdqKi1B5CVslWFGV1R8Z71NV0IdBiRx24o+AdAbsY8xQ8o8oyE/p9Z9wDxsdQhv227FLq5qd7WI3aBoLQlc7kT3Y9xYAaPgzH7Kto8jyKKgYs7tXLzpwG5oeFHhgenDmOuyRwb1Z0pTavqaoVlSsl/HG4Sy6ou/sh5Hpc0ozK6DmDkJUfoIR0cJN9GA8fxvlv4EMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lHp867A9DU+SRwqBfE6C4uQSsqfmlY/wHsWcdlzy2Ic=; b=XgOYfy3HkqdZ/QejrGDtyWxFIeDy1qGd5XStm3ntRL+8n+0xTldBIrekVsXsF4VCqGrGNqZgwjCIJuxaKrGPP+uDSkAuM9uFGxy3tzb064wYwfXkMapkSDSMvvW0dG09cH1vmCpLMzXNwiTnYo21Cxny+UqfjdjHkaddAHexQIYUofo/J+ygFM1K4LdC0dsI5/h/VF9G5KkFhldZXiHrESDWwo20KL8MdXU90vwNLSNrY3PoKKlmjB1tn5Q/qLI/rB8DpH0FTOZ36XIzwUwArUH6eo4iiE3V1Bpk2FFmyWOgTXhHRb+gCZe4R4+oPy05fRvfl8n5y1b6uC68OonQlQ== Received: from DU2PR04CA0078.eurprd04.prod.outlook.com (2603:10a6:10:232::23) by PAWPR07MB9830.eurprd07.prod.outlook.com (2603:10a6:102:38d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Wed, 16 Oct 2024 14:03:18 +0000 Received: from DB1PEPF000509FC.eurprd03.prod.outlook.com (2603:10a6:10:232:cafe::31) by DU2PR04CA0078.outlook.office365.com (2603:10a6:10:232::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18 via Frontend Transport; Wed, 16 Oct 2024 14:03:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by DB1PEPF000509FC.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Wed, 16 Oct 2024 14:03:18 +0000 Received: from seliicinfr00050.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.67) with Microsoft SMTP Server id 15.2.1544.11; Wed, 16 Oct 2024 16:03:16 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id 3A60F1C006D; Wed, 16 Oct 2024 16:03:16 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: , David Marchand CC: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Subject: [PATCH 2/2] devtools: forbid the use of ffs compiler builtins Date: Wed, 16 Oct 2024 15:54:11 +0200 Message-ID: <20241016135411.827850-2-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241016135411.827850-1-mattias.ronnblom@ericsson.com> References: <20241016135411.827850-1-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF000509FC:EE_|PAWPR07MB9830:EE_ X-MS-Office365-Filtering-Correlation-Id: 8cc4b20d-4637-4dff-978d-08dcedeb4978 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?B?YnRtR2xMZVlqWTN3MGM0bmVtMTI1NFIzZWh2bUMzSXlmbk50OStiZlR4bUZO?= =?utf-8?B?TktQTUx4WjRPYTdBNlo0YnhkRVVuUWd5b0FMSUk4Y2pSMGoveGlDV0l4ZXUz?= =?utf-8?B?N21KVlZaQkUveWt2dTA4TXhwREd4bG1qSFFSamVhSVFVV3ArTDdjRmRhTkEr?= =?utf-8?B?bWxRb3o4bGlpckJ6dHNUUHpNdllEdzJER2F6ZjlLY3pmVUdoRFozY0ZnSHA3?= =?utf-8?B?Rk42aHpXb3RVcytTMDFGYU5CUVh5WE12TWJHdEJmQmhyQjNQK3JCRnVRN1BF?= =?utf-8?B?YmxZZkRvbHNGN1c5WFJ0d2VuWFFBZ1JuMjk1bG5TVEpGRDQweWRDbDdrb3Z3?= =?utf-8?B?d1hYaks2a3RoU2dOOTJNWEpGazYxNHQzOUFtNmZwa0JGdi9XMEVlTTRnc2E0?= =?utf-8?B?RDV5SDEzaXdITEo1c1VMZE5yWkg0ZHpJOVBuc0k5ZFh2RkRkMmRTMWRwdkQy?= =?utf-8?B?Q1BHRHFYYVF1bTVxS1hCOEN2S3JNWUhEMmtIazRadDZORExtankxTFBIRG11?= =?utf-8?B?aWZuVkJDbStCUG9aTHJjSDQ4TWxtcU14WW1xUjc5QkRPa25hT1V2ODdLRHVL?= =?utf-8?B?T0hadFBldEt6aDV2SWha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JlRDZmR2FzMS9HdDVSZkZ1WG1YWDNjNFBab1F3RUVzRmEw?= =?utf-8?B?RmE4bUF5RGNiNHE5UHlZT0FXamtLOGQ4a3VLNjVnTWpTVXFQRlZGUnlZSWxq?= =?utf-8?B?Q2wyVFV1b1FtTjJPUGZOY3lmdXNlaFJsR1pNZUJKUjdGaTZISStoenpVUVho?= =?utf-8?B?TUoxTzRrWnJYanI1QTVvVkd2bm9vRVNrZS8yTHVXV3p5c2F0VkRrWUtUYUdx?= =?utf-8?B?bm53WlI2Y3M2WDBNbzlzVWgyalFPa25oNjRoUzZhY2lraGZFOGN1d3F2dlpj?= =?utf-8?Q?cdpYf4zCmem7fxWDGdRloJsSVsxv4fxArEi60=3D?= X-Forefront-Antispam-Report: CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 14:03:18.4098 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8cc4b20d-4637-4dff-978d-08dcedeb4978 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF000509FC.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR07MB9830 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Extend checkpatches.sh to detect the use of __builtin_(ffs|ffsll). These intrinsics are not available in MSVC, and there are perfectly serviceable alternatives in . Signed-off-by: Mattias Rönnblom Suggested-by: David Marchand --- devtools/checkpatches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index c23792025a..411c40d275 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -179,7 +179,7 @@ check_forbidden_additions() { # # forbid use of non abstracted bit count operations awk -v FOLDERS="lib drivers app examples" \ - -v EXPRESSIONS='\\<__builtin_(clz|clzll|ctz|ctzll|popcount|popcountll)\\>' \ + -v EXPRESSIONS='\\<__builtin_(clz|clzll|ctz|ctzll|popcount|popcountll|ffs|ffsll)\\>' \ -v RET_ON_FAIL=1 \ -v MESSAGE='Using __builtin helpers for bit count operations' \ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ -- 2.43.0