* [PATCH] Staging: sm750fb: Use x instead of x != NULL
@ 2016-09-14 12:33 Sandhya Bankar
2016-09-14 12:35 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Sandhya Bankar @ 2016-09-14 12:33 UTC (permalink / raw)
To: outreachy-kernel; +Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-kernel
Use x instead of x != NULL .
This patch removes the explicit NULL comparisons.This issue is found by checkpatch.pl script .
CHECK: Comparison to NULL could be written "pCurrentDviCtrl->pfnInit"
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
index a4a2550..8a39e0e 100644
--- a/drivers/staging/sm750fb/ddk750_dvi.c
+++ b/drivers/staging/sm750fb/ddk750_dvi.c
@@ -45,7 +45,7 @@ int dviInit(
dvi_ctrl_device_t *pCurrentDviCtrl;
pCurrentDviCtrl = g_dcftSupportedDviController;
- if (pCurrentDviCtrl->pfnInit != NULL) {
+ if (pCurrentDviCtrl->pfnInit) {
return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable,
vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable,
pllFilterEnable, pllFilterValue);
--
1.8.2.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: sm750fb: Use x instead of x != NULL
2016-09-14 12:33 [PATCH] Staging: sm750fb: Use x instead of x != NULL Sandhya Bankar
@ 2016-09-14 12:35 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2016-09-14 12:35 UTC (permalink / raw)
To: Sandhya Bankar
Cc: outreachy-kernel, sudipm.mukherjee, teddy.wang, gregkh,
linux-kernel
On Wed, 14 Sep 2016, Sandhya Bankar wrote:
> Use x instead of x != NULL .
> This patch removes the explicit NULL comparisons.This issue is found by checkpatch.pl script .
> CHECK: Comparison to NULL could be written "pCurrentDviCtrl->pfnInit"
OK for the patch, but please put a space after the end of each sentence,
and don't allow the lines in your commit message to go over 80 characters.
julia
>
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> ---
> drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
> index a4a2550..8a39e0e 100644
> --- a/drivers/staging/sm750fb/ddk750_dvi.c
> +++ b/drivers/staging/sm750fb/ddk750_dvi.c
> @@ -45,7 +45,7 @@ int dviInit(
> dvi_ctrl_device_t *pCurrentDviCtrl;
>
> pCurrentDviCtrl = g_dcftSupportedDviController;
> - if (pCurrentDviCtrl->pfnInit != NULL) {
> + if (pCurrentDviCtrl->pfnInit) {
> return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable,
> vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable,
> pllFilterEnable, pllFilterValue);
> --
> 1.8.2.3
>
> --
> 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/20160914123349.GA3770%40sandhya.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-14 12:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-14 12:33 [PATCH] Staging: sm750fb: Use x instead of x != NULL Sandhya Bankar
2016-09-14 12:35 ` [Outreachy kernel] " Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).