[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57b1ce94-7b3c-99e2-e02e-1784cb0eef0f@users.sourceforge.net>
Date: Sun, 6 Nov 2016 22:00:53 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Hans Verkuil <hverkuil@...all.nl>,
"Lad, Prabhakar" <prabhakar.csengg@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org
Cc: Hans Verkuil <hans.verkuil@...co.com>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH v2 17/34] [media] DaVinci-VPFE-Capture: Replace a memcpy()
call by an assignment in vpfe_enum_input()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 6 Nov 2016 21:54:38 +0100
Use a direct assignment for an array element which can be set over the
pointer variable "inp" instead of calling the function "memcpy" here.
Suggested-by: Hans Verkuil <hverkuil@...all.nl>
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/media/platform/davinci/vpfe_capture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
index 8314c39..5417f6b 100644
--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ b/drivers/media/platform/davinci/vpfe_capture.c
@@ -1091,7 +1091,7 @@ static int vpfe_enum_input(struct file *file, void *priv,
return -EINVAL;
}
sdinfo = &vpfe_dev->cfg->sub_devs[subdev];
- memcpy(inp, &sdinfo->inputs[index], sizeof(struct v4l2_input));
+ *inp = sdinfo->inputs[index];
return 0;
}
--
2.10.2
Powered by blists - more mailing lists