From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E0B0DA04A4; Sun, 24 May 2020 20:30:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96B671D44F; Sun, 24 May 2020 20:30:51 +0200 (CEST) Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by dpdk.org (Postfix) with ESMTP id B06A71BC25 for ; Sun, 24 May 2020 20:30:50 +0200 (CEST) Received: by mail-pj1-f68.google.com with SMTP id cx22so7626762pjb.1 for ; Sun, 24 May 2020 11:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rkbOEMPlH7eEe9U4I2649sndgTq3cqEU2e545BP7kvE=; b=LlkPGYtOGVVgRgVDAEiHxFgnTriKQ/VhBLdt52K755uWOR7zJMurp2q+oNFw0bgSbK Zd4mPw78J2OLxt9We3NJunYjzFuO8NWqQdYmCV9IKZSbMId2UNUYyapNPocwePiLLZJi O7BmwfSX3xTt6lgqrjezT5dZdCTSVQDGjOhEPYzGpE/nvfs7yXDLCiSf30onIehXeblt FMiR0TH9whnK3pCY5/M53o2fMIzsjGTCJ1ouGM8jM+ws/X6fWpCdoVfo8B7jlaFhHEsO Cp37dpRt6OClK09bFLAwnhS3m4eQ4ZfOP1cNNsbXyGHWVRKRveeOrKCIcPh+gDWTlsAi yTwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rkbOEMPlH7eEe9U4I2649sndgTq3cqEU2e545BP7kvE=; b=sHd2RPZNMm7Vy6pedL8SJtuaJo3SfFinBOT2RGLy0C1g/T31RP66CKxONhkMCzAtS8 KK4TuGZHl+ufoFccdDYIzXgRjE1XmZRq3kQ3pj/2c7wL/LEC6nEJOSAq/dXsz5IxCx40 6dzKxxlpI8phMQqyLh+xaBoUDCjHTq0hEryTzbUU5ISftGCHaN+HG9a5ZgoApMxhdNlY v7luOvzPAhy+RsPvMXkfDOZd4UTmze6Pbl+nMGDadR/NXPje3/KzE67hGBXufam2BJa8 n1gQ2Qm33wEddQowtOsL51RlFuX6vFoP8x5F5Ws1aHqkB/1KWhDDs2WXQxTuXzXnuH0f lP8Q== X-Gm-Message-State: AOAM5301eaxUY0lQ44lKLxUmbEsCutroS6x9V0lb0cO8wjGEJ5Y5AWXH e2aVov1UHsaprBYDlZCp/ZN1ow== X-Google-Smtp-Source: ABdhPJwaY/iFudTDx5w//6ni3bCz+PGsNKkiBmlztFcGpc63fHH8bE0rA74V0NNHLA+XgOCIHutsjA== X-Received: by 2002:a17:902:bc82:: with SMTP id bb2mr4089403plb.107.1590345049640; Sun, 24 May 2020 11:30:49 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id s1sm6248754pjp.27.2020.05.24.11.30.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2020 11:30:49 -0700 (PDT) Date: Sun, 24 May 2020 11:30:41 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com, bruce.richardson@intel.com, John McNamara , Marko Kovacevic , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Gagandeep Singh , Hemant Agrawal , Sachin Saxena , Harini Ramakrishnan , Omar Cardona , Pallavi Kadam , Ranjit Menon Message-ID: <20200524113041.78ead9c9@hermes.lan> In-Reply-To: <20200524173007.1653549-1-thomas@monjalon.net> References: <20200217222654.2218926-1-thomas@monjalon.net> <20200524173007.1653549-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] devtools: forbid variable declaration inside for X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, 24 May 2020 19:30:07 +0200 Thomas Monjalon wrote: > Some compilers raise an error when declaring a variable > in the middle of a function. This is a C99 allowance. > Even if DPDK switches globally to C99 or C11 standard, > the coding rules are for declarations at the beginning > of a block: > http://doc.dpdk.org/guides/contributing/coding_style.html#local-variables > > This coding style is enforced by adding a check of > the common patterns like "for (int i;" > > The occurrences of the checked pattern are fixed: > 'for *(\(char\|u\?int\|unsigned\|s\?size_t\)' > In the file dpaa2_sparser.c, the fix is to remove the unused macros. > > Signed-off-by: Thomas Monjalon Surprised that checkpatch doesn't enforce this already. Or maybe kernel flags are different.