acpi/dock: use NULL for pointer
PATCH 4/4 acpi/dock: use NULL for pointer
From: Randy Dunlap <[email protected]>
Use NULL instead of 0 for pointers:drivers/acpi/dock.c:677:75: warning: Using plain integer as NULL pointer
Signed-off-by Randy Dunlap <[email protected]>
Cc Len Brown <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/acpi/dock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/dock.c renamed from drivers/acpi/dock.c~acpi-dock-use-null-for-pointer +2 -1
@@ -29,6 +29,7 @@#include <linux/notifier.h> #include <linux/platform_device.h> #include <linux/jiffies.h> +#include <linux/stddef.h> #include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h>
@@ -674,7 +675,7 @@ static ssize_t show_dock_uid(struct devi struct device_attribute *attr, char *buf) { unsigned long lbuf; -acpi_status status =acpi_evaluate_integer (dock_station->handle,"_UID" ,0 , &lbuf); +acpi_status status =acpi_evaluate_integer (dock_station->handle,"_UID" ,NULL , &lbuf);if (ACPI_FAILURE (status)) {return 0 ; }
_
Applied.
thanks,
-Len
Quoted 35 lines · On Tuesday 27 March 2007 01:38, [email protected] wrote:
From: Randy Dunlap <[email protected]>
Use NULL instead of 0 for pointers:
drivers/acpi/dock.c:677:75: warning: Using plain integer as NULL pointerSigned-off-by Randy Dunlap <[email protected]>Cc Len Brown <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/acpi/dock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)diff -puN
drivers/acpi/dock.c~acpi-dock-use-null-for-pointerdrivers/acpi/dock.cdrivers/acpi/dock.c renamed from drivers/acpi/dock.c~acpi-dock-use-null-for-pointer +2
-1@@ -29,6 +29,7 @@#include <linux/notifier.h> #include <linux/platform_device.h> #include <linux/jiffies.h> +#include <linux/stddef.h> #include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h> @@ -674,7 +675,7 @@ static ssize_t show_dock_uid(struct devi struct device_attribute *attr, char *buf) { unsigned long lbuf; -acpi_status status =acpi_evaluate_integer (dock_station->handle,"_UID" ,0 , &lbuf); +acpi_status status =acpi_evaluate_integer (dock_station->handle,"_UID" ,NULL , &lbuf);if (ACPI_FAILURE (status)) {return 0 ; }_