powerpc/powernv/idle: Fix build error

Michael Ellerman patch-notifications at ellerman.id.au
Mon Aug 13 21:23:20 AEST 2018


On Thu, 2018-08-09 at 13:37:20 UTC, "Aneesh Kumar K.V" wrote:
> Fix the below build error using strlcpy instead of strncpy
> 
> In function 'pnv_parse_cpuidle_dt',
>     inlined from 'pnv_init_idle_states' at arch/powerpc/platforms/powernv/idle.c:840:7,
>     inlined from '__machine_initcall_powernv_pnv_init_idle_states' at arch/powerpc/platforms/powernv/idle.c:870:1:
> arch/powerpc/platforms/powernv/idle.c:820:3: error: 'strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]
>    strncpy(pnv_idle_states[i].name, temp_string[i],
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     PNV_IDLE_NAME_LEN);
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/ae24ce5e12127eeef6bf946c3ee0e9

cheers


More information about the Linuxppc-dev mailing list