lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 31 May 2019 02:17:18 +0530
From:   Nishka Dasgupta <nishkadg.linux@...il.com>
To:     hans.verkuil@...co.com, mchehab@...nel.org,
        gregkh@...uxfoundation.org, code@...ofe.uk, ezequiel@...labora.com,
        linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Cc:     Nishka Dasgupta <nishkadg.linux@...il.com>
Subject: [PATCH] staging: media: davinci_vpfe: Remove variable vpfe_dev

Remove variable vpfe_dev and replace it with its value (since the
function otherwise uses values directly instead of local variables).
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@...il.com>
---
 drivers/staging/media/davinci_vpfe/vpfe_video.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c
index 510202a3b091..8927b744b13e 100644
--- a/drivers/staging/media/davinci_vpfe/vpfe_video.c
+++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c
@@ -448,7 +448,6 @@ vpfe_video_get_next_buffer(struct vpfe_video_device *video)
 /* schedule the next buffer which is available on dma queue */
 void vpfe_video_schedule_next_buffer(struct vpfe_video_device *video)
 {
-	struct vpfe_device *vpfe_dev = video->vpfe_dev;
 	unsigned long addr;
 
 	if (list_empty(&video->dma_queue))
@@ -463,19 +462,18 @@ void vpfe_video_schedule_next_buffer(struct vpfe_video_device *video)
 	list_del(&video->next_frm->list);
 	video->next_frm->vb.vb2_buf.state = VB2_BUF_STATE_ACTIVE;
 	addr = vb2_dma_contig_plane_dma_addr(&video->next_frm->vb.vb2_buf, 0);
-	video->ops->queue(vpfe_dev, addr);
+	video->ops->queue(video->vpfe_dev, addr);
 	video->state = VPFE_VIDEO_BUFFER_QUEUED;
 }
 
 /* schedule the buffer for capturing bottom field */
 void vpfe_video_schedule_bottom_field(struct vpfe_video_device *video)
 {
-	struct vpfe_device *vpfe_dev = video->vpfe_dev;
 	unsigned long addr;
 
 	addr = vb2_dma_contig_plane_dma_addr(&video->cur_frm->vb.vb2_buf, 0);
 	addr += video->field_off;
-	video->ops->queue(vpfe_dev, addr);
+	video->ops->queue(video->vpfe_dev, addr);
 }
 
 /* make buffer available for dequeue */
-- 
2.19.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ