[Letux-kernel] [PATCH] MIPS: Fix a longstanding error in div64.h

Maciej W. Rozycki macro at orcam.me.uk
Wed Apr 7 00:22:28 CEST 2021


On Tue, 6 Apr 2021, Zhou Yanjie wrote:

> So it seems not a compiler problem.

 This code is rather broken in an obvious way, starting from:

	unsigned long long __n;						\
									\
	__high = *__n >> 32;						\
	__low = __n;							\

where `__n' is used uninitialised.  Since this is my code originally I'll 
look into it; we may want to reinstate `do_div' too, which didn't have to 
be removed in the first place.

 Also commit e8e4eb0fbeda ("asm-generic/div64: Fix documentation of 
do_div() parameter") was an incomplete documentation fix.

 Huacai, thanks for your investigation!  Please be more careful in 
verifying your future submissions however.

  Maciej


More information about the Letux-kernel mailing list