From: Julia Lawall <julia.lawall@lip6.fr>
To: Mamta Shukla <mamtashukla555@gmail.com>
Cc: outreachy-kernel@googlegroups.com, mchehab@kernel.org,
gregkh@linuxfoundation.org
Subject: Re: [Outreachy kernel] [PATCH v2] staging: media: davinci_vpfe: Use __func__ instead of function name
Date: Sun, 7 Oct 2018 17:25:03 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1810071723360.2347@hadrien> (raw)
In-Reply-To: <20181006205400.GA12894@armorer>
On Sun, 7 Oct 2018, Mamta Shukla wrote:
> Access current function name using __func__.
> Use %s and __func__ instead of function name.
> Predefined identifier __func__ gives the name of current function name.
> Thus, it gives better debug information in this case.
Actually, the debug information produced is the same as before. Now,
however, the code is more concise and it is more robust, in case the name
of the function changes.
julia
>
> Issue found with checkpatch.pl
>
> Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
> ---
>
> change in v2:
> -Put useful information above ---
>
> drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
> index 9594276..4d09e81 100644
> --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
> +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
> @@ -695,21 +695,21 @@ static int ipipe_get_gamma_params(struct vpfe_ipipe_device *ipipe, void *param)
>
> if (!gamma->bypass_r) {
> dev_err(dev,
> - "ipipe_get_gamma_params: table ptr empty for R\n");
> + "%s: table ptr empty for R\n", __func__);
> return -EINVAL;
> }
> memcpy(gamma_param->table_r, gamma->table_r,
> (table_size * sizeof(struct vpfe_ipipe_gamma_entry)));
>
> if (!gamma->bypass_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) {
> - 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,
> --
> 1.9.1
>
> --
> 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/20181006205400.GA12894%40armorer.
> For more options, visit https://groups.google.com/d/optout.
>
next prev parent reply other threads:[~2018-10-07 15:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-06 20:54 [PATCH v2] staging: media: davinci_vpfe: Use __func__ instead of function name Mamta Shukla
2018-10-07 15:25 ` Julia Lawall [this message]
2018-10-06 21:50 ` [Outreachy kernel] " Mamta Shukla
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.21.1810071723360.2347@hadrien \
--to=julia.lawall@lip6.fr \
--cc=gregkh@linuxfoundation.org \
--cc=mamtashukla555@gmail.com \
--cc=mchehab@kernel.org \
--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.