All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] saa7146: fix sparse warnings
Date: Thu, 21 Feb 2008 09:52:36 -0800	[thread overview]
Message-ID: <1203616356.20345.45.camel@brick> (raw)

Went along with the existing file style.
drivers/media/common/saa7146_core.c:309:6: warning: Using plain integer as NULL pointer
drivers/media/common/saa7146_core.c:311:8: warning: Using plain integer as NULL pointer
drivers/media/common/saa7146_core.c:319:7: warning: Using plain integer as NULL pointer
drivers/media/common/saa7146_core.c:319:28: warning: Using plain integer as NULL pointer
drivers/media/common/saa7146_core.c:325:7: warning: Using plain integer as NULL pointer
drivers/media/common/saa7146_core.c:325:28: warning: Using plain integer as NULL pointer
drivers/media/common/saa7146_fops.c:275:12: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 drivers/media/common/saa7146_core.c |    8 ++++----
 drivers/media/common/saa7146_fops.c |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c
index 168a8d3..8c755a1 100644
--- a/drivers/media/common/saa7146_core.c
+++ b/drivers/media/common/saa7146_core.c
@@ -306,9 +306,9 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id)
 		return IRQ_NONE;
 	}
 
-	if( 0 != (dev->ext)) {
+	if( NULL != (dev->ext)) {
 		if( 0 != (dev->ext->irq_mask & isr )) {
-			if( 0 != dev->ext->irq_func ) {
+			if( NULL != dev->ext->irq_func ) {
 				dev->ext->irq_func(dev, &isr);
 			}
 			isr &= ~dev->ext->irq_mask;
@@ -316,13 +316,13 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id)
 	}
 	if (0 != (isr & (MASK_27))) {
 		DEB_INT(("irq: RPS0 (0x%08x).\n",isr));
-		if( 0 != dev->vv_data && 0 != dev->vv_callback) {
+		if( NULL != dev->vv_data && NULL != dev->vv_callback) {
 			dev->vv_callback(dev,isr);
 		}
 		isr &= ~MASK_27;
 	}
 	if (0 != (isr & (MASK_28))) {
-		if( 0 != dev->vv_data && 0 != dev->vv_callback) {
+		if( NULL != dev->vv_data && NULL != dev->vv_callback) {
 			dev->vv_callback(dev,isr);
 		}
 		isr &= ~MASK_28;
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index f0703d8..a73db79 100644
--- a/drivers/media/common/saa7146_fops.c
+++ b/drivers/media/common/saa7146_fops.c
@@ -272,7 +272,7 @@ static int fops_open(struct inode *inode, struct file *file)
 
 	result = 0;
 out:
-	if( fh != 0 && result != 0 ) {
+	if( fh != NULL && result != 0 ) {
 		kfree(fh);
 		file->private_data = NULL;
 	}
-- 
1.5.4.2.200.g99e75




             reply	other threads:[~2008-02-21 17:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21 17:52 Harvey Harrison [this message]
2008-02-21 21:19 ` [PATCH] saa7146: fix sparse warnings Al Viro
2008-02-21 21:22   ` Harvey Harrison
2008-03-02 17:34 ` Dmitri Vorobiev
2008-03-02 18:06   ` Harvey Harrison
2008-03-02 18:46     ` Dmitri Vorobiev
2008-03-02 19:57     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1203616356.20345.45.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.