* [PATCH] staging: dgnc: Remove explicit NULL comparison
@ 2015-10-19 17:44 Muhammad Falak R Wani
2015-10-25 2:28 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Muhammad Falak R Wani @ 2015-10-19 17:44 UTC (permalink / raw)
To: Lidza Louina, Mark Hounschell, Greg Kroah-Hartman,
driverdev-devel, devel, linux-kernel
Cc: Muhammad Falak R Wani
Rewrite explicit NULL comparison in its simpler form.
<smpl>
@NULL_REPLACE@
expression e;
@@
-e == NULL
+ !e
</smpl>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index ce4187f..973263e 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1521,7 +1521,7 @@ static int dgnc_tty_chars_in_buffer(struct tty_struct *tty)
uint chars = 0;
unsigned long flags;
- if (tty == NULL)
+ if (!tty)
return 0;
un = tty->driver_data;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: dgnc: Remove explicit NULL comparison
2015-10-19 17:44 [PATCH] staging: dgnc: Remove explicit NULL comparison Muhammad Falak R Wani
@ 2015-10-25 2:28 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-25 2:28 UTC (permalink / raw)
To: Muhammad Falak R Wani
Cc: Lidza Louina, Mark Hounschell, driverdev-devel, devel,
linux-kernel
On Mon, Oct 19, 2015 at 11:14:35PM +0530, Muhammad Falak R Wani wrote:
> Rewrite explicit NULL comparison in its simpler form.
> <smpl>
> @NULL_REPLACE@
> expression e;
> @@
>
> -e == NULL
> + !e
> </smpl>
>
> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
> ---
> drivers/staging/dgnc/dgnc_tty.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Someone else already did this before you :(
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-25 8:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19 17:44 [PATCH] staging: dgnc: Remove explicit NULL comparison Muhammad Falak R Wani
2015-10-25 2:28 ` Greg Kroah-Hartman
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.