Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1365911imm; Wed, 17 Oct 2018 19:06:17 -0700 (PDT) X-Google-Smtp-Source: ACcGV610c+sxG7mgF7N6y4gYzHNveIHaszans4OVFe0Ql0s/Zz1/Cq4GqmE+O3xpfQ527IsI0b6y X-Received: by 2002:a17:902:68:: with SMTP id 95-v6mr8522015pla.57.1539828377193; Wed, 17 Oct 2018 19:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539828377; cv=none; d=google.com; s=arc-20160816; b=qCFeBsA7gK+NHKGUR5d6K+nS8X6AkI/CB4A80X7B/AWEne1bGg8VYwK2MsrExI2tgz uw7I0zFEedR08ba5IQ6BmScG2k6r8/P7/Qf4mrDlCw7Pr34e7KWXVblv9NN8gcUfIZ+Z qWqyIqs/wauZaId+2BFwsoLon6jjqOQ3P2rIMlUtMSBRS86mxpnvXD/giqb5h+vfUX/z xNum/mhKTpJ+R3bZk0wmO12yU+sePt/E0unN7ygJ1WaaGdxoexTQ3DuawfoRKq3ElX15 VOjTmjD7y5nfbpFJ3GQdaYzfYUQqY3DUbwqRp1mQsGwJtQgvZmONI1EYh0P+/t5f2+2p Fh+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=bt/X4wsqITjm6ohSB27MNgPC9TagVEYi42wOl852drw=; b=hsqk7JLBgJFekJXYjD26YXh+6j2Chs8xyWIxO8+t306Qa7MAR5eB1s9fTDn9Djm8PJ +LpDgYIIviyotPwb5D0BhyW8iypPBBFvGbHb4WPcPpbAImvE8JvCwXK9LqFCr1/NjWY7 AbhOGGagGxO6AXsu0eX7l95Jc/orLD2h4tS6+bPd7QViLtwFiVSMshEbaXQYAaFa1iXq ptMKQBHYVFK7xamBcTnZcnrnMtkdg4Ldp51751S8tYn+ASJxEXPLMbvy5v3h191/iOdV S3pnyr9bSSfi11b8Hyxb/rzmUVlVQ84iAYiBxpwDWBikg5hn3I8JHjbw24Pc1Oht142A maSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s8wlDWgg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 12-v6si19721807pgq.337.2018.10.17.19.06.01; Wed, 17 Oct 2018 19:06:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s8wlDWgg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727469AbeJRKCb (ORCPT + 99 others); Thu, 18 Oct 2018 06:02:31 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:39105 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727299AbeJRKCb (ORCPT ); Thu, 18 Oct 2018 06:02:31 -0400 Received: by mail-ot1-f66.google.com with SMTP id l58so28256217otd.6; Wed, 17 Oct 2018 19:03:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=bt/X4wsqITjm6ohSB27MNgPC9TagVEYi42wOl852drw=; b=s8wlDWggG7AWd9H2GCj06G/U9Ui6XFn6/zIqS8TLwgzW7lxLQjtSIHDRQ6dQcORU0A yBfjWDllIHCuxbUCa0tlQUBfpRknOkqL+J7+RIfqmIhds4bqarqpEmItV0xEuvoqbxxU YXYroJOHqp0ZpUZ2bjdMishqHdWr7o50dItu8YI8SbKZqHbBDLYBeiQKaEuxyVdH0tiS GWoEaxzCa8Db9g95Xak+t2L3PuvBhLrafE2rsp7h47z+e5JWZVyp/sciZ7p5VjzbqQIH LK+hVLmx8jmd5FOFeRdb14YkDfhdDRI0lzwQcaXG9i9pNh/iPCtdwEzXbuivfk3DQEFj OOdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=bt/X4wsqITjm6ohSB27MNgPC9TagVEYi42wOl852drw=; b=nVlwKmLjvxoKsY+I+mZEWkbpFitYIc9aoYw2m6HHHUyzNZdCTkzBL9a8jA6DmClOlW hpBkyAGN97oXIKdL/sX+15QBG867+uHZ7nvyMIeimt2Rx9uWqFCEU3+exHRy2j5qncKX s4ERzD6/svR0+YeNEYbfmpb8G1qOgt8/6FZri7kzX0IqD6tPE0VEHBgNY80YUzQ5yUSn Fh50iOO6pD070iINcmZbkZVZ56Cajp5JJzKigdMTELvZuZN49vcoyEkrDL7P6PmTD8QR ghZlBj8e8RMopb13gxJMigTs12llmu4M20YUXeWLx12uRPAXlcpFwXIc+UNSBVAtyuyp zkAg== X-Gm-Message-State: ABuFfoih0aS29zGAAM5yo6YrJHDOwZ0f2oYqxrC6elpvtp6KpPHl8o0M o6y9nHQC9RHXcfsvq6z5ZE5PxElkEaovOphO5xM= X-Received: by 2002:a9d:948:: with SMTP id 66mr18657431otp.178.1539828237609; Wed, 17 Oct 2018 19:03:57 -0700 (PDT) MIME-Version: 1.0 References: <20181017000912.GA21339@WindFlash> In-Reply-To: From: Leonardo Bras Date: Wed, 17 Oct 2018 23:03:46 -0300 Message-ID: Subject: Re: [Lkcamp] [PATCH 3/4] kbuild: Removes unnecessary shadowed local variable and optimize testing. To: helen@koikeco.de Cc: lkcamp@lists.libreplanetbr.org, x86@kernel.org, linux-kbuild@vger.kernel.org, Matthew Wilcox , linux-kernel , Masahiro Yamada , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Michal Marek , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Helen, On Wed, Oct 17, 2018 at 12:06 AM Helen Koike wrote: > > Hi Leonardo, > > On 10/16/18 9:09 PM, Leonardo Br=C3=A1s wrote: > > Removes an unnecessary shadowed local variable (start). > > Optimize test of isdigit: > > - If isalpha returns true, isdigit will return false, so no need to= test. > > This patch does two different things, it should be in two separated patch= es. Sure, no problem. > > > > > Signed-off-by: Leonardo Br=C3=A1s > > --- > > scripts/asn1_compiler.c | 7 +++---- > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c > > index c146020fc783..08bb6e5fd6ad 100644 > > --- a/scripts/asn1_compiler.c > > +++ b/scripts/asn1_compiler.c > > @@ -413,7 +413,7 @@ static void tokenise(char *buffer, char *end) > > > > /* Handle string tokens */ > > if (isalpha(*p)) { > > - const char **dir, *start =3D p; > > + const char **dir; > > > > /* Can be a directive, type name or eleme= nt > > * name. Find the end of the name. > > @@ -454,10 +454,9 @@ static void tokenise(char *buffer, char *end) > > > > tokens[tix++].token_type =3D TOKEN_TYPE_N= AME; > > continue; > > - } > > + } else if (isdigit(*p)) { > > + /* Handle numbers */ > > Actually you can't do that, p is being altered in the first if statement. Yeah, you are right. I will remove this logic for v2. > > > > > - /* Handle numbers */ > > - if (isdigit(*p)) { > > /* Find the end of the number */ > > q =3D p + 1; > > while (q < nl && (isdigit(*q))) > > > > Regards > Helen Thanks! Leonardo Br=C3=A1s