linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib/math/test_div64: Fix error message formatting
@ 2021-04-21 13:25 Maciej W. Rozycki
  2021-04-21 14:15 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2021-04-21 13:25 UTC (permalink / raw)
  To: Arnd Bergmann, Thomas Bogendoerfer
  Cc: Huacai Chen, Huacai Chen, Jiaxun Yang, linux-arch, linux-mips,
	linux-kernel

Align the expected result with one actually produced for easier visual 
comparison; this has to take into account what the format specifiers 
will actually produce rather than the characters they consist of.  E.g.:

test_div64: ERROR: 10000000ab275080 / 00000009 => 01c71c71da20d00e,00000002
test_div64: ERROR: expected value              => 0000000013045e47,00000001

(with a failure induced by setting bit #60 of the divident).

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
---
 lib/math/test_div64.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-3maxp-div64/lib/math/test_div64.c
===================================================================
--- linux-3maxp-div64.orig/lib/math/test_div64.c
+++ linux-3maxp-div64/lib/math/test_div64.c
@@ -170,7 +170,7 @@ static inline bool test_div64_verify(u64
 	if (!test_div64_verify(quotient, remainder, i, j)) {		\
 		pr_err("ERROR: %016llx / %08x => %016llx,%08x\n",	\
 		       divident, divisor, quotient, remainder);		\
-		pr_err("ERROR: expected value=> %016llx,%08x\n",	\
+		pr_err("ERROR: expected value              => %016llx,%08x\n",\
 		       test_div64_results[i][j].quotient,		\
 		       test_div64_results[i][j].remainder);		\
 		result = false;						\

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] lib/math/test_div64: Fix error message formatting
  2021-04-21 13:25 [PATCH] lib/math/test_div64: Fix error message formatting Maciej W. Rozycki
@ 2021-04-21 14:15 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-04-21 14:15 UTC (permalink / raw)
  To: Maciej W. Rozycki
  Cc: Arnd Bergmann, Huacai Chen, Huacai Chen, Jiaxun Yang, linux-arch,
	linux-mips, linux-kernel

On Wed, Apr 21, 2021 at 03:25:22PM +0200, Maciej W. Rozycki wrote:
> Align the expected result with one actually produced for easier visual 
> comparison; this has to take into account what the format specifiers 
> will actually produce rather than the characters they consist of.  E.g.:
> 
> test_div64: ERROR: 10000000ab275080 / 00000009 => 01c71c71da20d00e,00000002
> test_div64: ERROR: expected value              => 0000000013045e47,00000001
> 
> (with a failure induced by setting bit #60 of the divident).
> 
> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
> ---
>  lib/math/test_div64.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-21 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 13:25 [PATCH] lib/math/test_div64: Fix error message formatting Maciej W. Rozycki
2021-04-21 14:15 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).