]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit927c97500d91efe83813bc90ee18c1a919d6eaa9
tree91323797d3012d0f3189dfb80134c783e9c29360
parente867f2796bb206c57b784a26db97e3ba86c5c3e2
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