• Will Deacon's avatar
    ARM: fdt: Bump CPU_NAME_MAX_LEN to avoid silly GCC warning · cc874a22
    Will Deacon authored
    
    
    GCC 7 warns about truncating the mpidr when we print the cpu_name into
    the device tree:
    
    arm/fdt.c: In function ‘setup_fdt’:
    arm/fdt.c:58:45: error: ‘%lx’ directive output may be truncated writing between 1 and 10 bytes into a region of size 7 [-Werror=format-truncation=]
       snprintf(cpu_name, CPU_NAME_MAX_LEN, "cpu@%lx", mpidr);
    
    Fix this by bumping the buffer to 15 bytes. We really only need 11 bytes,
    but GCC isn't smart enough to identify that we mask out the top buts
    of the MPIDR and the analysis just seems to be based on types.
    
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    cc874a22