public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kbuild@vger.kernel.org, mingo@kernel.org,
	tglx@linutronix.de, Andrew Morton <akpm@linux-foundation.org>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [RFC][PATCH] kernel: Replace timeconst.pl with a bc script
Date: Sat, 16 Feb 2013 00:41:30 +0100	[thread overview]
Message-ID: <511EC7AA.1040606@suse.cz> (raw)
In-Reply-To: <1360883635-25268-1-git-send-email-hpa@zytor.com>

Dne 15.2.2013 00:13, H. Peter Anvin napsal(a):
> Unfortunately switching to Perl required a really ugly "canning"
> mechanism to support Perl < 5.8 installations lacking the Math::BigInt
> module.

Yes, this was really ugly.


> It was recently pointed out to me that some very old versions of GNU
> make had problems with pipes in subshells, which was indeed the
> construct used in the Makefile rules in that version of the patch;
> Perl didn't need it so switching to Perl fixed the problem for
> unrelated reasons.  With the problem (hopefully) root-caused, we can
> switch back to bc and do the arbitrary-precision arithmetic naturally.

Great.

> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Michal Marek <mmarek@suse.cz>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> ---
>  kernel/Makefile     |  16 ++-
>  kernel/timeconst.bc | 108 +++++++++++++++
>  kernel/timeconst.pl | 376 ----------------------------------------------------
>  3 files changed, 120 insertions(+), 380 deletions(-)
>  create mode 100644 kernel/timeconst.bc
>  delete mode 100644 kernel/timeconst.pl
> 
> Comments appreciated; including the preferred way to merge this.

I can merge it into the kbuild tree if wanted. I only have one nipick:

> +/* Division by reciprocal multiplication. */
> +define fmul(b,n,d) {
> +       return (2^b*n+d-1)/d;
> +}

For readability reasons, I suggest to use the same formatting of
expressions and argument lists like in C:

define fmul(b, n, d) {
       return (2^b * n + d - 1) / d;
}

Otherwise, you can add

Acked-by: Michal Marek <mmarek@suse.cz>

Michal

  parent reply	other threads:[~2013-02-15 23:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14 23:13 [RFC][PATCH] kernel: Replace timeconst.pl with a bc script H. Peter Anvin
2013-02-15 12:01 ` Sam Ravnborg
2013-02-15 23:41 ` Michal Marek [this message]
2013-02-15 23:44   ` H. Peter Anvin
2013-02-16 22:03     ` Michal Marek
2013-02-16 22:10       ` H. Peter Anvin
2013-02-16 22:50         ` Michal Marek
2013-02-16  1:00   ` H. Peter Anvin

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=511EC7AA.1040606@suse.cz \
    --to=mmarek@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=tglx@linutronix.de \
    /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