Commit f60de889 authored by Benoit Parrot's avatar Benoit Parrot Committed by Mauro Carvalho Chehab

media: am437x-vpfe: fix function trace debug log

checkpatch.pl nows reports several:
WARNING: Prefer using '"%s...", __func__' to using '<function name>',
this function's name, in a string.

So fix these for the whole driver.
At the same time remove the function entry trace log as those can be
enabled using ftrace instead.
Signed-off-by: default avatarBenoit Parrot <bparrot@ti.com>
Acked-by: default avatarLad Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 0512ccba
...@@ -443,8 +443,8 @@ static int vpfe_ccdc_set_params(struct vpfe_ccdc *ccdc, void __user *params) ...@@ -443,8 +443,8 @@ static int vpfe_ccdc_set_params(struct vpfe_ccdc *ccdc, void __user *params)
x = copy_from_user(&raw_params, params, sizeof(raw_params)); x = copy_from_user(&raw_params, params, sizeof(raw_params));
if (x) { if (x) {
vpfe_dbg(1, vpfe, vpfe_dbg(1, vpfe,
"vpfe_ccdc_set_params: error in copying ccdc params, %d\n", "%s: error in copying ccdc params, %d\n",
x); __func__, x);
return -EFAULT; return -EFAULT;
} }
...@@ -462,11 +462,9 @@ static int vpfe_ccdc_set_params(struct vpfe_ccdc *ccdc, void __user *params) ...@@ -462,11 +462,9 @@ static int vpfe_ccdc_set_params(struct vpfe_ccdc *ccdc, void __user *params)
*/ */
static void vpfe_ccdc_config_ycbcr(struct vpfe_ccdc *ccdc) static void vpfe_ccdc_config_ycbcr(struct vpfe_ccdc *ccdc)
{ {
struct vpfe_device *vpfe = container_of(ccdc, struct vpfe_device, ccdc);
struct ccdc_params_ycbcr *params = &ccdc->ccdc_cfg.ycbcr; struct ccdc_params_ycbcr *params = &ccdc->ccdc_cfg.ycbcr;
u32 syn_mode; u32 syn_mode;
vpfe_dbg(3, vpfe, "vpfe_ccdc_config_ycbcr:\n");
/* /*
* first restore the CCDC registers to default values * first restore the CCDC registers to default values
* This is important since we assume default values to be set in * This is important since we assume default values to be set in
...@@ -598,8 +596,6 @@ static void vpfe_ccdc_config_raw(struct vpfe_ccdc *ccdc) ...@@ -598,8 +596,6 @@ static void vpfe_ccdc_config_raw(struct vpfe_ccdc *ccdc)
unsigned int syn_mode; unsigned int syn_mode;
unsigned int val; unsigned int val;
vpfe_dbg(3, vpfe, "vpfe_ccdc_config_raw:\n");
/* Reset CCDC */ /* Reset CCDC */
vpfe_ccdc_restore_defaults(ccdc); vpfe_ccdc_restore_defaults(ccdc);
...@@ -700,8 +696,8 @@ static int vpfe_ccdc_set_pixel_format(struct vpfe_ccdc *ccdc, u32 pixfmt) ...@@ -700,8 +696,8 @@ static int vpfe_ccdc_set_pixel_format(struct vpfe_ccdc *ccdc, u32 pixfmt)
{ {
struct vpfe_device *vpfe = container_of(ccdc, struct vpfe_device, ccdc); struct vpfe_device *vpfe = container_of(ccdc, struct vpfe_device, ccdc);
vpfe_dbg(1, vpfe, "vpfe_ccdc_set_pixel_format: if_type: %d, pixfmt:%s\n", vpfe_dbg(1, vpfe, "%s: if_type: %d, pixfmt:%s\n",
ccdc->ccdc_cfg.if_type, print_fourcc(pixfmt)); __func__, ccdc->ccdc_cfg.if_type, print_fourcc(pixfmt));
if (ccdc->ccdc_cfg.if_type == VPFE_RAW_BAYER) { if (ccdc->ccdc_cfg.if_type == VPFE_RAW_BAYER) {
ccdc->ccdc_cfg.bayer.pix_fmt = CCDC_PIXFMT_RAW; ccdc->ccdc_cfg.bayer.pix_fmt = CCDC_PIXFMT_RAW;
...@@ -987,8 +983,6 @@ static int vpfe_config_ccdc_image_format(struct vpfe_device *vpfe) ...@@ -987,8 +983,6 @@ static int vpfe_config_ccdc_image_format(struct vpfe_device *vpfe)
enum ccdc_frmfmt frm_fmt = CCDC_FRMFMT_INTERLACED; enum ccdc_frmfmt frm_fmt = CCDC_FRMFMT_INTERLACED;
int ret = 0; int ret = 0;
vpfe_dbg(2, vpfe, "vpfe_config_ccdc_image_format\n");
vpfe_dbg(1, vpfe, "pixelformat: %s\n", vpfe_dbg(1, vpfe, "pixelformat: %s\n",
print_fourcc(vpfe->fmt.fmt.pix.pixelformat)); print_fourcc(vpfe->fmt.fmt.pix.pixelformat));
...@@ -1354,8 +1348,6 @@ static int vpfe_querycap(struct file *file, void *priv, ...@@ -1354,8 +1348,6 @@ static int vpfe_querycap(struct file *file, void *priv,
{ {
struct vpfe_device *vpfe = video_drvdata(file); struct vpfe_device *vpfe = video_drvdata(file);
vpfe_dbg(2, vpfe, "vpfe_querycap\n");
strscpy(cap->driver, VPFE_MODULE_NAME, sizeof(cap->driver)); strscpy(cap->driver, VPFE_MODULE_NAME, sizeof(cap->driver));
strscpy(cap->card, "TI AM437x VPFE", sizeof(cap->card)); strscpy(cap->card, "TI AM437x VPFE", sizeof(cap->card));
snprintf(cap->bus_info, sizeof(cap->bus_info), snprintf(cap->bus_info, sizeof(cap->bus_info),
...@@ -1400,7 +1392,7 @@ static int __vpfe_get_format(struct vpfe_device *vpfe, ...@@ -1400,7 +1392,7 @@ static int __vpfe_get_format(struct vpfe_device *vpfe,
format->type = vpfe->fmt.type; format->type = vpfe->fmt.type;
vpfe_dbg(1, vpfe, vpfe_dbg(1, vpfe,
"%s size %dx%d (%s) bytesperline = %d, size = %d, bpp = %d\n", "%s: size %dx%d (%s) bytesperline = %d, size = %d, bpp = %d\n",
__func__, format->fmt.pix.width, format->fmt.pix.height, __func__, format->fmt.pix.width, format->fmt.pix.height,
print_fourcc(format->fmt.pix.pixelformat), print_fourcc(format->fmt.pix.pixelformat),
format->fmt.pix.bytesperline, format->fmt.pix.sizeimage, *bpp); format->fmt.pix.bytesperline, format->fmt.pix.sizeimage, *bpp);
...@@ -1416,8 +1408,6 @@ static int __vpfe_set_format(struct vpfe_device *vpfe, ...@@ -1416,8 +1408,6 @@ static int __vpfe_set_format(struct vpfe_device *vpfe,
struct v4l2_subdev_format fmt; struct v4l2_subdev_format fmt;
int ret; int ret;
vpfe_dbg(2, vpfe, "__vpfe_set_format\n");
sdinfo = vpfe->current_subdev; sdinfo = vpfe->current_subdev;
if (!sdinfo->sd) if (!sdinfo->sd)
return -EINVAL; return -EINVAL;
...@@ -1450,8 +1440,6 @@ static int vpfe_g_fmt(struct file *file, void *priv, ...@@ -1450,8 +1440,6 @@ static int vpfe_g_fmt(struct file *file, void *priv,
{ {
struct vpfe_device *vpfe = video_drvdata(file); struct vpfe_device *vpfe = video_drvdata(file);
vpfe_dbg(2, vpfe, "vpfe_g_fmt\n");
*fmt = vpfe->fmt; *fmt = vpfe->fmt;
return 0; return 0;
...@@ -1464,9 +1452,6 @@ static int vpfe_enum_fmt(struct file *file, void *priv, ...@@ -1464,9 +1452,6 @@ static int vpfe_enum_fmt(struct file *file, void *priv,
struct vpfe_subdev_info *sdinfo; struct vpfe_subdev_info *sdinfo;
struct vpfe_fmt *fmt; struct vpfe_fmt *fmt;
vpfe_dbg(2, vpfe, "vpfe_enum_format index:%d\n",
f->index);
sdinfo = vpfe->current_subdev; sdinfo = vpfe->current_subdev;
if (!sdinfo->sd) if (!sdinfo->sd)
return -EINVAL; return -EINVAL;
...@@ -1478,8 +1463,8 @@ static int vpfe_enum_fmt(struct file *file, void *priv, ...@@ -1478,8 +1463,8 @@ static int vpfe_enum_fmt(struct file *file, void *priv,
f->pixelformat = fmt->fourcc; f->pixelformat = fmt->fourcc;
vpfe_dbg(1, vpfe, "vpfe_enum_format: mbus index: %d code: %x pixelformat: %s\n", vpfe_dbg(1, vpfe, "%s: mbus index: %d code: %x pixelformat: %s\n",
f->index, fmt->code, print_fourcc(fmt->fourcc)); __func__, f->index, fmt->code, print_fourcc(fmt->fourcc));
return 0; return 0;
} }
...@@ -1490,8 +1475,6 @@ static int vpfe_try_fmt(struct file *file, void *priv, ...@@ -1490,8 +1475,6 @@ static int vpfe_try_fmt(struct file *file, void *priv,
struct vpfe_device *vpfe = video_drvdata(file); struct vpfe_device *vpfe = video_drvdata(file);
unsigned int bpp; unsigned int bpp;
vpfe_dbg(2, vpfe, "vpfe_try_fmt\n");
return __vpfe_get_format(vpfe, fmt, &bpp); return __vpfe_get_format(vpfe, fmt, &bpp);
} }
...@@ -1503,8 +1486,6 @@ static int vpfe_s_fmt(struct file *file, void *priv, ...@@ -1503,8 +1486,6 @@ static int vpfe_s_fmt(struct file *file, void *priv,
unsigned int bpp; unsigned int bpp;
int ret; int ret;
vpfe_dbg(2, vpfe, "vpfe_s_fmt\n");
/* If streaming is started, return error */ /* If streaming is started, return error */
if (vb2_is_busy(&vpfe->buffer_queue)) { if (vb2_is_busy(&vpfe->buffer_queue)) {
vpfe_err(vpfe, "%s device busy\n", __func__); vpfe_err(vpfe, "%s device busy\n", __func__);
...@@ -1550,8 +1531,6 @@ static int vpfe_enum_size(struct file *file, void *priv, ...@@ -1550,8 +1531,6 @@ static int vpfe_enum_size(struct file *file, void *priv,
struct vpfe_fmt *fmt; struct vpfe_fmt *fmt;
int ret; int ret;
vpfe_dbg(2, vpfe, "vpfe_enum_size\n");
/* check for valid format */ /* check for valid format */
fmt = find_format_by_pix(vpfe, fsize->pixel_format); fmt = find_format_by_pix(vpfe, fsize->pixel_format);
if (!fmt) { if (!fmt) {
...@@ -1584,17 +1563,17 @@ static int vpfe_enum_size(struct file *file, void *priv, ...@@ -1584,17 +1563,17 @@ static int vpfe_enum_size(struct file *file, void *priv,
if (ret) if (ret)
return -EINVAL; return -EINVAL;
vpfe_dbg(1, vpfe, "vpfe_enum_size: index: %d code: %x W:[%d,%d] H:[%d,%d]\n", vpfe_dbg(1, vpfe, "%s: index: %d code: %x W:[%d,%d] H:[%d,%d]\n",
fse.index, fse.code, fse.min_width, fse.max_width, __func__, fse.index, fse.code, fse.min_width, fse.max_width,
fse.min_height, fse.max_height); fse.min_height, fse.max_height);
fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
fsize->discrete.width = fse.max_width; fsize->discrete.width = fse.max_width;
fsize->discrete.height = fse.max_height; fsize->discrete.height = fse.max_height;
vpfe_dbg(1, vpfe, "vpfe_enum_size: index: %d pixformat: %s size: %dx%d\n", vpfe_dbg(1, vpfe, "%s: index: %d pixformat: %s size: %dx%d\n",
fsize->index, print_fourcc(fsize->pixel_format), __func__, fsize->index, print_fourcc(fsize->pixel_format),
fsize->discrete.width, fsize->discrete.height); fsize->discrete.width, fsize->discrete.height);
return 0; return 0;
} }
...@@ -1659,8 +1638,6 @@ static int vpfe_enum_input(struct file *file, void *priv, ...@@ -1659,8 +1638,6 @@ static int vpfe_enum_input(struct file *file, void *priv,
struct vpfe_subdev_info *sdinfo; struct vpfe_subdev_info *sdinfo;
int subdev, index; int subdev, index;
vpfe_dbg(2, vpfe, "vpfe_enum_input\n");
if (vpfe_get_subdev_input_index(vpfe, &subdev, &index, if (vpfe_get_subdev_input_index(vpfe, &subdev, &index,
inp->index) < 0) { inp->index) < 0) {
vpfe_dbg(1, vpfe, vpfe_dbg(1, vpfe,
...@@ -1677,8 +1654,6 @@ static int vpfe_g_input(struct file *file, void *priv, unsigned int *index) ...@@ -1677,8 +1654,6 @@ static int vpfe_g_input(struct file *file, void *priv, unsigned int *index)
{ {
struct vpfe_device *vpfe = video_drvdata(file); struct vpfe_device *vpfe = video_drvdata(file);
vpfe_dbg(2, vpfe, "vpfe_g_input\n");
return vpfe_get_app_input_index(vpfe, index); return vpfe_get_app_input_index(vpfe, index);
} }
...@@ -1691,8 +1666,6 @@ static int vpfe_set_input(struct vpfe_device *vpfe, unsigned int index) ...@@ -1691,8 +1666,6 @@ static int vpfe_set_input(struct vpfe_device *vpfe, unsigned int index)
u32 input, output; u32 input, output;
int ret; int ret;
vpfe_dbg(2, vpfe, "vpfe_set_input: index: %d\n", index);
/* If streaming is started, return error */ /* If streaming is started, return error */
if (vb2_is_busy(&vpfe->buffer_queue)) { if (vb2_is_busy(&vpfe->buffer_queue)) {
vpfe_err(vpfe, "%s device busy\n", __func__); vpfe_err(vpfe, "%s device busy\n", __func__);
...@@ -1748,9 +1721,6 @@ static int vpfe_s_input(struct file *file, void *priv, unsigned int index) ...@@ -1748,9 +1721,6 @@ static int vpfe_s_input(struct file *file, void *priv, unsigned int index)
{ {
struct vpfe_device *vpfe = video_drvdata(file); struct vpfe_device *vpfe = video_drvdata(file);
vpfe_dbg(2, vpfe,
"vpfe_s_input: index: %d\n", index);
return vpfe_set_input(vpfe, index); return vpfe_set_input(vpfe, index);
} }
...@@ -1759,8 +1729,6 @@ static int vpfe_querystd(struct file *file, void *priv, v4l2_std_id *std_id) ...@@ -1759,8 +1729,6 @@ static int vpfe_querystd(struct file *file, void *priv, v4l2_std_id *std_id)
struct vpfe_device *vpfe = video_drvdata(file); struct vpfe_device *vpfe = video_drvdata(file);
struct vpfe_subdev_info *sdinfo; struct vpfe_subdev_info *sdinfo;
vpfe_dbg(2, vpfe, "vpfe_querystd\n");
sdinfo = vpfe->current_subdev; sdinfo = vpfe->current_subdev;
if (!(sdinfo->inputs[0].capabilities & V4L2_IN_CAP_STD)) if (!(sdinfo->inputs[0].capabilities & V4L2_IN_CAP_STD))
return -ENODATA; return -ENODATA;
...@@ -1776,8 +1744,6 @@ static int vpfe_s_std(struct file *file, void *priv, v4l2_std_id std_id) ...@@ -1776,8 +1744,6 @@ static int vpfe_s_std(struct file *file, void *priv, v4l2_std_id std_id)
struct vpfe_subdev_info *sdinfo; struct vpfe_subdev_info *sdinfo;
int ret; int ret;
vpfe_dbg(2, vpfe, "vpfe_s_std\n");
sdinfo = vpfe->current_subdev; sdinfo = vpfe->current_subdev;
if (!(sdinfo->inputs[0].capabilities & V4L2_IN_CAP_STD)) if (!(sdinfo->inputs[0].capabilities & V4L2_IN_CAP_STD))
return -ENODATA; return -ENODATA;
...@@ -1809,8 +1775,6 @@ static int vpfe_g_std(struct file *file, void *priv, v4l2_std_id *std_id) ...@@ -1809,8 +1775,6 @@ static int vpfe_g_std(struct file *file, void *priv, v4l2_std_id *std_id)
struct vpfe_device *vpfe = video_drvdata(file); struct vpfe_device *vpfe = video_drvdata(file);
struct vpfe_subdev_info *sdinfo; struct vpfe_subdev_info *sdinfo;
vpfe_dbg(2, vpfe, "vpfe_g_std\n");
sdinfo = vpfe->current_subdev; sdinfo = vpfe->current_subdev;
if (sdinfo->inputs[0].capabilities != V4L2_IN_CAP_STD) if (sdinfo->inputs[0].capabilities != V4L2_IN_CAP_STD)
return -ENODATA; return -ENODATA;
...@@ -1828,8 +1792,6 @@ static void vpfe_calculate_offsets(struct vpfe_device *vpfe) ...@@ -1828,8 +1792,6 @@ static void vpfe_calculate_offsets(struct vpfe_device *vpfe)
{ {
struct v4l2_rect image_win; struct v4l2_rect image_win;
vpfe_dbg(2, vpfe, "vpfe_calculate_offsets\n");
vpfe_ccdc_get_image_window(&vpfe->ccdc, &image_win); vpfe_ccdc_get_image_window(&vpfe->ccdc, &image_win);
vpfe->field_off = image_win.height * image_win.width; vpfe->field_off = image_win.height * image_win.width;
} }
...@@ -2030,8 +1992,6 @@ static int vpfe_g_pixelaspect(struct file *file, void *priv, ...@@ -2030,8 +1992,6 @@ static int vpfe_g_pixelaspect(struct file *file, void *priv,
{ {
struct vpfe_device *vpfe = video_drvdata(file); struct vpfe_device *vpfe = video_drvdata(file);
vpfe_dbg(2, vpfe, "vpfe_g_pixelaspect\n");
if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE || if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
vpfe->std_index >= ARRAY_SIZE(vpfe_standards)) vpfe->std_index >= ARRAY_SIZE(vpfe_standards))
return -EINVAL; return -EINVAL;
...@@ -2134,8 +2094,6 @@ static long vpfe_ioctl_default(struct file *file, void *priv, ...@@ -2134,8 +2094,6 @@ static long vpfe_ioctl_default(struct file *file, void *priv,
struct vpfe_device *vpfe = video_drvdata(file); struct vpfe_device *vpfe = video_drvdata(file);
int ret; int ret;
vpfe_dbg(2, vpfe, "vpfe_ioctl_default\n");
if (!valid_prio) { if (!valid_prio) {
vpfe_err(vpfe, "%s device busy\n", __func__); vpfe_err(vpfe, "%s device busy\n", __func__);
return -EBUSY; return -EBUSY;
...@@ -2246,8 +2204,6 @@ vpfe_async_bound(struct v4l2_async_notifier *notifier, ...@@ -2246,8 +2204,6 @@ vpfe_async_bound(struct v4l2_async_notifier *notifier,
bool found = false; bool found = false;
int i, j, k; int i, j, k;
vpfe_dbg(1, vpfe, "vpfe_async_bound\n");
for (i = 0; i < ARRAY_SIZE(vpfe->cfg->asd); i++) { for (i = 0; i < ARRAY_SIZE(vpfe->cfg->asd); i++) {
if (vpfe->cfg->asd[i]->match.fwnode == if (vpfe->cfg->asd[i]->match.fwnode ==
asd[i].match.fwnode) { asd[i].match.fwnode) {
...@@ -2579,8 +2535,6 @@ static int vpfe_remove(struct platform_device *pdev) ...@@ -2579,8 +2535,6 @@ static int vpfe_remove(struct platform_device *pdev)
{ {
struct vpfe_device *vpfe = platform_get_drvdata(pdev); struct vpfe_device *vpfe = platform_get_drvdata(pdev);
vpfe_dbg(2, vpfe, "vpfe_remove\n");
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
v4l2_async_notifier_unregister(&vpfe->notifier); v4l2_async_notifier_unregister(&vpfe->notifier);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment