aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-05-14 09:08:52 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-25 15:33:34 -0400
commit660f059782616aa883bd4e16dbb3c56961275c4e (patch)
treeb7fe7305df32a7d8a44b67640e4354b404e9986d /drivers/media
parentmedia: imx: fix compiler warning (diff)
downloadlinux-dev-660f059782616aa883bd4e16dbb3c56961275c4e.tar.xz
linux-dev-660f059782616aa883bd4e16dbb3c56961275c4e.zip
media: renesas-ceu: fix compiler warning
In function 'strncpy', inlined from 'ceu_notify_complete' at drivers/media/platform/renesas-ceu.c:1378:2: include/linux/string.h:246:9: warning: '__builtin_strncpy' output truncated before terminating nul copying 11 bytes from a string of the same length [-Wstringop-truncation] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Jacopo Mondi <jacopo+renesas@jmondi.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/renesas-ceu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/renesas-ceu.c b/drivers/media/platform/renesas-ceu.c
index 4879261857fc..fe4fe944592d 100644
--- a/drivers/media/platform/renesas-ceu.c
+++ b/drivers/media/platform/renesas-ceu.c
@@ -1375,7 +1375,7 @@ static int ceu_notify_complete(struct v4l2_async_notifier *notifier)
return ret;
/* Register the video device. */
- strncpy(vdev->name, DRIVER_NAME, strlen(DRIVER_NAME));
+ strlcpy(vdev->name, DRIVER_NAME, sizeof(vdev->name));
vdev->v4l2_dev = v4l2_dev;
vdev->lock = &ceudev->mlock;
vdev->queue = &ceudev->vb2_vq;