Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Alessio Centazzo's avatar
    0544c636
    ppc4xx: Fixed compilation warning in 4xx_enet.c · 0544c636
    Alessio Centazzo authored
    
    This patch fixes a compilation warning for some Ethernet PHY-less
    PPC4xx platforms (440SPE based ones) and a potential compilation
    error for 440SP platforms (use of undefined 'ethgroup' variable).
    In the original code and in case of 440SPE platforms, 'ethgroup'
    is initialized to -1 and never modified.  Later in the function,
    within an #ifdef statement, an 'if statement' executes code only
    if 'ethgroup' is set to 4, therefore it is harmless to avoid
    executing the 'if statement' by removing the CONFIG_440SPE from
    the affected #ifdefs.  In case of 440SP platforms  with on-board
    Ethernet PHY, 'ethgroup' is undefined but used (there are not such
    platforms in the repository yet). All other architectures are not
    affected by this change.
    
    Signed-off-by: default avatarAlessio Centazzo <acpatin@yahoo.com>
    Acked-by: default avatarStefan Roese <sr@denx.de>
    Signed-off-by: default avatarBen Warren <biggerbadderben@gmail.com>
    0544c636
    History
    ppc4xx: Fixed compilation warning in 4xx_enet.c
    Alessio Centazzo authored
    
    This patch fixes a compilation warning for some Ethernet PHY-less
    PPC4xx platforms (440SPE based ones) and a potential compilation
    error for 440SP platforms (use of undefined 'ethgroup' variable).
    In the original code and in case of 440SPE platforms, 'ethgroup'
    is initialized to -1 and never modified.  Later in the function,
    within an #ifdef statement, an 'if statement' executes code only
    if 'ethgroup' is set to 4, therefore it is harmless to avoid
    executing the 'if statement' by removing the CONFIG_440SPE from
    the affected #ifdefs.  In case of 440SP platforms  with on-board
    Ethernet PHY, 'ethgroup' is undefined but used (there are not such
    platforms in the repository yet). All other architectures are not
    affected by this change.
    
    Signed-off-by: default avatarAlessio Centazzo <acpatin@yahoo.com>
    Acked-by: default avatarStefan Roese <sr@denx.de>
    Signed-off-by: default avatarBen Warren <biggerbadderben@gmail.com>