All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Staging: i4l: Remove NULL comparison.
@ 2016-09-17  1:53 Sandhya Bankar
  2016-09-17 13:01 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Sandhya Bankar @ 2016-09-17  1:53 UTC (permalink / raw
  To: outreachy-kernel; +Cc: gregkh

This patch removes the explicit NULL comparison.This issue was found by 
checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
Changes in v2:
* Correcting commit message.
 drivers/staging/i4l/act2000/act2000_isa.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/i4l/act2000/act2000_isa.c b/drivers/staging/i4l/act2000/act2000_isa.c
index c800da8..808bb3b 100755
--- a/drivers/staging/i4l/act2000/act2000_isa.c
+++ b/drivers/staging/i4l/act2000/act2000_isa.c
@@ -166,7 +166,7 @@ act2000_isa_config_port(act2000_card *card, unsigned short portbase)
 		release_region(card->port, ISA_REGION);
 		card->flags &= ~ACT2000_FLAGS_PVALID;
 	}
-	if (request_region(portbase, ACT2000_PORTLEN, card->regname) == NULL)
+	if (!request_region(portbase, ACT2000_PORTLEN, card->regname))
 		return -EBUSY;
 	else {
 		card->port = portbase;
@@ -244,7 +244,7 @@ act2000_isa_receive(act2000_card *card)
 				if (valid) {
 					card->idat.isa.rcvlen = ((actcapi_msghdr *)&card->idat.isa.rcvhdr)->len;
 					card->idat.isa.rcvskb = dev_alloc_skb(card->idat.isa.rcvlen);
-					if (card->idat.isa.rcvskb == NULL) {
+					if (!card->idat.isa.rcvskb) {
 						card->idat.isa.rcvignore = 1;
 						printk(KERN_WARNING
 						       "act2000_isa_receive: no memory\n");
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Outreachy kernel] [PATCH v2] Staging: i4l: Remove NULL comparison.
  2016-09-17  1:53 [PATCH v2] Staging: i4l: Remove NULL comparison Sandhya Bankar
@ 2016-09-17 13:01 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2016-09-17 13:01 UTC (permalink / raw
  To: Sandhya Bankar; +Cc: outreachy-kernel, gregkh



On Sat, 17 Sep 2016, Sandhya Bankar wrote:

> This patch removes the explicit NULL comparison.This issue was found by
> checkpatch.

The commit message looks better, but you still need a space after the end
of the first sentence.

julia

>
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> ---
> Changes in v2:
> * Correcting commit message.
>  drivers/staging/i4l/act2000/act2000_isa.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/i4l/act2000/act2000_isa.c b/drivers/staging/i4l/act2000/act2000_isa.c
> index c800da8..808bb3b 100755
> --- a/drivers/staging/i4l/act2000/act2000_isa.c
> +++ b/drivers/staging/i4l/act2000/act2000_isa.c
> @@ -166,7 +166,7 @@ act2000_isa_config_port(act2000_card *card, unsigned short portbase)
>  		release_region(card->port, ISA_REGION);
>  		card->flags &= ~ACT2000_FLAGS_PVALID;
>  	}
> -	if (request_region(portbase, ACT2000_PORTLEN, card->regname) == NULL)
> +	if (!request_region(portbase, ACT2000_PORTLEN, card->regname))
>  		return -EBUSY;
>  	else {
>  		card->port = portbase;
> @@ -244,7 +244,7 @@ act2000_isa_receive(act2000_card *card)
>  				if (valid) {
>  					card->idat.isa.rcvlen = ((actcapi_msghdr *)&card->idat.isa.rcvhdr)->len;
>  					card->idat.isa.rcvskb = dev_alloc_skb(card->idat.isa.rcvlen);
> -					if (card->idat.isa.rcvskb == NULL) {
> +					if (!card->idat.isa.rcvskb) {
>  						card->idat.isa.rcvignore = 1;
>  						printk(KERN_WARNING
>  						       "act2000_isa_receive: no memory\n");
> --
> 1.7.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/20160917015330.GA14957%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-17 13:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-17  1:53 [PATCH v2] Staging: i4l: Remove NULL comparison Sandhya Bankar
2016-09-17 13:01 ` [Outreachy kernel] " Julia Lawall

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.