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 E04F9A034E; Sun, 6 Feb 2022 01:45:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8BF1410FC; Sun, 6 Feb 2022 01:45:30 +0100 (CET) Received: from out203-205-221-231.mail.qq.com (out203-205-221-231.mail.qq.com [203.205.221.231]) by mails.dpdk.org (Postfix) with ESMTP id 6DAAA406A2 for ; Sun, 6 Feb 2022 01:45:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1644108323; bh=yE3+ny1ggFI55TQ6nGtZ6zfev6Sjf9aRUKeZGz4Nofw=; h=From:To:Subject:Date; b=Mf9YzwBcz+bASCqQcHuXAYP5Sg/POeGEkWx1xvXT/jyIVSVoNzZRiyfreAATTrwbs tJO5KCbvlOD5vZAsQNz1J2Dcz1RQTTZC1+Gp5UOS4iDNSWC6CS51gmdZ5lXJWd710/ /2TCVWDJW/iHiU7YKCUPHJ5aBjpBgSk2lLiAunMA= Received: from liwg-ubuntu.lan ([111.193.130.237]) by newxmesmtplogicsvrsza5.qq.com (NewEsmtp) with SMTP id B0E20ABF; Sun, 06 Feb 2022 08:44:14 +0800 X-QQ-mid: xmsmtpt1644108254tfu7qz1b7 Message-ID: X-QQ-XMAILINFO: MX+1SEN3H+wA5JwU9mjAHdkijtyTGV9yABb22IrTw09GtlyqIUKcz5o+Bt1h9Y WNSRwEGRMEaJHdSUMYDjoFqwGrN3+3jLQ5eKEgSVo5CKXnRrEW5mO8EI/9K1aExQGZXNaOBgYDuh Fm8rCQsnaAFjo1fTrKavXUaGLl5BK+lb9pmBMJ5EPFlHRIRmMEAQR9Qzfm1eq+9zmGyKPDlSFKeN M4l6S1rmovYqWHJteBS7Bkg2czWYttaCGxZ6DTjJhgdurWZWeXeHRKzNBbti4NCd2cp5DJubqyne nwSfw5PGrsYlb5VXK8VsT8qwRPsiB2t5FrVDumvulblaApiziRTO4N1YY3z5PgmGx6YHj/aIsS9J hoZj1PmnBKkA8sUkKoRSyy5Vd+12YKgol4iBS2YT9UGNibI4No3aAlNrKHOmKfgkqWsptD8sMCbu fxa7MH1PqjiiNdtLC+bdJciAxcns88B7CQLugHsAdJrDBR+Trngn35MZDDyRGYAbE6XPnqFhhKmB TnWeOAD8Z/Alqd3kWESUY+vhgxpGJnpmEY9/5eyoPGmqlbGsLm5brYH1yzAo2MDi+JSoVjHdKKU9 mWpjX1NlvyMjP6UahGUpTEs8TqO0TdeyVXxtmufaKEFBbMmIoT3MNHOiFnP8FOkzObSoaa/qALHw jxIwt/Fprw7ShiBbLjJG4ajZ7ZxyZbcLXzo5Ux8ykqz1BufF3q+J73aqayFWBtaXv/3zEaPINjVp Uksytrdoz9Dv/zgRoathBjoV4S8wpdsmVugP/rEzvApH1YbsqjlF4bdEHKKEhn+2g497DV28GZRv JMDEG4UgJFfGWl1ztPMPppKMpF8snsmP9lb6a9uoImUQ== From: Weiguo Li To: dev@dpdk.org Subject: [PATCH 0/6] fix the curly braces mismatch problem Date: Sun, 6 Feb 2022 08:44:08 +0800 X-OQ-MSGID: <20220206004414.2801177-1-liwg06@foxmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 To make C header file compatible with C++ linking, a conventional practice enclose the code with braces as below: #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endif Some alternative forms of "#ifdef __cplusplus", like "#if defined(__cplusplus)" or "# ifdef __cplusplus", also work. While it's suspicious when a header file matchs this regular expression "if.*__cplusplus" exactly once. The following script is used to find these files: grep -r ~/git/dpdk --include=*.h -e "if.*__cplusplus" -c|grep ":1$" Apart from two false positive cases, I found some real issues -- some missing the left brace parts, the others missing the right brace parts. In one of the cases, the c++ guard is removed since it's useless in private header as previous patch (http://dpdk.org/patch/98948) noted. For the other cases, the missing parts are supplemented. Weiguo Li (6): bus/dpaa: fix the curly braces mismatch problem common/mlx5: fix the curly braces mismatch problem net/cxgbe: fix the curly braces mismatch problem net/dpaa2: fix the curly braces mismatch problem eal/windows: fix the curly braces mismatch problem eventdev: remove C++ include guard from private header drivers/bus/dpaa/include/fsl_fman.h | 5 +++++ drivers/bus/dpaa/rte_dpaa_bus.h | 4 ++++ drivers/common/mlx5/windows/mlx5_win_defs.h | 5 +++++ drivers/common/mlx5/windows/mlx5_win_ext.h | 4 ++++ drivers/net/cxgbe/base/common.h | 5 +++++ drivers/net/dpaa2/dpaa2_sparser.h | 5 +++++ lib/eal/windows/include/dirent.h | 4 ++++ lib/eventdev/eventdev_pmd.h | 4 ---- 8 files changed, 32 insertions(+), 4 deletions(-) -- 2.25.1