diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-26 10:13:47 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-26 17:52:13 -0400 |
commit | 8492ec69801ea039546fd27e84fa84f7a0612474 (patch) | |
tree | 50cfa337fbff08f87c1f0114aaf02feb1ae56fea /drivers/media/platform/s5p-mfc | |
parent | b171e3d8514e80c8e01e59565010b1d7879ac019 (diff) |
[media] s5p_mfc: get rid of several warnings
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:826:5: warning: no previous prototype for 'vidioc_decoder_cmd' [-Wmissing-prototypes]
int vidioc_decoder_cmd(struct file *file, void *priv,
^
drivers/media/platform/s5p-mfc/s5p_mfc.c: In function 's5p_mfc_runtime_resume':
drivers/media/platform/s5p-mfc/s5p_mfc.c:1314:6: warning: variable 'pre_power' set but not used [-Wunused-but-set-variable]
int pre_power;
^
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c:163:25: warning: no previous prototype for 's5p_mfc_init_hw_cmds_v5' [-Wmissing-prototypes]
struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v5(void)
^
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c:156:25: warning: no previous prototype for 's5p_mfc_init_hw_cmds_v6' [-Wmissing-prototypes]
struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v6(void)
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c: In function 's5p_mfc_run_dec_frame':
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c:1189:15: warning: variable 'index' set but not used [-Wunused-but-set-variable]
unsigned int index;
^
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c: In function 'cleanup_ref_queue':
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:742:27: warning: variable 'mb_c_addr' set but not used [-Wunused-but-set-variable]
unsigned long mb_y_addr, mb_c_addr;
^
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:742:16: warning: variable 'mb_y_addr' set but not used [-Wunused-but-set-variable]
unsigned long mb_y_addr, mb_c_addr;
^
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c: At top level:
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1684:5: warning: no previous prototype for 'vidioc_encoder_cmd' [-Wmissing-prototypes]
int vidioc_encoder_cmd(struct file *file, void *priv,
^
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/s5p-mfc')
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c | 1 | ||||
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c | 1 | ||||
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 4 | ||||
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 7 | ||||
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 2 |
6 files changed, 6 insertions, 11 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 89b5b4ad34d3..d180440ac43e 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c | |||
@@ -1311,11 +1311,9 @@ static int s5p_mfc_runtime_resume(struct device *dev) | |||
1311 | { | 1311 | { |
1312 | struct platform_device *pdev = to_platform_device(dev); | 1312 | struct platform_device *pdev = to_platform_device(dev); |
1313 | struct s5p_mfc_dev *m_dev = platform_get_drvdata(pdev); | 1313 | struct s5p_mfc_dev *m_dev = platform_get_drvdata(pdev); |
1314 | int pre_power; | ||
1315 | 1314 | ||
1316 | if (!m_dev->alloc_ctx) | 1315 | if (!m_dev->alloc_ctx) |
1317 | return 0; | 1316 | return 0; |
1318 | pre_power = atomic_read(&m_dev->pm.power); | ||
1319 | atomic_set(&m_dev->pm.power, 1); | 1317 | atomic_set(&m_dev->pm.power, 1); |
1320 | return 0; | 1318 | return 0; |
1321 | } | 1319 | } |
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c index 9a6efd6c1329..8c4739ca16d6 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include "s5p_mfc_cmd.h" | 14 | #include "s5p_mfc_cmd.h" |
15 | #include "s5p_mfc_common.h" | 15 | #include "s5p_mfc_common.h" |
16 | #include "s5p_mfc_debug.h" | 16 | #include "s5p_mfc_debug.h" |
17 | #include "s5p_mfc_cmd_v5.h" | ||
17 | 18 | ||
18 | /* This function is used to send a command to the MFC */ | 19 | /* This function is used to send a command to the MFC */ |
19 | static int s5p_mfc_cmd_host2risc_v5(struct s5p_mfc_dev *dev, int cmd, | 20 | static int s5p_mfc_cmd_host2risc_v5(struct s5p_mfc_dev *dev, int cmd, |
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c index ec1a5947ed7d..f17609669b96 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include "s5p_mfc_debug.h" | 16 | #include "s5p_mfc_debug.h" |
17 | #include "s5p_mfc_intr.h" | 17 | #include "s5p_mfc_intr.h" |
18 | #include "s5p_mfc_opr.h" | 18 | #include "s5p_mfc_opr.h" |
19 | #include "s5p_mfc_cmd_v6.h" | ||
19 | 20 | ||
20 | static int s5p_mfc_cmd_host2risc_v6(struct s5p_mfc_dev *dev, int cmd, | 21 | static int s5p_mfc_cmd_host2risc_v6(struct s5p_mfc_dev *dev, int cmd, |
21 | struct s5p_mfc_cmd_args *args) | 22 | struct s5p_mfc_cmd_args *args) |
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 9103258b7df3..fe4d21ccfd49 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | |||
@@ -823,8 +823,8 @@ static int vidioc_g_crop(struct file *file, void *priv, | |||
823 | return 0; | 823 | return 0; |
824 | } | 824 | } |
825 | 825 | ||
826 | int vidioc_decoder_cmd(struct file *file, void *priv, | 826 | static int vidioc_decoder_cmd(struct file *file, void *priv, |
827 | struct v4l2_decoder_cmd *cmd) | 827 | struct v4l2_decoder_cmd *cmd) |
828 | { | 828 | { |
829 | struct s5p_mfc_ctx *ctx = fh_to_ctx(priv); | 829 | struct s5p_mfc_ctx *ctx = fh_to_ctx(priv); |
830 | struct s5p_mfc_dev *dev = ctx->dev; | 830 | struct s5p_mfc_dev *dev = ctx->dev; |
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c index d26b2484ca10..41f3b7f512fa 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | |||
@@ -739,14 +739,11 @@ static int s5p_mfc_ctx_ready(struct s5p_mfc_ctx *ctx) | |||
739 | static void cleanup_ref_queue(struct s5p_mfc_ctx *ctx) | 739 | static void cleanup_ref_queue(struct s5p_mfc_ctx *ctx) |
740 | { | 740 | { |
741 | struct s5p_mfc_buf *mb_entry; | 741 | struct s5p_mfc_buf *mb_entry; |
742 | unsigned long mb_y_addr, mb_c_addr; | ||
743 | 742 | ||
744 | /* move buffers in ref queue to src queue */ | 743 | /* move buffers in ref queue to src queue */ |
745 | while (!list_empty(&ctx->ref_queue)) { | 744 | while (!list_empty(&ctx->ref_queue)) { |
746 | mb_entry = list_entry((&ctx->ref_queue)->next, | 745 | mb_entry = list_entry((&ctx->ref_queue)->next, |
747 | struct s5p_mfc_buf, list); | 746 | struct s5p_mfc_buf, list); |
748 | mb_y_addr = vb2_dma_contig_plane_dma_addr(mb_entry->b, 0); | ||
749 | mb_c_addr = vb2_dma_contig_plane_dma_addr(mb_entry->b, 1); | ||
750 | list_del(&mb_entry->list); | 747 | list_del(&mb_entry->list); |
751 | ctx->ref_queue_cnt--; | 748 | ctx->ref_queue_cnt--; |
752 | list_add_tail(&mb_entry->list, &ctx->src_queue); | 749 | list_add_tail(&mb_entry->list, &ctx->src_queue); |
@@ -1681,8 +1678,8 @@ static int vidioc_g_parm(struct file *file, void *priv, | |||
1681 | return 0; | 1678 | return 0; |
1682 | } | 1679 | } |
1683 | 1680 | ||
1684 | int vidioc_encoder_cmd(struct file *file, void *priv, | 1681 | static int vidioc_encoder_cmd(struct file *file, void *priv, |
1685 | struct v4l2_encoder_cmd *cmd) | 1682 | struct v4l2_encoder_cmd *cmd) |
1686 | { | 1683 | { |
1687 | struct s5p_mfc_ctx *ctx = fh_to_ctx(priv); | 1684 | struct s5p_mfc_ctx *ctx = fh_to_ctx(priv); |
1688 | struct s5p_mfc_dev *dev = ctx->dev; | 1685 | struct s5p_mfc_dev *dev = ctx->dev; |
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c index 58ec7bb26ebc..31688cddfead 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | |||
@@ -1186,7 +1186,6 @@ static int s5p_mfc_run_dec_frame(struct s5p_mfc_ctx *ctx, int last_frame) | |||
1186 | struct s5p_mfc_dev *dev = ctx->dev; | 1186 | struct s5p_mfc_dev *dev = ctx->dev; |
1187 | struct s5p_mfc_buf *temp_vb; | 1187 | struct s5p_mfc_buf *temp_vb; |
1188 | unsigned long flags; | 1188 | unsigned long flags; |
1189 | unsigned int index; | ||
1190 | 1189 | ||
1191 | if (ctx->state == MFCINST_FINISHING) { | 1190 | if (ctx->state == MFCINST_FINISHING) { |
1192 | last_frame = MFC_DEC_LAST_FRAME; | 1191 | last_frame = MFC_DEC_LAST_FRAME; |
@@ -1211,7 +1210,6 @@ static int s5p_mfc_run_dec_frame(struct s5p_mfc_ctx *ctx, int last_frame) | |||
1211 | vb2_dma_contig_plane_dma_addr(temp_vb->b, 0), | 1210 | vb2_dma_contig_plane_dma_addr(temp_vb->b, 0), |
1212 | ctx->consumed_stream, temp_vb->b->v4l2_planes[0].bytesused); | 1211 | ctx->consumed_stream, temp_vb->b->v4l2_planes[0].bytesused); |
1213 | spin_unlock_irqrestore(&dev->irqlock, flags); | 1212 | spin_unlock_irqrestore(&dev->irqlock, flags); |
1214 | index = temp_vb->b->v4l2_buf.index; | ||
1215 | dev->curr_ctx = ctx->num; | 1213 | dev->curr_ctx = ctx->num; |
1216 | s5p_mfc_clean_ctx_int_flags(ctx); | 1214 | s5p_mfc_clean_ctx_int_flags(ctx); |
1217 | if (temp_vb->b->v4l2_planes[0].bytesused == 0) { | 1215 | if (temp_vb->b->v4l2_planes[0].bytesused == 0) { |