linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	Len Brown <len.brown@intel.com>
Subject: [PATCH 09/10] ACPI, APEI, EINJ, cleanup 0 vs NULL confusion
Date: Mon, 23 Jan 2012 20:30:08 -0500	[thread overview]
Message-ID: <29924b9f8f39e37275cff93740835d28b9e6fb36.1327368464.git.len.brown@intel.com> (raw)
In-Reply-To: <1327368609-28409-1-git-send-email-lenb@kernel.org>
In-Reply-To: <54d5dcc45af7adbb907072d042bbece4c2b4de6e.1327368464.git.len.brown@intel.com>

From: Dan Carpenter <dan.carpenter@oracle.com>

This function is returning pointers.  Sparse complains here:
drivers/acpi/apei/einj.c:262:32: warning:
	Using plain integer as NULL pointer

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/apei/einj.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index bb20b03..c89b0e5 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -259,15 +259,15 @@ static void *einj_get_parameter_address(void)
 
 		v4param = ioremap(paddrv4, sizeof(*v4param));
 		if (!v4param)
-			return 0;
+			return NULL;
 		if (readq(&v4param->reserved1) || readq(&v4param->reserved2)) {
 			iounmap(v4param);
-			return 0;
+			return NULL;
 		}
 		return v4param;
 	}
 
-	return 0;
+	return NULL;
 }
 
 /* do sanity check to trigger table */
-- 
1.7.9.rc2


  parent reply	other threads:[~2012-01-24  1:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24  1:29 ACPI & Power Management Patches for Linux 3.3-rc1 Len Brown
2012-01-24  1:30 ` [PATCH 01/10] ACPI processor hotplug: Split up acpi_processor_add Len Brown
2012-01-24  1:30   ` [PATCH 02/10] ACPI processor hotplug: Delay acpi_processor_start() call for hotplugged cores Len Brown
2012-01-24  1:30   ` [PATCH 03/10] ACPI, APEI: Add 64-bit read/write support for APEI on i386 Len Brown
2012-01-24  1:30   ` [PATCH 04/10] ACPI, APEI: Add RAM mapping support to ACPI Len Brown
2012-01-24  1:30   ` [PATCH 05/10] ACPI: Remove ./drivers/acpi/atomicio.[ch] Len Brown
2012-01-24  1:30   ` [PATCH 06/10] ACPI / PM: Add Sony Vaio VPCCW29FX to nonvs blacklist Len Brown
2012-01-24  1:30   ` [PATCH 07/10] thermal: Rename generate_netlink_event Len Brown
2012-01-24  1:30   ` [PATCH 08/10] ACPI, APEI, EINJ Allow empty Trigger Error Action Table Len Brown
2012-01-24  1:30   ` Len Brown [this message]
2012-01-24  1:30   ` [PATCH 10/10] Use acpi_os_map_memory() instead of ioremap() in einj driver Len Brown

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=29924b9f8f39e37275cff93740835d28b9e6fb36.1327368464.git.len.brown@intel.com \
    --to=lenb@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.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 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).