Skip to content
Snippets Groups Projects
Commit afb0b131 authored by Kumar Gala's avatar Kumar Gala
Browse files

fsl: Fix compiler warnings from gcc-4.4 in sys_eeprom code


sys_eeprom.c: In function 'do_mac':
sys_eeprom.c:323: warning: dereferencing type-punned pointer will break strict-aliasing rules
sys_eeprom.c: In function 'mac_read_from_eeprom':
sys_eeprom.c:395: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent e94e460c
No related branches found
No related tags found
No related merge requests found
...@@ -78,12 +78,14 @@ static int has_been_read = 0; ...@@ -78,12 +78,14 @@ static int has_been_read = 0;
#ifdef CONFIG_SYS_I2C_EEPROM_NXID #ifdef CONFIG_SYS_I2C_EEPROM_NXID
/* Is this a valid NXID EEPROM? */ /* Is this a valid NXID EEPROM? */
#define is_valid (*((u32 *)e.id) == (('N' << 24) | ('X' << 16) | ('I' << 8) | 'D')) #define is_valid ((e.id[0] == 'N') || (e.id[1] == 'X') || \
(e.id[2] == 'I') || (e.id[3] == 'D'))
#endif #endif
#ifdef CONFIG_SYS_I2C_EEPROM_CCID #ifdef CONFIG_SYS_I2C_EEPROM_CCID
/* Is this a valid CCID EEPROM? */ /* Is this a valid CCID EEPROM? */
#define is_valid (*((u32 *)e.id) == (('C' << 24) | ('C' << 16) | ('I' << 8) | 'D')) #define is_valid ((e.id[0] == 'C') || (e.id[1] == 'C') || \
(e.id[2] == 'I') || (e.id[3] == 'D'))
#endif #endif
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment