From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f50.google.com (mail-it0-f50.google.com [209.85.214.50]) by dpdk.org (Postfix) with ESMTP id 06B112BE5 for ; Sat, 15 Sep 2018 21:07:51 +0200 (CEST) Received: by mail-it0-f50.google.com with SMTP id u13-v6so6501825iti.1 for ; Sat, 15 Sep 2018 12:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qwilt-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Xl+cRnxozikFBC9zAHiSW3L6j0fqunZmAVWvg0x0oHQ=; b=eO1G2Z00wGmb3WtoW/GysVEdJkZlpfNWjr6h8DZ9Tnq1LGw7lcGezcXvbEg2zA9g5D eygl2gv3yMEiU/GAQu8E2wHpUdIw2/Ff57XgY4gpZP/V5zdLSde2P9sC4B8sWNeimLRU dk1Pgue1I+drJ00N9epytsTYXqmgmpsuexdlQT+EUwej6qcsBCDhF+Xp+2iBPy3n8gpD Wvxzjomej+6KX/Bl/geVSTfgh19BC6U+S/bOr540rsHR7H5qbpFLNUVsn/r1U6jixOAc jS7TclY0SwG3X9S5dRwKtfORGnXO+jLUrZ0T4giFa8/goHAyOubtQD1JXORqGM+wcFx0 KLJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Xl+cRnxozikFBC9zAHiSW3L6j0fqunZmAVWvg0x0oHQ=; b=pBQDTeTIQyRDRtKgxx4wfpjAAHSVM3PYYkAr5HAhmd75KJcvcQgXaS7Op3tDj7w+pR NvFrgnrzP3pbV5MVzNBqFYRxulNbwAX97SIiT3uQRjm3im7zi2N/sYW8Y9x3eZR62j7Q UuiYdGJVQ45rYpkWuCph8n1QDrlEePP5TDiLSD0/Ng3astq23xatkgE9fjB2HeTZlHlV Wzl9J/ZC/zp18Uv8Viz4fiK2hxrTFb71SjqsSTUD3Ogi91nDJwv9dyEEk+oPsW51FKzs wz2vM5FE2fG/bPUKNKpdbu5/TV3hAr8U8iLvG1X/2iIsh9ZI+ONdoJ2zKogEpBOrdPJ8 rfTQ== X-Gm-Message-State: APzg51A7muDDBMVdFlHLAX/aPO64GHC5Ca+Gi9sLon+Kv4UDQm3Z9rJQ BzXYHEX2tltH/njWDA3v+UeUEt5kRY2g8ZpDq9Oa9A== X-Google-Smtp-Source: ANB0VdaYCqNgxQ7VUQJt6+p9uOY1c9Be1dKqvhxaLu1O4aLyJQ2JvSaik8ZsJh0FC70tqr6coOmHfhRcKqcHCujthdo= X-Received: by 2002:a02:4add:: with SMTP id s90-v6mr16447609jad.21.1537038471201; Sat, 15 Sep 2018 12:07:51 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:fd08:0:0:0:0:0 with HTTP; Sat, 15 Sep 2018 12:07:50 -0700 (PDT) In-Reply-To: <6831653.AvvoQPlBBt@xps> References: <20180815153346.11495-1-i.maximets@samsung.com> <6831653.AvvoQPlBBt@xps> From: Arnon Warshavsky Date: Sat, 15 Sep 2018 22:07:50 +0300 Message-ID: To: Thomas Monjalon Cc: Ilya Maximets , dev@dpdk.org, Stephen Hemminger Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] devtools: don't use bash extension in checkpatches 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: , X-List-Received-Date: Sat, 15 Sep 2018 19:07:52 -0000 > HI > > > > Let's use single quotes instead of variable. > > > > > > Using the script directly with single quotes loses the ability to reuse > it > > with an additional set of folders , expressions and RET_ON_FAIL. > > I don't know awk. Please could you explain what we are loosing and why? > The awk script was written with intention to be called with future optional various folders and banned expressions. The optional reuse takes place inside the function check_forbidden_additions( ) with different instances passed to the awk script that is loaded using the apparently unfriendly -d. (currently only rte_panic) If we move the parameters to the outer function, i.e check_forbidden_additions( params ...) then there is no problem calling the awk script with single quotes > > > If we wish to keep the awk code in this file and not in a separate file, > > maybe receiving the awk script parameters from the function > > check_forbidden_additions( ) can also preserve the ability to reuse in > > future cases. > > Yes I feel we could add some parameters to this function. > And yes, we could move the awk script in a separate file. > Actually, it would be better to keep checkpatches.sh as a wrapper script > calling various tools. > I was under the wrong impression the opposite was desired, so yes, moving the entire awk code to a separate file would indeed be the cleanest. thanks /Arnon