diff options
author | Haneen Mohammed <hamohammed.sa@gmail.com> | 2015-03-06 22:00:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-07 02:55:36 +0300 |
commit | 8c6ccbeb510fe48ed8808067cd7cbf92f7e8ebac (patch) | |
tree | 807d799cb7d2309acfe039595792e1fc495f73e2 /drivers/staging/media/omap4iss/iss.c | |
parent | aed1c72e447f0ac0985eecbe1c2403eb7176d606 (diff) | |
download | linux-8c6ccbeb510fe48ed8808067cd7cbf92f7e8ebac.tar.xz |
Staging: media: clean dev_err logging
This patch removes __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout.
This was done using Coccinelle, with the following semantic patch:
@a@
expression E, R;
expression msg;
@@
dev_err(E, msg, __func__, R);
@script:python b@
e << a.msg;
y;
@@
if(e.find("%s: ") == True):
m = e.replace("%s: ", "", 1);
coccinelle.y = m;
elif(e.find("%s ") == True):
m = e.replace("%s ", "", 1);
coccinelle.y = m;
elif(e.find("%s:") == True):
m = e.replace("%s:", "", 1);
coccinelle.y = m;
else:
m = e.replace("%s", "",1);
coccinelle.y = m;
@c@
expression a.E, a.msg, a.R;
identifier b.y;
@@
- dev_err(E, msg, __func__, R);
+ dev_err(E, y, R);
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media/omap4iss/iss.c')
-rw-r--r-- | drivers/staging/media/omap4iss/iss.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c index 44b81a2c8b6f..e0ad5e520e2d 100644 --- a/drivers/staging/media/omap4iss/iss.c +++ b/drivers/staging/media/omap4iss/iss.c @@ -1160,8 +1160,8 @@ iss_register_subdev_group(struct iss_device *iss, subdev = v4l2_i2c_new_subdev_board(&iss->v4l2_dev, adapter, board_info->board_info, NULL); if (subdev == NULL) { - dev_err(iss->dev, "%s: Unable to register subdev %s\n", - __func__, board_info->board_info->type); + dev_err(iss->dev, "Unable to register subdev %s\n", + board_info->board_info->type); continue; } @@ -1185,16 +1185,16 @@ static int iss_register_entities(struct iss_device *iss) iss->media_dev.link_notify = iss_pipeline_link_notify; ret = media_device_register(&iss->media_dev); if (ret < 0) { - dev_err(iss->dev, "%s: Media device registration failed (%d)\n", - __func__, ret); + dev_err(iss->dev, "Media device registration failed (%d)\n", + ret); return ret; } iss->v4l2_dev.mdev = &iss->media_dev; ret = v4l2_device_register(iss->dev, &iss->v4l2_dev); if (ret < 0) { - dev_err(iss->dev, "%s: V4L2 device registration failed (%d)\n", - __func__, ret); + dev_err(iss->dev, "V4L2 device registration failed (%d)\n", + ret); goto done; } @@ -1252,8 +1252,8 @@ static int iss_register_entities(struct iss_device *iss) break; default: - dev_err(iss->dev, "%s: invalid interface type %u\n", - __func__, subdevs->interface); + dev_err(iss->dev, "invalid interface type %u\n", + subdevs->interface); ret = -EINVAL; goto done; } |