[U-Boot] [PATCH] linux/compat.h: port lower_32_bits and upper_32_bits from Linux

Wolfgang Denk wd at denx.de
Sat Jun 7 00:12:57 CEST 2014


Dear Lijun Pan,

In message <1402085108-11841-1-git-send-email-Lijun.Pan at freescale.com> you wrote:
> lower_32_bits and upper_32_bits are very useful while programming.

"is very useful" is not enough reason to add any code.

Where are the actual users of these functions?  We will not add dead
code.

> +/**
> + * upper_32_bits - return bits 32-63 of a number
> + * @n: the number we're accessing

Hm... This comment is definitely wrong for the Power Architecture,
where bit 0 is always the most significan bit, so upper_32_bits would
reutn bits 0...31.

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
Children are natural mimics who act like their parents despite  every
effort to teach them good manners.


More information about the U-Boot mailing list