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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

regards,
dan carpenter





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux