Re: [PATCH RESEND v3 3/6] staging: media: atomisp: use __func__ over function names

From: Deepak R Varma
Date: Wed Apr 28 2021 - 09:50:32 EST


On Wed, Apr 28, 2021 at 01:27:17PM +0300, Dan Carpenter wrote:
> On Sun, Apr 25, 2021 at 02:13:15PM +0530, Deepak R Varma wrote:
> > 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@xxxxxxxxx>
> > ---
> >
> > 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__);
>
> Just delete printks that only print the function name. We have ftrace
> for that. There are several others below.

Thank you Dan, Hans, Fabio, Sakari and everyone for your review and comments.
I have received feedback and suggestions on the patch set.
I am going to rebuild the patch set according to the feedback and send as v4.

Appreciate your comments and time,
deepak.

>
> regards,
> dan carpenter
>