[U-Boot] [PATCH 0/3 v2] ARM: OMAP: replace custom sr32() by standard I/O accessors

Wolfgang Denk wd at denx.de
Tue Mar 25 14:49:47 CET 2014


This patch series replaces the custom bit manipulation function sr32()
by standard I/O accessors.  A major motivation for this cleanup was
the fact that a number of calls of that function resulted in 32 bit
wide shift operations on u32 data, which according to the C-ISO
IEC-9899-Standard provokes undefined behaviour:

	6.5.7 Bitwise shift operators
	...
            If the value of the right operand is negative or is
            greater than or equal to the width of the promoted left
            operand, the behavior is undefined.

The code was built-tested for all TI boards (using "./MAKEALL -v ti")
without errors or warnings.

Signed-off-by: Wolfgang Denk <wd at denx.de>
Cc: Tom Rini <trini at ti.com>
Cc: Albert ARIBAUD <albert.u.boot at aribaud.net>

Wolfgang Denk (3):
  ARM: OMAP: remove sr32() from OMAP board code
  ARM: OMAP: hide custom bit manipulation function sr32()
  ARM: OMAP: replace custom sr32() by standard I/O accessors

 arch/arm/cpu/armv7/omap3/board.c            |   4 +-
 arch/arm/cpu/armv7/omap3/clock.c            | 355 ++++++++++++++++------------
 arch/arm/cpu/armv7/syslib.c                 |  13 -
 arch/arm/include/asm/arch-omap3/sys_proto.h |   1 -
 arch/arm/include/asm/arch-omap4/sys_proto.h |   1 -
 arch/arm/include/asm/arch-omap5/sys_proto.h |   1 -
 board/ti/panda/panda.c                      |   2 +-
 7 files changed, 208 insertions(+), 169 deletions(-)

-- 
V2: fix checkpatch issues

1.8.5.3



More information about the U-Boot mailing list