Skip to contentSkip to conversation

Fix argument type for acpi_evaluate_integer in acpi_get_physical_pci_device

PATCH In review Andrey Borzenkov 3 participants 5 messages Nov 3, 2008 – Nov 12, 2008 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix argument type for acpi_evaluate_integer in acpi_get_physical_pci_device

Subject: [PATCH] Fix argument type for acpi_evaluate_integer in acpi_get_physical_pci_device
From: Andrey Borzenkov <[email protected]>

CC drivers/acpi/glue.o
/home/bor/src/linux-git/drivers/acpi/glue.c: In function 'acpi_get_physical_pci_device':
/home/bor/src/linux-git/drivers/acpi/glue.c:157: warning: passing argument 4 of 'acpi_evaluate_integer' from incompatible pointer type

acpi_evaluate_integer takes pointer to unsigned long long as fourth argument

---

 drivers/acpi/glue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/glue.c +1 -1
index 98c9c76..436c8a3 100644
@@ -150,7 +150,7 @@ EXPORT_SYMBOL(acpi_get_physical_device);
 struct device *acpi_get_physical_pci_device(acpi_handle handle)
 {
 	struct device *dev;
-	long device_id;
+	unsigned long long device_id;
 	acpi_status status;
 
 	status =
#1 lore raw
Quoted 22 lines · On Mon, 3 Nov 2008 12:16:13 +0300 Andrey Borzenkov <[email protected]> wrote:

Subject: [PATCH] Fix argument type for acpi_evaluate_integer in acpi_get_physical_pci_device
From: Andrey Borzenkov <[email protected]>

CC drivers/acpi/glue.o
/home/bor/src/linux-git/drivers/acpi/glue.c: In function 'acpi_get_physical_pci_device':
/home/bor/src/linux-git/drivers/acpi/glue.c:157: warning: passing argument 4 of 'acpi_evaluate_integer' from incompatible pointer type

acpi_evaluate_integer takes pointer to unsigned long long as fourth argument

---

 drivers/acpi/glue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/glue.c +0 -0
index 98c9c76..436c8a3 100644

drivers/acpi/glue.c EXPORT_SYMBOL(acpi_get_physical_device); · line 156

Quoted 8 lines
drivers/acpi/glue.c +1 -1
@@ -150,7 +150,7 @@ EXPORT_SYMBOL(acpi_get_physical_device);
 struct device *acpi_get_physical_pci_device(acpi_handle handle)
 {
 	struct device *dev;
-	long device_id;
+	unsigned long long device_id;
 	acpi_status status;
 
 	status =

Someone has gone and changed this to `long long', which is still wrong but which (surprisingly) doesn't seem to generate a compilation warning.

#2 lore raw
Quoted 32 lines · Andrew Morton
Quoted 29 lines · On Mon, 3 Nov 2008 12:16:13 +0300 Andrey Borzenkov <[email protected]> wrote:

Subject: [PATCH] Fix argument type for acpi_evaluate_integer in acpi_get_physical_pci_device
From: Andrey Borzenkov <[email protected]>

CC drivers/acpi/glue.o
/home/bor/src/linux-git/drivers/acpi/glue.c: In function 'acpi_get_physical_pci_device':
/home/bor/src/linux-git/drivers/acpi/glue.c:157: warning: passing argument 4 of 'acpi_evaluate_integer' from incompatible pointer type

acpi_evaluate_integer takes pointer to unsigned long long as fourth argument

---

 drivers/acpi/glue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/glue.c +1 -1
index 98c9c76..436c8a3 100644
@@ -150,7 +150,7 @@ EXPORT_SYMBOL(acpi_get_physical_device);
 struct device *acpi_get_physical_pci_device(acpi_handle handle)
 {
 	struct device *dev;
-	long device_id;
+	unsigned long long device_id;
 	acpi_status status;
 
Quoted 7 lines

drivers/acpi/glue.c EXPORT_SYMBOL(acpi_get_physical_device); · line 156

Quoted 1 line
drivers/acpi/glue.c +0 -0
 	status =

Someone has gone and changed this to `long long', which is still wrong but which (surprisingly) doesn't seem to generate a compilation warning.

Well, size became correct and this is probably what matters most here. I still do not quite understand what made this function so special comparing to all others.

reviewer
#3 lore raw
In reply to Andrey Borzenkov

unclear what kernel this is supposed to apply to.

Quoted 31 lines · Andrey Borzenkov

Subject: [PATCH] Fix argument type for acpi_evaluate_integer in acpi_get_physical_pci_device
From: Andrey Borzenkov <[email protected]>

CC drivers/acpi/glue.o
/home/bor/src/linux-git/drivers/acpi/glue.c: In function 'acpi_get_physical_pci_device':
/home/bor/src/linux-git/drivers/acpi/glue.c:157: warning: passing argument 4 of 'acpi_evaluate_integer' from incompatible pointer type

acpi_evaluate_integer takes pointer to unsigned long long as fourth argument

---

 drivers/acpi/glue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/glue.c +1 -1
index 98c9c76..436c8a3 100644
@@ -150,7 +150,7 @@ EXPORT_SYMBOL(acpi_get_physical_device);
 struct device *acpi_get_physical_pci_device(acpi_handle handle)
 {
 	struct device *dev;
-	long device_id;
+	unsigned long long device_id;
 	acpi_status status;
 
 	status =
#4 lore raw
Quoted 2 lines · Len Brown

unclear what kernel this is supposed to apply to.

The patch was against 2.6.28-rc3 and applies to rc4 as well. Sorry for not mentioning this (I thought I did)

Quoted 35 lines · Andrey Borzenkov
Quoted 32 lines

Subject: [PATCH] Fix argument type for acpi_evaluate_integer in acpi_get_physical_pci_device
From: Andrey Borzenkov <[email protected]>

CC drivers/acpi/glue.o
/home/bor/src/linux-git/drivers/acpi/glue.c: In function 'acpi_get_physical_pci_device':
/home/bor/src/linux-git/drivers/acpi/glue.c:157: warning: passing argument 4 of 'acpi_evaluate_integer' from incompatible pointer type

acpi_evaluate_integer takes pointer to unsigned long long as fourth argument

---

 drivers/acpi/glue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/glue.c +1 -1
index 98c9c76..436c8a3 100644
@@ -150,7 +150,7 @@ EXPORT_SYMBOL(acpi_get_physical_device);
 struct device *acpi_get_physical_pci_device(acpi_handle handle)
 {
 	struct device *dev;
-	long device_id;
+	unsigned long long device_id;
 	acpi_status status;
 
 	status =