Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1515773
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 17/34] [media] DaVinci-VPFE-Capture: Replace a memcpy() call by an assignment in vpfe_enum_input() |
| Date | 2016-11-06 22:10 +0100 |
| Message-ID | <sACRr-28C-7@gated-at.bofh.it> (permalink) |
| References | <srsHD-5Fa-11@gated-at.bofh.it> <srtaG-5Pq-19@gated-at.bofh.it> <szpjz-3NI-33@gated-at.bofh.it> <szxqO-KH-17@gated-at.bofh.it> <szHJv-7wH-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.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@xs4all.nl> Signed-off-by: Markus Elfring <elfring@users.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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 17/34] [media] DaVinci-VPFE-Capture: Improve another size determination in vpfe_enum_input() Hans Verkuil <hverkuil@xs4all.nl> - 2016-11-03 13:30 +0100
Re: [PATCH 17/34] [media] DaVinci-VPFE-Capture: Improve another size determination in vpfe_enum_input() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-11-03 22:10 +0100
Re: [PATCH 17/34] [media] DaVinci-VPFE-Capture: Improve another size determination in vpfe_enum_input() Hans Verkuil <hverkuil@xs4all.nl> - 2016-11-04 09:10 +0100
[PATCH v2 17/34] [media] DaVinci-VPFE-Capture: Replace a memcpy() call by an assignment in vpfe_enum_input() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-11-06 22:10 +0100
csiph-web