mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-11 05:02:26 -04:00
env: clean environment.h checkpatch and code style
Though one warning left: WARNING: do not add new typedefs #149: FILE: u-boot/include/environment.h:149: +typedef struct environment_s { total: 0 errors, 1 warnings, 181 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
This commit is contained in:
parent
2cc8b5c0e8
commit
507651d611
@ -45,7 +45,8 @@
|
|||||||
# define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
|
# define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
|
||||||
# endif
|
# endif
|
||||||
# if !defined(CONFIG_ENV_ADDR_REDUND) && defined(CONFIG_ENV_OFFSET_REDUND)
|
# if !defined(CONFIG_ENV_ADDR_REDUND) && defined(CONFIG_ENV_OFFSET_REDUND)
|
||||||
# define CONFIG_ENV_ADDR_REDUND (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET_REDUND)
|
# define CONFIG_ENV_ADDR_REDUND \
|
||||||
|
(CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET_REDUND)
|
||||||
# endif
|
# endif
|
||||||
# if defined(CONFIG_ENV_SECT_SIZE) || defined(CONFIG_ENV_SIZE)
|
# if defined(CONFIG_ENV_SECT_SIZE) || defined(CONFIG_ENV_SIZE)
|
||||||
# ifndef CONFIG_ENV_SECT_SIZE
|
# ifndef CONFIG_ENV_SECT_SIZE
|
||||||
@ -61,7 +62,8 @@
|
|||||||
# define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
|
# define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
|
||||||
# endif
|
# endif
|
||||||
# if (CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE) && \
|
# if (CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE) && \
|
||||||
(CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) <= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
|
(CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) <= \
|
||||||
|
(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
|
||||||
# define ENV_IS_EMBEDDED 1
|
# define ENV_IS_EMBEDDED 1
|
||||||
# endif
|
# endif
|
||||||
# if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND)
|
# if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND)
|
||||||
@ -159,14 +161,14 @@ typedef struct environment_s {
|
|||||||
extern struct hsearch_data env_htab;
|
extern struct hsearch_data env_htab;
|
||||||
|
|
||||||
/* Function that returns a character from the environment */
|
/* Function that returns a character from the environment */
|
||||||
unsigned char env_get_char (int);
|
unsigned char env_get_char(int);
|
||||||
|
|
||||||
/* Function that returns a pointer to a value from the environment */
|
/* Function that returns a pointer to a value from the environment */
|
||||||
const unsigned char *env_get_addr(int);
|
const unsigned char *env_get_addr(int);
|
||||||
unsigned char env_get_char_memory (int index);
|
unsigned char env_get_char_memory(int index);
|
||||||
|
|
||||||
/* Function that updates CRC of the enironment */
|
/* Function that updates CRC of the enironment */
|
||||||
void env_crc_update (void);
|
void env_crc_update(void);
|
||||||
|
|
||||||
/* [re]set to the default environment */
|
/* [re]set to the default environment */
|
||||||
void set_default_env(const char *s);
|
void set_default_env(const char *s);
|
||||||
@ -174,6 +176,6 @@ void set_default_env(const char *s);
|
|||||||
/* Import from binary representation into hash table */
|
/* Import from binary representation into hash table */
|
||||||
int env_import(const char *buf, int check);
|
int env_import(const char *buf, int check);
|
||||||
|
|
||||||
#endif
|
#endif /* DO_DEPS_ONLY */
|
||||||
|
|
||||||
#endif /* _ENVIRONMENT_H_ */
|
#endif /* _ENVIRONMENT_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user