mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-10 04:26:19 -04:00
env: clean env_embedded.c checkpatch and code style
Cleanup the env_embedded.c checkpatch warnings, errors and coding style. There is one error left though: ERROR: Macros with multiple statements should be enclosed in a do - while loop #79: FILE: u-boot/common/env_embedded.c:79: +#define GEN_ABS(name, value) \ + asm(".globl " GEN_SYMNAME(name)); \ + GEN_SET_VALUE(name, value) total: 1 errors, 0 warnings, 213 lines checked We cannot enclose that statement in a do - while loop, because these are a global assembly declarations. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
This commit is contained in:
parent
e8db8f71c9
commit
bd2a23ac61
@ -29,10 +29,7 @@
|
|||||||
#undef __ASSEMBLY__
|
#undef __ASSEMBLY__
|
||||||
#include <environment.h>
|
#include <environment.h>
|
||||||
|
|
||||||
/*
|
/* Handle HOSTS that have prepended crap on symbol names, not TARGETS. */
|
||||||
* Handle HOSTS that have prepended
|
|
||||||
* crap on symbol names, not TARGETS.
|
|
||||||
*/
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
/* Leading underscore on symbols */
|
/* Leading underscore on symbols */
|
||||||
# define SYM_CHAR "_"
|
# define SYM_CHAR "_"
|
||||||
@ -71,9 +68,11 @@
|
|||||||
* Macros to generate global absolutes.
|
* Macros to generate global absolutes.
|
||||||
*/
|
*/
|
||||||
#if defined(__bfin__)
|
#if defined(__bfin__)
|
||||||
# define GEN_SET_VALUE(name, value) asm (".set " GEN_SYMNAME(name) ", " GEN_VALUE(value))
|
# define GEN_SET_VALUE(name, value) \
|
||||||
|
asm(".set " GEN_SYMNAME(name) ", " GEN_VALUE(value))
|
||||||
#else
|
#else
|
||||||
# define GEN_SET_VALUE(name, value) asm (GEN_SYMNAME(name) " = " GEN_VALUE(value))
|
# define GEN_SET_VALUE(name, value) \
|
||||||
|
asm(GEN_SYMNAME(name) " = " GEN_VALUE(value))
|
||||||
#endif
|
#endif
|
||||||
#define GEN_SYMNAME(str) SYM_CHAR #str
|
#define GEN_SYMNAME(str) SYM_CHAR #str
|
||||||
#define GEN_VALUE(str) #str
|
#define GEN_VALUE(str) #str
|
||||||
@ -93,7 +92,7 @@
|
|||||||
* computed CRC. Otherwise define it as ~0.
|
* computed CRC. Otherwise define it as ~0.
|
||||||
*/
|
*/
|
||||||
#if !defined(ENV_CRC)
|
#if !defined(ENV_CRC)
|
||||||
# define ENV_CRC ~0
|
# define ENV_CRC (~0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
env_t environment __PPCENV__ = {
|
env_t environment __PPCENV__ = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user