From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57578C433FE for ; Thu, 10 Dec 2020 12:23:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 115A223C82 for ; Thu, 10 Dec 2020 12:23:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728565AbgLJMXA (ORCPT ); Thu, 10 Dec 2020 07:23:00 -0500 Received: from nautica.notk.org ([91.121.71.147]:45286 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726904AbgLJMXA (ORCPT ); Thu, 10 Dec 2020 07:23:00 -0500 Received: by nautica.notk.org (Postfix, from userid 1001) id EC1A9C009; Thu, 10 Dec 2020 13:22:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1607602937; bh=k0CJucuVEz8HkH9kDdldXKj+LZNAj5vMfQmKkCtAcss=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IR/Rvsqg4HBjqHubGfpZhml4heRwRBqXy8woFQzNeSoB2l2EILEI0SGWLhos2ulVa +3wvpxgnW/VINWXN21+RhWCAu10NsefiNeJsApO4EZQeYyvQQ+gPeZM9CF+vjbUl2U x9FDVfwUP48hbyJXOE5U+GIVUCAlKT3JYQ0Rt4BNENlGAE+egRaOKxs7h/fwr3o+DE LJnOs1Y0F+Y3J/ud1oatfveIcQFBs7YmCIS9Z/jvy2KptzGBckP0amCgkRzA81iDID 8G8VteAyM8uG/RBNj6RNnEIc+/7wg1t9+cTOyv2kIHNT22SkUEkiqld5Bp7QVkCl2O mSUiGPx4UYhqg== Date: Thu, 10 Dec 2020 13:22:02 +0100 From: 'Dominique Martinet' To: Vincenzo Frascino Cc: David Laight , Masahiro Yamada , Michal Marek , "linux-kbuild@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Krzysztof Kozlowski Subject: Re: [PATCH 1/2] ld-version: use /usr/bin/env awk for shebank Message-ID: <20201210122202.GA8323@nautica> References: <1606828650-29841-1-git-send-email-asmadeus@codewreck.org> <69c82aee-59ec-f8d8-9546-b38f85bf08c0@arm.com> <20201209174252.GA27721@nautica> <5ca5c3bb23614af0a35f01f1e3a84ead@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Vincenzo Frascino wrote on Thu, Dec 10, 2020: > On 12/9/20 10:03 PM, David Laight wrote: >> Why bother with awk? I wanted to keep the patch minimal, I'm not opposed to rewriting but that always potentially has more impact (although as you say, this script is simple enough) > > I think you can do it all in a shell function. > > Something like: > > read line > > line=${line##*)} > > line=${line##*version } > > IFS='.-' > > set $line > > echo $(($1*100000000 + $2*1000000 + $3*10000)) > > > > That will work on any recent shell. Works for me. > I would suggest to revert the patch for now since we are close to the merge > window and then maybe in -rc1 start discussing a better solution. As far as I can see the patch is only in -next, as said earlier I'm in favor of just dropping the patch until a decision is taken for the next merge window (or the one after that); there's no hurry for me and nothing to revert. -- Dominique