[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tvv7kzky7wdpef2s27fpvav6a7sbkmt45v7j63y4jirgq4sf7e@znv4p7d4u7is>
Date: Thu, 18 Sep 2025 16:00:42 +0200
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: David Laight <david.laight.linux@...il.com>
Cc: Nicolas Pitre <nico@...xnic.net>,
Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org, Oleg Nesterov <oleg@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, Biju Das <biju.das.jz@...renesas.com>
Subject: Re: [PATCH v3 next 05/10] lib: Add tests for
mul_u64_u64_div_u64_roundup()
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@...il.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.
Best regards
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists