OSDN Git Service

drm/nouveau: nouveau: use correct string length
authorArnd Bergmann <arnd@arndb.de>
Mon, 4 Dec 2017 14:54:26 +0000 (15:54 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 2 Feb 2018 05:24:04 +0000 (15:24 +1000)
commitee0d58100296d9b1a2aa23b913c09e8f297449a4
tree91323797d3012d0f3189dfb80134c783e9c29360
parent94ee54dc808aa5a13630b082d6f892d0cf7bf527
drm/nouveau: nouveau: use correct string length

gcc-8 reports

drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c: In function 'nvkm_perfmon_mthd':
include/linux/string.h:265:9: error: '__builtin_strncpy' specified bound 64 equals destination size [-Werror=stringop-truncation]

We need one less byte or call strlcpy() to make it a
nul-terminated string.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c