From: David Laight <david.laight.linux@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Nicolas Pitre <nico@fluxnic.net>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Biju Das <biju.das.jz@bp.renesas.com>
Subject: Re: [PATCH v3 next 05/10] lib: Add tests for mul_u64_u64_div_u64_roundup()
Date: Thu, 18 Sep 2025 22:06:20 +0100 [thread overview]
Message-ID: <20250918220620.13e74f27@pumpkin> (raw)
In-Reply-To: <tvv7kzky7wdpef2s27fpvav6a7sbkmt45v7j63y4jirgq4sf7e@znv4p7d4u7is>
On Thu, 18 Sep 2025 16:00:42 +0200
Uwe Kleine-König <u.kleine-koenig@baylibre.com> wrote:
> Hello David,
>
> On Tue, Jun 17, 2025 at 12:30:17AM -0400, Nicolas Pitre wrote:
> > On Sat, 14 Jun 2025, David Laight wrote:
> >
> > > Replicate the existing mul_u64_u64_div_u64() test cases with round up.
> > > Update the shell script that verifies the table, remove the comment
> > > markers so that it can be directly pasted into a shell.
> > >
> > > Rename the divisor from 'c' to 'd' to match mul_u64_add_u64_div_u64().
> > >
> > > It any tests fail then fail the module load with -EINVAL.
> > >
> > > Signed-off-by: David Laight <david.laight.linux@gmail.com>
> >
> > I must withdraw my Reviewed-by here.
> >
> > > /*
> > > * The above table can be verified with the following shell script:
> > > - *
> > > - * #!/bin/sh
> > > - * sed -ne 's/^{ \+\(.*\), \+\(.*\), \+\(.*\), \+\(.*\) },$/\1 \2 \3 \4/p' \
> > > - * lib/math/test_mul_u64_u64_div_u64.c |
> > > - * while read a b c r; do
> > > - * expected=$( printf "obase=16; ibase=16; %X * %X / %X\n" $a $b $c | bc )
> > > - * given=$( printf "%X\n" $r )
> > > - * if [ "$expected" = "$given" ]; then
> > > - * echo "$a * $b / $c = $r OK"
> > > - * else
> > > - * echo "$a * $b / $c = $r is wrong" >&2
> > > - * echo "should be equivalent to 0x$expected" >&2
> > > - * exit 1
> > > - * fi
> > > - * done
> > > +
> > > +#!/bin/sh
> > > +sed -ne 's/^{ \+\(.*\), \+\(.*\), \+\(.*\), \+\(.*\), \+\(.*\) },$/\1 \2 \3 \4 \5/p' \
> > > + lib/math/test_mul_u64_u64_div_u64.c |
> > > +while read a b d r d; do
> >
> > This "read a b d r d" is wrong and that breaks the script.
>
> I think apart from that problem the series is fine, isn't it? Given that
> I wait for some time to be able to use the mul_u64_u64_div_u64_roundup()
> variant, I would very appreciate your effort to end in this patch set
> going in. Do you plan to address this issue? If not, I offer to look
> into it and create the next revision for this series.
The series doesn't currently apply due to a conflicting change.
So does need a new version.
I did start trying to do it, but have been busy.
I'll try to find some time.
David
>
> Best regards
> Uwe
next prev parent reply other threads:[~2025-09-18 21:06 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-14 9:53 [PATCH v3 next 00/10] Implement mul_u64_u64_div_u64_roundup() David Laight
2025-06-14 9:53 ` [PATCH v3 next 01/10] lib: mul_u64_u64_div_u64() rename parameter 'c' to 'd' David Laight
2025-06-14 9:53 ` [PATCH v3 next 02/10] lib: mul_u64_u64_div_u64() Use WARN_ONCE() for divide errors David Laight
2025-06-14 15:17 ` Nicolas Pitre
2025-06-14 21:26 ` David Laight
2025-06-14 22:23 ` Nicolas Pitre
2025-06-14 9:53 ` [PATCH v3 next 03/10] lib: mul_u64_u64_div_u64() simplify check for a 64bit product David Laight
2025-06-14 14:01 ` Nicolas Pitre
2025-06-14 9:53 ` [PATCH v3 next 04/10] lib: Add mul_u64_add_u64_div_u64() and mul_u64_u64_div_u64_roundup() David Laight
2025-06-14 14:06 ` Nicolas Pitre
2025-06-14 9:53 ` [PATCH v3 next 05/10] lib: Add tests for mul_u64_u64_div_u64_roundup() David Laight
2025-06-14 15:19 ` Nicolas Pitre
2025-06-17 4:30 ` Nicolas Pitre
2025-09-18 14:00 ` Uwe Kleine-König
2025-09-18 21:06 ` David Laight [this message]
2025-06-14 9:53 ` [PATCH v3 next 06/10] lib: test_mul_u64_u64_div_u64: Test both generic and arch versions David Laight
2025-06-14 15:25 ` Nicolas Pitre
2025-06-18 1:39 ` Nicolas Pitre
2025-06-14 9:53 ` [PATCH v3 next 07/10] lib: mul_u64_u64_div_u64() optimise multiply on 32bit x86 David Laight
2025-06-14 15:31 ` Nicolas Pitre
2025-06-14 9:53 ` [PATCH v3 next 08/10] lib: mul_u64_u64_div_u64() Separate multiply to a helper for clarity David Laight
2025-06-14 15:37 ` Nicolas Pitre
2025-06-14 21:30 ` David Laight
2025-06-14 22:27 ` Nicolas Pitre
2025-06-14 9:53 ` [PATCH v3 next 09/10] lib: mul_u64_u64_div_u64() Optimise the divide code David Laight
2025-06-17 4:16 ` Nicolas Pitre
2025-06-18 1:33 ` Nicolas Pitre
2025-06-18 9:16 ` David Laight
2025-06-18 15:39 ` Nicolas Pitre
2025-06-18 16:42 ` Nicolas Pitre
2025-06-18 17:54 ` David Laight
2025-06-18 20:12 ` Nicolas Pitre
2025-06-18 22:26 ` David Laight
2025-06-19 2:43 ` Nicolas Pitre
2025-06-19 8:32 ` David Laight
2025-06-26 21:46 ` David Laight
2025-06-27 3:48 ` Nicolas Pitre
2025-07-09 14:24 ` David Laight
2025-07-10 9:39 ` 答复: [????] " Li,Rongqing
2025-07-10 10:35 ` David Laight
2025-07-11 21:17 ` David Laight
2025-07-11 21:40 ` Nicolas Pitre
2025-07-14 7:06 ` David Laight
2025-06-14 9:53 ` [PATCH v3 next 10/10] lib: test_mul_u64_u64_div_u64: Test the 32bit code on 64bit David Laight
2025-06-14 10:27 ` [PATCH v3 next 00/10] Implement mul_u64_u64_div_u64_roundup() Peter Zijlstra
2025-06-14 11:59 ` David Laight
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=20250918220620.13e74f27@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=biju.das.jz@bp.renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nico@fluxnic.net \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=u.kleine-koenig@baylibre.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