Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Stephen Warren's avatar
    064d55f8
    fdt: remove unaligned access in fdt_fixup_ethernet() · 064d55f8
    Stephen Warren authored
    
    Some ARM compilers may emit code that makes unaligned accesses when
    faced with constructs such as:
    
    char mac[16] = "ethaddr";
    
    Replace this with a strcpy() call instead to avoid this. strcpy() is
    used here, rather than replacing all usage of the mac variable with the
    string itself, since the loop itself sprintf()s to the variable each
    iteration, so strcpy() is doing basically the same thing.
    
    Reported-by: Florian Meier
    Signed-off-by: default avatarStephen Warren <swarren@wwwdotorg.org>
    064d55f8
    History
    fdt: remove unaligned access in fdt_fixup_ethernet()
    Stephen Warren authored
    
    Some ARM compilers may emit code that makes unaligned accesses when
    faced with constructs such as:
    
    char mac[16] = "ethaddr";
    
    Replace this with a strcpy() call instead to avoid this. strcpy() is
    used here, rather than replacing all usage of the mac variable with the
    string itself, since the loop itself sprintf()s to the variable each
    iteration, so strcpy() is doing basically the same thing.
    
    Reported-by: Florian Meier
    Signed-off-by: default avatarStephen Warren <swarren@wwwdotorg.org>