staging: media: davinci_vpfe: Use __func__ instead of function name
Subsystems (2)
PATCH 1/1 staging: media: davinci_vpfe: Use __func__ instead of function name
Access current function name using __func__.
Use %s and __func__ instead of function name.
Issue found with checkpatch.pl
---
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(-)
drivers/staging/media/davinci_vpfe/dm365_ipipe.c +3 -3
@@ -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,
Signature · 1 line
1.9.1
Quoted 10 lines · Mamta Shukla
Access current function name using
__func__.
Use %s and__func__instead of function name.Issue found with checkpatch.pl
Signed-off-by Mamta Shukla <[email protected]>---
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
Quoted 43 lines
drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/media/davinci_vpfe/dm365_ipipe.c +3
-4@@ -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 [email protected]. To post to this group, send email to [email protected].
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.
Quoted 16 lines · Julia Lawall
Quoted 10 lines · Mamta Shukla
Access current function name using
__func__.
Use %s and__func__instead of function name.Issue found with checkpatch.pl
Signed-off-by Mamta Shukla <[email protected]>---
Predefined identifier
__func__gives the name of current function name. Thus, it gives better debug information in this case.
Quoted 9 lines
Quoted 8 lines
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.
Quoted 53 lines
Review
Quoted 6 lines
drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/staging/media/davinci_vpfe/dm365_ipipe.cdrivers/staging/media/davinci_vpfe/dm365_ipipe.c static int ipipe_get_gamma_params(struct
Quoted 4 lines
index 9594276..4d09e81 100644
drivers/staging/media/davinci_vpfe/dm365_ipipe.c +0
-0@@ -695,21 +695,21 @@ static int ipipe_get_gamma_params(struct
vpfe_ipipe_device*ipipe, void *param)drivers/staging/media/davinci_vpfe/dm365_ipipe.c static int ipipe_get_gamma_params(struct vpfe_ipipe_device *ipipe, void *param)
Quoted 12 lines
drivers/staging/media/davinci_vpfe/dm365_ipipe.c +1
-2if (!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 forG\n");
drivers/staging/media/davinci_vpfe/dm365_ipipe.c static int ipipe_get_gamma_params(struct vpfe_ipipe_device *ipipe, void *param)
Quoted 8 lines
drivers/staging/media/davinci_vpfe/dm365_ipipe.c +1
-1+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 forB\n");
Quoted 9 lines
drivers/staging/media/davinci_vpfe/dm365_ipipe.c +1
-1+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 GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
Quoted 2 lines
To post to this group, send email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/20181006202414.GA12019%40armorer
.Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
Signature · 3 lines
Mamta Shukla Pune Institute of Computer Technology Pune