Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3815762pxu; Mon, 12 Oct 2020 01:42:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR7RFUbANo+Wlcq06SViabfw9gYqiz8nL9lWchYdLAxKZt9fn9r1lgfDlp9u1HVS6nM493 X-Received: by 2002:a50:a6cf:: with SMTP id f15mr7744056edc.30.1602492154894; Mon, 12 Oct 2020 01:42:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602492154; cv=none; d=google.com; s=arc-20160816; b=yh8T1koiHGnhbjHa4xDX2pPw9boXfjKTvaoxboG2uTAjhbC4TvuDPF33yscAi2wBhd 1qFtV5J6R8SubgMV+JeUdkjS/gqhyaBk299iSwZVwMEKzaHEG7UfYHVHzECkHSUtnboB cJriSu8ZGW2ln0tsU/4ogA5Anff1B3pfZpFXsXBEX+iGpu7MHYRvLnhDny0wvsPfz7Su GpoHcE2wWnf9qG8oC3udGgAe0tJkIzLoxbt45iw3cq7ukGG9xwDd61WyFNxULo4CutRk awURb5kU5iyZACwh3tQLYOR9SwIwgC3aGX5ECv7uWctMmn44Lr7yQT+fdzi0ZO9kbf00 P7gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=nsVkSggzJsF+UOiBsSvNe29lbMSYvfImfwaEHUyOjC8=; b=nVXpNXVg+Q8VaLHO7vpfCQKHZY5sqNNKPTQY76rxWGVx0L6dqV3gAgJ1twsqR5oPod +CczgUkYczALLbby0uNDxT/LlkP9BO6GW8iaoocDSYxjJxxpOkEyFgd88cOCw9rZR3SR zhNncOu4CckFRwcnEV+QjDHHk/5xzuboHInNbeOjXL7nLCJpqjT9YP/YcSyQ2kLpAWuW GDNulXgzPuxfsnPEU19BPpT5G4r9AMYcHWHw/s/+yJALMWzCrQwhdn2dFBYV5a0L75lk w95x769gAxBEKZamaSDFHfbfRGBSOm8dHFGp6WiWDM5T8izS3+TcFA7tpEixwZXiFP1k jFXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ng7si11600954ejb.699.2020.10.12.01.42.12; Mon, 12 Oct 2020 01:42:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727172AbgJLIib (ORCPT + 99 others); Mon, 12 Oct 2020 04:38:31 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:5449 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgJLIib (ORCPT ); Mon, 12 Oct 2020 04:38:31 -0400 X-IronPort-AV: E=Sophos;i="5.77,366,1596492000"; d="scan'208";a="472083358" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 10:38:29 +0200 Date: Mon, 12 Oct 2020 10:38:29 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Sumera Priyadarsini cc: Julia.Lawall@lip6.fr, michal.lkml@markovi.net, linux-doc@vger.kernel.org, Gilles.Muller@lip6.fr, corbet@lwn.net, nicolas.palix@imag.fr, linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr Subject: Re: [Cocci] [PATCH v4 1/3] scripts: coccicheck: Add quotes to improve portability In-Reply-To: <76ca49efc2ec4b8279e70c4bc4052fb7b543bc86.1602410019.git.sylphrenadin@gmail.com> Message-ID: References: <76ca49efc2ec4b8279e70c4bc4052fb7b543bc86.1602410019.git.sylphrenadin@gmail.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 11 Oct 2020, Sumera Priyadarsini wrote: > While fetching the number of threads per core with lscpu, > the [:digit:] set is used for translation of digits from 0-9. > However, using [:digit:] instead of "[:digit:]" does not seem > to work uniformly for some shell types and configurations > (such as zsh). > > Therefore, modify coccicheck to use double quotes around the > [:digit:] set for uniformity and better portability. > > Signed-off-by: Sumera Priyadarsini Applied, thanks. > --- > scripts/coccicheck | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/coccicheck b/scripts/coccicheck > index 6789751607f5..d67907b8a38b 100755 > --- a/scripts/coccicheck > +++ b/scripts/coccicheck > @@ -76,7 +76,7 @@ else > fi > > # Use only one thread per core by default if hyperthreading is enabled > - THREADS_PER_CORE=$(lscpu | grep "Thread(s) per core: " | tr -cd [:digit:]) > + THREADS_PER_CORE=$(lscpu | grep "Thread(s) per core: " | tr -cd "[:digit:]") > if [ -z "$J" ]; then > NPROC=$(getconf _NPROCESSORS_ONLN) > if [ $THREADS_PER_CORE -gt 1 -a $NPROC -gt 2 ] ; then > -- > 2.25.1 > > _______________________________________________ > Cocci mailing list > Cocci@systeme.lip6.fr > https://systeme.lip6.fr/mailman/listinfo/cocci >