Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7700213rwn; Wed, 14 Sep 2022 03:07:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR6hwieJCs5YAGLM83yvEOAmIErxFaL2Sd74JdaKS45Gysv2HY7tuhru12N4h13MxGwgZaiO X-Received: by 2002:a63:470e:0:b0:438:a091:5a3b with SMTP id u14-20020a63470e000000b00438a0915a3bmr19819523pga.332.1663150078629; Wed, 14 Sep 2022 03:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663150078; cv=none; d=google.com; s=arc-20160816; b=fm6hqM45PIGZBTR9gvT6RtfqnXBPWDuRZLtbk4A7KhckW3cP7O6Fca8H9Pg+p9Ts8o bXYWhE8qOJYDiAqPU4sAFEnw4j8JmU94RalxhyOS1q3vdl0h85e8EzXoW7J/NcQGFg2v tacGSiaKbU9Xqe/d9jCVWt03cbEGMalishop5LbGUE7XwUttr4A44MJVZuYU9+CnEK2b pWstdE9/g0sUOFfc9hnyQP1Tl7E+3Ypn9mzM98xM4mrWELQlGFRE5Gk/W1DRuaW3JINR Sizx8MTpgl+jYstDFUX61PpObHaLOfUqtQu8dqB9r6C0Zt0zlBDMdLxLgk1I9jjaLHgR SHag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=IyPSxEJ+s9xNJPhWGce9/Yt+TvwkOPAHMt3pT7YpLh0=; b=SgDpSLF2qaioRPAy0zBeE2llRA5aSZgJxzlsonjsOjl4RJCXua7JR/Xsp9NEzzSNYk sCP6zoCdaYgptLd+E+4V39/tvvgc6n1/tFQBZTjDZvDdXbN3nHsu51FiSM7cRm4xnUM7 jh5nB2QtaisH6KylyPuRF4X61ijlZXv1QPrziwCBq6f/C4iUyUv71ImOK2hvVo3IFJz0 hezMIpc5CKHJrGg4c3I4zLo14v3VfAdk4EuUoWH0Ww6pgB1SZnHWXSenRyEWmQIYCrog yDl7LAq3BGNNo+4C9Nl9DQq/aPRAW+L7gNk2+lHvRfmCRbH1+IUBFUQXiZKA2I1dOhF7 riFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f32-20020a635560000000b0042bd12ceb82si14258822pgm.348.2022.09.14.03.07.46; Wed, 14 Sep 2022 03:07:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230454AbiINJqW convert rfc822-to-8bit (ORCPT + 99 others); Wed, 14 Sep 2022 05:46:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230414AbiINJqR (ORCPT ); Wed, 14 Sep 2022 05:46:17 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78C2F57223 for ; Wed, 14 Sep 2022 02:46:13 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-97-cVSXdUInMX6xYwzzN9bkjA-1; Wed, 14 Sep 2022 10:46:10 +0100 X-MC-Unique: cVSXdUInMX6xYwzzN9bkjA-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Wed, 14 Sep 2022 10:46:08 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.040; Wed, 14 Sep 2022 10:46:08 +0100 From: David Laight To: 'Nathan Chancellor' , Masahiro Yamada CC: "linux-kbuild@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arch@vger.kernel.org" Subject: RE: [PATCH 05/15] kbuild: build init/built-in.a just once Thread-Topic: [PATCH 05/15] kbuild: build init/built-in.a just once Thread-Index: AQHYx0ts+NPkxXYHC0WeQrq6VU/re63erc0g Date: Wed, 14 Sep 2022 09:46:08 +0000 Message-ID: <87548726b6cc4f518836db38d45a04f2@AcuMS.aculab.com> References: <20220828024003.28873-1-masahiroy@kernel.org> <20220828024003.28873-6-masahiroy@kernel.org> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ... > > +VERSION=$(cat .version) 2>/dev/null && > > +VERSION=$(expr $VERSION + 1) 2>/dev/null || > > +VERSION=1 What's wrong with: VERSION=$(($(cat .version 2>/dev/null) + 1)) If you are worried about .version not containing a valid number and $((...)) failing then use ${VERSION:-1} later. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)