[U-Boot] [PATCH v2] ARM: Use do_div() instead of division for "long long".

Wolfgang Denk wd at denx.de
Tue Sep 9 23:07:47 CEST 2008


Dear Guennadi Liakhovetski,

In message <Pine.LNX.4.64.0809092249070.9737 at axis700.grange> you wrote:
> 
> > +	do_div(val, (data[i][0] - data[i-1][0]));
> 
> Looking at how do_div() is defined, and it handles its parameters 
> carefully, one shouldn't need the extra parenthesis here, i.e.,

The are not exactly need (and actually a remainder from  the  copy  &
paste of the old code), but on the other hand they don't hurt either,
and they make the argument's easier to parse, at least to my eyes.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Felson's Law:
	To steal ideas from one person is plagiarism; to steal from
	many is research.


More information about the U-Boot mailing list