From: Deepak R Varma <drv@mailo.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, mh12gx2825@gmail.com,
drv@mailo.com
Subject: [PATCH v1 3/6] staging: media: atomisp: use __func__ over function names
Date: Wed, 21 Apr 2021 22:23:51 +0530 [thread overview]
Message-ID: <2cb42846abb7cab5e64bc29d5e496766f5df169b.1619022192.git.drv@mailo.com> (raw)
In-Reply-To: <cover.1619022192.git.drv@mailo.com>
Replace hard coded function names from the debug print strings by
standard __func__ predefined identifier. This resolves following
checkpatch script WARNING:
Prefer using '"%s...", __func__' to using function's name, in a string.
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
Changes in v1:
- None.
.../staging/media/atomisp/i2c/atomisp-gc0310.c | 2 +-
.../staging/media/atomisp/i2c/atomisp-gc2235.c | 2 +-
.../staging/media/atomisp/i2c/atomisp-lm3554.c | 2 +-
.../staging/media/atomisp/i2c/atomisp-ov2680.c | 16 ++++++++--------
.../staging/media/atomisp/i2c/atomisp-ov2722.c | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
index d68a2bcc9ae1..b572551f1a0d 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
@@ -1292,7 +1292,7 @@ static int gc0310_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct gc0310_device *dev = to_gc0310_sensor(sd);
- dev_dbg(&client->dev, "gc0310_remove...\n");
+ dev_dbg(&client->dev, "%s...\n", __func__);
dev->platform_data->csi_cfg(sd, 0);
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
index e722c639b60d..548c572d3b57 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
@@ -1034,7 +1034,7 @@ static int gc2235_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct gc2235_device *dev = to_gc2235_sensor(sd);
- dev_dbg(&client->dev, "gc2235_remove...\n");
+ dev_dbg(&client->dev, "%s...\n", __func__);
dev->platform_data->csi_cfg(sd, 0);
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
index 7ca7378b1859..ab10fd98dbc0 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
@@ -680,7 +680,7 @@ static int lm3554_detect(struct v4l2_subdev *sd)
int ret;
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
- dev_err(&client->dev, "lm3554_detect i2c error\n");
+ dev_err(&client->dev, "%s i2c error\n", __func__);
return -ENODEV;
}
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
index 92c52431bd8f..c17615149f46 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
@@ -146,7 +146,7 @@ static int ov2680_g_bin_factor_x(struct v4l2_subdev *sd, s32 *val)
struct ov2680_device *dev = to_ov2680_sensor(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
- dev_dbg(&client->dev, "++++ov2680_g_bin_factor_x\n");
+ dev_dbg(&client->dev, "++++%s\n", __func__);
*val = ov2680_res[dev->fmt_idx].bin_factor_x;
return 0;
@@ -158,7 +158,7 @@ static int ov2680_g_bin_factor_y(struct v4l2_subdev *sd, s32 *val)
struct i2c_client *client = v4l2_get_subdevdata(sd);
*val = ov2680_res[dev->fmt_idx].bin_factor_y;
- dev_dbg(&client->dev, "++++ov2680_g_bin_factor_y\n");
+ dev_dbg(&client->dev, "++++%s\n", __func__);
return 0;
}
@@ -173,7 +173,7 @@ static int ov2680_get_intg_factor(struct i2c_client *client,
u16 reg_val;
int ret;
- dev_dbg(&client->dev, "++++ov2680_get_intg_factor\n");
+ dev_dbg(&client->dev, "++++%s\n", __func__);
if (!info)
return -EINVAL;
@@ -251,8 +251,8 @@ static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
int ret, exp_val;
dev_dbg(&client->dev,
- "+++++++__ov2680_set_exposure coarse_itg %d, gain %d, digitgain %d++\n",
- coarse_itg, gain, digitgain);
+ "+++++++%s coarse_itg %d, gain %d, digitgain %d++\n",
+ __func__, coarse_itg, gain, digitgain);
vts = ov2680_res[dev->fmt_idx].lines_per_frame;
@@ -1061,9 +1061,9 @@ static int ov2680_s_stream(struct v4l2_subdev *sd, int enable)
mutex_lock(&dev->input_lock);
if (enable)
- dev_dbg(&client->dev, "ov2680_s_stream one\n");
+ dev_dbg(&client->dev, "%s one\n", __func__);
else
- dev_dbg(&client->dev, "ov2680_s_stream off\n");
+ dev_dbg(&client->dev, "%s off\n", __func__);
ret = ov2680_write_reg(client, 1, OV2680_SW_STREAM,
enable ? OV2680_START_STREAMING :
@@ -1227,7 +1227,7 @@ static int ov2680_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct ov2680_device *dev = to_ov2680_sensor(sd);
- dev_dbg(&client->dev, "ov2680_remove...\n");
+ dev_dbg(&client->dev, "%s...\n", __func__);
dev->platform_data->csi_cfg(sd, 0);
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
index d046a9804f63..69409f8447b5 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
@@ -1175,7 +1175,7 @@ static int ov2722_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct ov2722_device *dev = to_ov2722_sensor(sd);
- dev_dbg(&client->dev, "ov2722_remove...\n");
+ dev_dbg(&client->dev, "%s...\n", __func__);
dev->platform_data->csi_cfg(sd, 0);
v4l2_ctrl_handler_free(&dev->ctrl_handler);
--
2.25.1
WARNING: multiple messages have this Message-ID
From: Deepak R Varma <drv@mailo.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, mh12gx2825@gmail.com,
drv@mailo.com
Subject: [PATCH v3 3/6] staging: media: atomisp: use __func__ over function names
Date: Wed, 21 Apr 2021 23:44:20 +0530 [thread overview]
Message-ID: <2cb42846abb7cab5e64bc29d5e496766f5df169b.1619022192.git.drv@mailo.com> (raw)
Message-ID: <20210421181420.M7MO8mLsILE71NyOy3vWlCVjdG4PyAuAGWIlkEJujrI@z> (raw)
In-Reply-To: <cover.1619022192.git.drv@mailo.com>
Replace hard coded function names from the debug print strings by
standard __func__ predefined identifier. This resolves following
checkpatch script WARNING:
Prefer using '"%s...", __func__' to using function's name, in a string.
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
Changes since v2:
- None.
Changes since v1:
- None.
.../staging/media/atomisp/i2c/atomisp-gc0310.c | 2 +-
.../staging/media/atomisp/i2c/atomisp-gc2235.c | 2 +-
.../staging/media/atomisp/i2c/atomisp-lm3554.c | 2 +-
.../staging/media/atomisp/i2c/atomisp-ov2680.c | 16 ++++++++--------
.../staging/media/atomisp/i2c/atomisp-ov2722.c | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
index d68a2bcc9ae1..b572551f1a0d 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
@@ -1292,7 +1292,7 @@ static int gc0310_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct gc0310_device *dev = to_gc0310_sensor(sd);
- dev_dbg(&client->dev, "gc0310_remove...\n");
+ dev_dbg(&client->dev, "%s...\n", __func__);
dev->platform_data->csi_cfg(sd, 0);
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
index e722c639b60d..548c572d3b57 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
@@ -1034,7 +1034,7 @@ static int gc2235_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct gc2235_device *dev = to_gc2235_sensor(sd);
- dev_dbg(&client->dev, "gc2235_remove...\n");
+ dev_dbg(&client->dev, "%s...\n", __func__);
dev->platform_data->csi_cfg(sd, 0);
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
index 7ca7378b1859..ab10fd98dbc0 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
@@ -680,7 +680,7 @@ static int lm3554_detect(struct v4l2_subdev *sd)
int ret;
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
- dev_err(&client->dev, "lm3554_detect i2c error\n");
+ dev_err(&client->dev, "%s i2c error\n", __func__);
return -ENODEV;
}
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
index 92c52431bd8f..c17615149f46 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
@@ -146,7 +146,7 @@ static int ov2680_g_bin_factor_x(struct v4l2_subdev *sd, s32 *val)
struct ov2680_device *dev = to_ov2680_sensor(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
- dev_dbg(&client->dev, "++++ov2680_g_bin_factor_x\n");
+ dev_dbg(&client->dev, "++++%s\n", __func__);
*val = ov2680_res[dev->fmt_idx].bin_factor_x;
return 0;
@@ -158,7 +158,7 @@ static int ov2680_g_bin_factor_y(struct v4l2_subdev *sd, s32 *val)
struct i2c_client *client = v4l2_get_subdevdata(sd);
*val = ov2680_res[dev->fmt_idx].bin_factor_y;
- dev_dbg(&client->dev, "++++ov2680_g_bin_factor_y\n");
+ dev_dbg(&client->dev, "++++%s\n", __func__);
return 0;
}
@@ -173,7 +173,7 @@ static int ov2680_get_intg_factor(struct i2c_client *client,
u16 reg_val;
int ret;
- dev_dbg(&client->dev, "++++ov2680_get_intg_factor\n");
+ dev_dbg(&client->dev, "++++%s\n", __func__);
if (!info)
return -EINVAL;
@@ -251,8 +251,8 @@ static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
int ret, exp_val;
dev_dbg(&client->dev,
- "+++++++__ov2680_set_exposure coarse_itg %d, gain %d, digitgain %d++\n",
- coarse_itg, gain, digitgain);
+ "+++++++%s coarse_itg %d, gain %d, digitgain %d++\n",
+ __func__, coarse_itg, gain, digitgain);
vts = ov2680_res[dev->fmt_idx].lines_per_frame;
@@ -1061,9 +1061,9 @@ static int ov2680_s_stream(struct v4l2_subdev *sd, int enable)
mutex_lock(&dev->input_lock);
if (enable)
- dev_dbg(&client->dev, "ov2680_s_stream one\n");
+ dev_dbg(&client->dev, "%s one\n", __func__);
else
- dev_dbg(&client->dev, "ov2680_s_stream off\n");
+ dev_dbg(&client->dev, "%s off\n", __func__);
ret = ov2680_write_reg(client, 1, OV2680_SW_STREAM,
enable ? OV2680_START_STREAMING :
@@ -1227,7 +1227,7 @@ static int ov2680_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct ov2680_device *dev = to_ov2680_sensor(sd);
- dev_dbg(&client->dev, "ov2680_remove...\n");
+ dev_dbg(&client->dev, "%s...\n", __func__);
dev->platform_data->csi_cfg(sd, 0);
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
index d046a9804f63..69409f8447b5 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
@@ -1175,7 +1175,7 @@ static int ov2722_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct ov2722_device *dev = to_ov2722_sensor(sd);
- dev_dbg(&client->dev, "ov2722_remove...\n");
+ dev_dbg(&client->dev, "%s...\n", __func__);
dev->platform_data->csi_cfg(sd, 0);
v4l2_ctrl_handler_free(&dev->ctrl_handler);
--
2.25.1
next prev parent reply other threads:[~2021-04-21 16:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 16:48 [PATCH v1 0/6] staging: media: atomisp: code cleanup fixes Deepak R Varma
2021-04-21 16:50 ` [PATCH v1 1/6] staging: media: atomisp: improve function argument alignment Deepak R Varma
2021-04-21 18:12 ` [PATCH v3 " Deepak R Varma
2021-04-21 16:52 ` [PATCH v1 2/6] staging: media: atomisp: balance braces around if...else block Deepak R Varma
2021-04-21 17:06 ` Fabio Aiuto
2021-04-21 18:13 ` [PATCH v3 " Deepak R Varma
2021-04-21 16:53 ` Deepak R Varma [this message]
2021-04-21 18:14 ` [PATCH v3 3/6] staging: media: atomisp: use __func__ over function names Deepak R Varma
2021-04-21 16:56 ` [PATCH v1 4/6] staging: media: atomisp: reformat code comment blocks Deepak R Varma
2021-04-21 17:10 ` Fabio Aiuto
2021-04-21 17:51 ` Deepak R Varma
2021-04-21 17:54 ` Fabio Aiuto
2021-04-21 18:17 ` [PATCH v3 " Deepak R Varma
2021-04-29 10:08 ` [PATCH v1 " Dan Carpenter
2021-04-29 11:31 ` Deepak R Varma
2021-04-29 11:43 ` Dan Carpenter
2021-04-29 11:55 ` Deepak R Varma
2021-04-29 12:54 ` Dan Carpenter
2021-04-21 16:57 ` [PATCH v1 5/6] staging: media: atomisp: fix CamelCase variable naming Deepak R Varma
2021-04-21 18:18 ` [PATCH v3 " Deepak R Varma
2021-04-21 16:59 ` [PATCH v1 6/6] staging: media: atomisp: replace raw printk() by dev_info() Deepak R Varma
2021-04-21 18:20 ` [PATCH v3 " Deepak R Varma
2021-04-21 18:11 ` [PATCH v3 0/6] staging: media: atomisp: code cleanup fixes Deepak R Varma
2021-04-23 9:09 ` Hans Verkuil
2021-04-23 16:50 ` Deepak R Varma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2cb42846abb7cab5e64bc29d5e496766f5df169b.1619022192.git.drv@mailo.com \
--to=drv@mailo.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=mh12gx2825@gmail.com \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®