All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Cc: outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.org,
	 mchehab@kernel.org
Subject: Re: [Outreachy kernel] [PATCH v2] Replace explicit use of function name with "%s...", __func__
Date: Tue, 10 Apr 2018 22:20:09 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1804102219380.3071@hadrien> (raw)
In-Reply-To: <1523391296-5535-1-git-send-email-nishka.dasgupta_ug18@ashoka.edu.in>



On Tue, 10 Apr 2018, Nishka Dasgupta wrote:

> Replace use of function name with "%s...", __func__ to make future
> modifications to the respective functions easier to handle. Issue found
> with checkpatch.
>
> Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
> ---
> Changes in v2:
>  - Similar changes previously distributed across a patchset are now in a single patch.
>  - Reason for the change added to commit message.
>
>  drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
> index 6a3434c..a59ab6f 100644
> --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
> +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
> @@ -696,21 +696,21 @@ static int ipipe_get_gamma_params(struct vpfe_ipipe_device *ipipe, void *param)
>
>  	if (!gamma->bypass_r && !gamma_param->table_r) {
>  		dev_err(dev,
> -			"ipipe_get_gamma_params: table ptr empty for R\n");
> +			"%s: table ptr empty for R\n", __func__);

The added line could move up to the same line as the dev_err call.

julia

>  		return -EINVAL;
>  	}
>  	memcpy(gamma_param->table_r, gamma->table_r,
>  	       (table_size * sizeof(struct vpfe_ipipe_gamma_entry)));
>
>  	if (!gamma->bypass_g && !gamma_param->table_g) {
> -		dev_err(dev, "ipipe_get_gamma_params: table ptr empty for G\n");
> +		dev_err(dev, "%s: table ptr empty for G\n", __func__);
>  		return -EINVAL;
>  	}
>  	memcpy(gamma_param->table_g, gamma->table_g,
>  	       (table_size * sizeof(struct vpfe_ipipe_gamma_entry)));
>
>  	if (!gamma->bypass_b && !gamma_param->table_b) {
> -		dev_err(dev, "ipipe_get_gamma_params: table ptr empty for B\n");
> +		dev_err(dev, "%s: table ptr empty for B\n", __func__);
>  		return -EINVAL;
>  	}
>  	memcpy(gamma_param->table_b, gamma->table_b,
> @@ -743,7 +743,7 @@ static int ipipe_get_3d_lut_params(struct vpfe_ipipe_device *ipipe, void *param)
>
>  	lut_param->en = lut->en;
>  	if (!lut_param->table) {
> -		dev_err(dev, "ipipe_get_3d_lut_params: Invalid table ptr\n");
> +		dev_err(dev, "%s: Invalid table ptr\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -924,7 +924,7 @@ static int ipipe_get_gbce_params(struct vpfe_ipipe_device *ipipe, void *param)
>  	gbce_param->en = gbce->en;
>  	gbce_param->type = gbce->type;
>  	if (!gbce_param->table) {
> -		dev_err(dev, "ipipe_get_gbce_params: Invalid table ptr\n");
> +		dev_err(dev, "%s: Invalid table ptr\n", __func__);
>  		return -EINVAL;
>  	}
>
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1523391296-5535-1-git-send-email-nishka.dasgupta_ug18%40ashoka.edu.in.
> For more options, visit https://groups.google.com/d/optout.
>


  reply	other threads:[~2018-04-10 20:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10 20:14 [PATCH v2] Replace explicit use of function name with "%s...", __func__ Nishka Dasgupta
2018-04-10 20:20 ` Julia Lawall [this message]
2018-04-10 20:34 Nishka Dasgupta
2018-04-10 20:39 ` [Outreachy kernel] " Julia Lawall

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=alpine.DEB.2.20.1804102219380.3071@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=mchehab@kernel.org \
    --cc=nishka.dasgupta_ug18@ashoka.edu.in \
    --cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.