Commit 8492ec69 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[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: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent b171e3d8
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1311,11 +1311,9 @@ static int s5p_mfc_runtime_resume(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct s5p_mfc_dev *m_dev = platform_get_drvdata(pdev);
	int pre_power;

	if (!m_dev->alloc_ctx)
		return 0;
	pre_power = atomic_read(&m_dev->pm.power);
	atomic_set(&m_dev->pm.power, 1);
	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include "s5p_mfc_cmd.h"
#include "s5p_mfc_common.h"
#include "s5p_mfc_debug.h"
#include "s5p_mfc_cmd_v5.h"

/* This function is used to send a command to the MFC */
static int s5p_mfc_cmd_host2risc_v5(struct s5p_mfc_dev *dev, int cmd,
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#include "s5p_mfc_debug.h"
#include "s5p_mfc_intr.h"
#include "s5p_mfc_opr.h"
#include "s5p_mfc_cmd_v6.h"

static int s5p_mfc_cmd_host2risc_v6(struct s5p_mfc_dev *dev, int cmd,
				struct s5p_mfc_cmd_args *args)
+2 −2
Original line number Diff line number Diff line
@@ -823,7 +823,7 @@ static int vidioc_g_crop(struct file *file, void *priv,
	return 0;
}

int vidioc_decoder_cmd(struct file *file, void *priv,
static int vidioc_decoder_cmd(struct file *file, void *priv,
			      struct v4l2_decoder_cmd *cmd)
{
	struct s5p_mfc_ctx *ctx = fh_to_ctx(priv);
+2 −5
Original line number Diff line number Diff line
@@ -739,14 +739,11 @@ static int s5p_mfc_ctx_ready(struct s5p_mfc_ctx *ctx)
static void cleanup_ref_queue(struct s5p_mfc_ctx *ctx)
{
	struct s5p_mfc_buf *mb_entry;
	unsigned long mb_y_addr, mb_c_addr;

	/* move buffers in ref queue to src queue */
	while (!list_empty(&ctx->ref_queue)) {
		mb_entry = list_entry((&ctx->ref_queue)->next,
						struct s5p_mfc_buf, list);
		mb_y_addr = vb2_dma_contig_plane_dma_addr(mb_entry->b, 0);
		mb_c_addr = vb2_dma_contig_plane_dma_addr(mb_entry->b, 1);
		list_del(&mb_entry->list);
		ctx->ref_queue_cnt--;
		list_add_tail(&mb_entry->list, &ctx->src_queue);
@@ -1681,7 +1678,7 @@ static int vidioc_g_parm(struct file *file, void *priv,
	return 0;
}

int vidioc_encoder_cmd(struct file *file, void *priv,
static int vidioc_encoder_cmd(struct file *file, void *priv,
			      struct v4l2_encoder_cmd *cmd)
{
	struct s5p_mfc_ctx *ctx = fh_to_ctx(priv);
Loading