mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kstewart@linuxfoundation.org, pombredanne@nexb.com,
	tglx@linutronix.de, gregkh@linuxfoundation.org,
	linux-arm-kernel@lists.infradead.org,
	Tony Lindgren <tony@atomide.com>, Keerthy <j-keerthy@ti.com>
Subject: Re: [PATCH] Replace unnecessary perl with sed, printf, and the shell $(( )) operator.
Date: Mon, 16 Apr 2018 07:19:11 -0500	[thread overview]
Message-ID: <70d3e6cb-2ea3-1006-9af8-126cd3ea7fbb@landley.net> (raw)
In-Reply-To: <20180416120930.GS16141@n2100.armlinux.org.uk>

On 04/16/2018 07:09 AM, Russell King - ARM Linux wrote:
> On Wed, Apr 11, 2018 at 08:38:37PM -0500, Rob Landley wrote:
>> You can build a kernel in a cross compiling environment that doesn't have perl
>> in the $PATH. Commit 429f7a062e3b broke that for 32 bit arm. Fix it.
...
> This looks more complicated than necessary, and therefore less readable.
> What's wrong with:
> 
> KBSS_SZ := $(shell echo $$(($$($(CROSS_COMPILE)nm $(obj)/../../../../vmlinux | \
> 		sed -n -e 's/^\([^ ]*\) B __bss_start$$/-0x\1/p' \
> 		       -e 's/^\([^ ]*\) B __bss_stop$$/+0x\1/p') ))
> 
> The sed command produces output such as:
> 
> -0xc0955e58
> +0xc10b0f9c
> 
> which the shell is then able to evaluate and produce a decimal number.
> This seems to work fine with both bash and dash.

Yes, that is better.

Acked-by: Rob Landley <rob@landley.net>

Thanks,

Rob

      reply	other threads:[~2018-04-16 12:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12  1:38 Rob Landley
2018-04-16 12:09 ` Russell King - ARM Linux
2018-04-16 12:19   ` Rob Landley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70d3e6cb-2ea3-1006-9af8-126cd3ea7fbb@landley.net \
    --to=rob@landley.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=j-keerthy@ti.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=pombredanne@nexb.com \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®