* [PATCH] ACPI: use NULL for ptrs
@ 2007-02-14 0:11 Randy Dunlap
2007-02-14 23:17 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2007-02-14 0:11 UTC (permalink / raw)
To: linux-acpi; +Cc: len.brown, akpm
From: Randy Dunlap <randy.dunlap@oracle.com>
Fix sparse warnings in ACPI:
drivers/acpi/osl.c:208:10: warning: Using plain integer as NULL pointer
drivers/acpi/tables/tbxface.c:411:49: warning: Using plain integer as NULL pointer
drivers/acpi/processor_core.c:1008:10: warning: Using plain integer as NULL pointer
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
drivers/acpi/osl.c | 2 +-
drivers/acpi/processor_core.c | 2 +-
drivers/acpi/tables/tbxface.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.20-git9.orig/drivers/acpi/osl.c
+++ linux-2.6.20-git9/drivers/acpi/osl.c
@@ -205,7 +205,7 @@ void __iomem *acpi_os_map_memory(acpi_ph
{
if (phys > ULONG_MAX) {
printk(KERN_ERR PREFIX "Cannot map memory that high\n");
- return 0;
+ return NULL;
}
if (acpi_gbl_permanent_mmap)
/*
--- linux-2.6.20-git9.orig/drivers/acpi/processor_core.c
+++ linux-2.6.20-git9/drivers/acpi/processor_core.c
@@ -1005,7 +1005,7 @@ static int __init acpi_processor_init(vo
#ifdef CONFIG_SMP
if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_MADT, 0,
(struct acpi_table_header **)&madt)))
- madt = 0;
+ madt = NULL;
#endif
acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir);
--- linux-2.6.20-git9.orig/drivers/acpi/tables/tbxface.c
+++ linux-2.6.20-git9/drivers/acpi/tables/tbxface.c
@@ -408,7 +408,7 @@ acpi_get_table(char *signature,
}
if (!acpi_gbl_permanent_mmap) {
- acpi_gbl_root_table_list.tables[i].pointer = 0;
+ acpi_gbl_root_table_list.tables[i].pointer = NULL;
}
return (status);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ACPI: use NULL for ptrs
2007-02-14 0:11 [PATCH] ACPI: use NULL for ptrs Randy Dunlap
@ 2007-02-14 23:17 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2007-02-14 23:17 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-acpi, akpm
Applied.
thanks,
-Len
On Tuesday 13 February 2007 19:11, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Fix sparse warnings in ACPI:
> drivers/acpi/osl.c:208:10: warning: Using plain integer as NULL pointer
> drivers/acpi/tables/tbxface.c:411:49: warning: Using plain integer as NULL pointer
> drivers/acpi/processor_core.c:1008:10: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
> drivers/acpi/osl.c | 2 +-
> drivers/acpi/processor_core.c | 2 +-
> drivers/acpi/tables/tbxface.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> --- linux-2.6.20-git9.orig/drivers/acpi/osl.c
> +++ linux-2.6.20-git9/drivers/acpi/osl.c
> @@ -205,7 +205,7 @@ void __iomem *acpi_os_map_memory(acpi_ph
> {
> if (phys > ULONG_MAX) {
> printk(KERN_ERR PREFIX "Cannot map memory that high\n");
> - return 0;
> + return NULL;
> }
> if (acpi_gbl_permanent_mmap)
> /*
> --- linux-2.6.20-git9.orig/drivers/acpi/processor_core.c
> +++ linux-2.6.20-git9/drivers/acpi/processor_core.c
> @@ -1005,7 +1005,7 @@ static int __init acpi_processor_init(vo
> #ifdef CONFIG_SMP
> if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_MADT, 0,
> (struct acpi_table_header **)&madt)))
> - madt = 0;
> + madt = NULL;
> #endif
>
> acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir);
> --- linux-2.6.20-git9.orig/drivers/acpi/tables/tbxface.c
> +++ linux-2.6.20-git9/drivers/acpi/tables/tbxface.c
> @@ -408,7 +408,7 @@ acpi_get_table(char *signature,
> }
>
> if (!acpi_gbl_permanent_mmap) {
> - acpi_gbl_root_table_list.tables[i].pointer = 0;
> + acpi_gbl_root_table_list.tables[i].pointer = NULL;
> }
>
> return (status);
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-14 23:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-14 0:11 [PATCH] ACPI: use NULL for ptrs Randy Dunlap
2007-02-14 23:17 ` Len Brown
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.