* [PATCH] staging: media: davinci_vpfe: Use __func__ instead of function name
@ 2018-10-06 20:24 Mamta Shukla
2018-10-07 14:30 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 3+ messages in thread
From: Mamta Shukla @ 2018-10-06 20:24 UTC (permalink / raw)
To: outreachy-kernel; +Cc: mchehab, gregkh, mamtashukla555
Access current function name using __func__.
Use %s and __func__ instead of function name.
Issue found with checkpatch.pl
Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
---
Predefined identifier __func__ gives the name of current function name.
Thus, it gives better debug information in this case.
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: media: davinci_vpfe: Use __func__ instead of function name
2018-10-07 14:30 ` [Outreachy kernel] " Julia Lawall
@ 2018-10-06 20:41 ` Mamta Shukla
0 siblings, 0 replies; 3+ messages in thread
From: Mamta Shukla @ 2018-10-06 20:41 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel, mchehab, gregkh
[-- Attachment #1: Type: text/plain, Size: 3208 bytes --]
On Sun, Oct 7, 2018 at 8:00 PM Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Sun, 7 Oct 2018, Mamta Shukla wrote:
>
> > Access current function name using __func__.
> > Use %s and __func__ instead of function name.
> >
> > Issue found with checkpatch.pl
> >
> > Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
> > ---
> >
> > Predefined identifier __func__ gives the name of current function name.
> > Thus, it gives better debug information in this case.
>
>
> >If this information is useful for someone reading the submitted patch, it
> >will be useful for other people in the future when looking through the
> >commit history. Thus it should be above the ---. Below the --- you
> >should put version information, or maybe any questions you have about the
> >validity of the patch, ie things that people don't need to know about
> >after tha patch is accepted.
>
> >julia
>
Ok. I will add the information above -- so that it will be helpful and
useful for other people.
I will send revised version of this patch.
>
> >
> > 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/20181006202414.GA12019%40armorer
> .
> > For more options, visit https://groups.google.com/d/optout.
> >
>
--
Mamta Shukla
Pune Institute of Computer Technology
Pune
[-- Attachment #2: Type: text/html, Size: 5014 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: media: davinci_vpfe: Use __func__ instead of function name
2018-10-06 20:24 [PATCH] staging: media: davinci_vpfe: Use __func__ instead of function name Mamta Shukla
@ 2018-10-07 14:30 ` Julia Lawall
2018-10-06 20:41 ` Mamta Shukla
0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2018-10-07 14:30 UTC (permalink / raw)
To: Mamta Shukla; +Cc: outreachy-kernel, mchehab, gregkh
On Sun, 7 Oct 2018, Mamta Shukla wrote:
> Access current function name using __func__.
> Use %s and __func__ instead of function name.
>
> Issue found with checkpatch.pl
>
> Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
> ---
>
> Predefined identifier __func__ gives the name of current function name.
> Thus, it gives better debug information in this case.
If this information is useful for someone reading the submitted patch, it
will be useful for other people in the future when looking through the
commit history. Thus it should be above the ---. Below the --- you
should put version information, or maybe any questions you have about the
validity of the patch, ie things that people don't need to know about
after tha patch is accepted.
julia
>
> 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/20181006202414.GA12019%40armorer.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-07 14:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-06 20:24 [PATCH] staging: media: davinci_vpfe: Use __func__ instead of function name Mamta Shukla
2018-10-07 14:30 ` [Outreachy kernel] " Julia Lawall
2018-10-06 20:41 ` Mamta Shukla
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.