Skip to contentSkip to conversation

i386 warnings in acpi-test

DISCUSSION Andrew Morton 3 participants 4 messages Feb 16, 2008 – Feb 21, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

arch/x86/kernel/acpi/sleep.c: In function 'acpi_save_state_mem':
arch/x86/kernel/acpi/sleep.c:55: warning: passing argument 1 of 'native_store_gdt' from incompatible pointer type arch/x86/kernel/acpi/sleep.c:71: warning: assignment makes integer from pointer without a cast arch/x86/kernel/acpi/sleep.c:72: warning: assignment makes integer from pointer without a cast

drivers/acpi/executer/exregion.c: In function 'acpi_ex_pci_config_space_handler':
drivers/acpi/executer/exregion.c:369: warning: passing argument 3 of 'acpi_os_read_pci_configuration' from incompatible pointer type

reviewer
#1 lore raw

yeah, i know.

Linus personally created this one last week.

We're waiting for him to cool off before we re-suggest a patch that actually works:-)

-Len

Quoted 14 lines · Andrew Morton

arch/x86/kernel/acpi/sleep.c: In function 'acpi_save_state_mem':
arch/x86/kernel/acpi/sleep.c:55: warning: passing argument 1 of 'native_store_gdt' from incompatible pointer type arch/x86/kernel/acpi/sleep.c:71: warning: assignment makes integer from pointer without a cast arch/x86/kernel/acpi/sleep.c:72: warning: assignment makes integer from pointer without a cast

drivers/acpi/executer/exregion.c: In function 'acpi_ex_pci_config_space_handler':
drivers/acpi/executer/exregion.c:369: warning: passing argument 3 of 'acpi_os_read_pci_configuration' from incompatible pointer type

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 5 lines · Len Brown

yeah, i know.

Linus personally created this one last week.

We're waiting for him to cool off before we re-suggest a patch that actually works:-)

Well, perhaps something like the appended one?

Thanks,
Rafael

---
 arch/x86/kernel/acpi/sleep.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/acpi/sleep.c +3 -3
Index: linux-2.6/arch/x86/kernel/acpi/sleep.c
===================================================================
@@ -52,7 +52,7 @@ int acpi_save_state_mem(void)
 	header->video_mode = saved_video_mode;
 
 #ifndef CONFIG_64BIT
-	store_gdt(&header->pmode_gdt);
+	store_gdt((struct desc_ptr *)&header->pmode_gdt);
 
 	header->pmode_efer_low = nx_enabled;
 	if (header->pmode_efer_low & 1) {
@@ -68,8 +68,8 @@ int acpi_save_state_mem(void)
 	header->real_magic = 0x12345678;
 
 #ifndef CONFIG_64BIT
-	header->pmode_entry = &wakeup_pmode_return;
-	header->pmode_cr3 = swsusp_pg_dir - __PAGE_OFFSET;
+	header->pmode_entry = (u32)&wakeup_pmode_return;
+	header->pmode_cr3 = (u32)(swsusp_pg_dir - __PAGE_OFFSET);
 	saved_magic = 0x12345678;
 #else /* CONFIG_64BIT */
 	header->trampoline_segment = setup_trampoline() >> 4;
reviewer
#3 lore raw
In reply to Len Brown
Quoted 2 lines · Len Brown
Quoted 2 lines

drivers/acpi/executer/exregion.c: In function 'acpi_ex_pci_config_space_handler':
drivers/acpi/executer/exregion.c:369: warning: passing argument 3 of 'acpi_os_read_pci_configuration' from incompatible pointer type

Subject: ACPI: fix build warning
From: Ming Lin <[email protected]>

CC drivers/acpi/executer/exregion.o
drivers/acpi/executer/exregion.c: In function ‘acpi_ex_pci_config_space_handler’:
drivers/acpi/executer/exregion.c:369: attention : passing argument 3 of ‘acpi_os_read_pci_configuration’ from incompatible pointer type

exposed by 10270d4838bdc493781f5a1cf2e90e9c34c9142f

http://bugzilla.kernel.org/show_bug.cgi?id=9989

---

drivers/acpi/executer/exregion.c +3 -2
index 2e9ce94..3f51b7e 100644
@@ -338,6 +338,7 @@ acpi_ex_pci_config_space_handler(u32 function,
 	acpi_status status = AE_OK;
 	struct acpi_pci_id *pci_id;
 	u16 pci_register;
+	u32 value32;
 
 	ACPI_FUNCTION_TRACE(ex_pci_config_space_handler);
 
@@ -364,9 +365,9 @@ acpi_ex_pci_config_space_handler(u32 function,
 	switch (function) {
 	case ACPI_READ:
 
-		*value = 0;
 		status = acpi_os_read_pci_configuration(pci_id, pci_register,
-							value, bit_width);
+							&value32, bit_width);
+		*value = value32;
 		break;
 
 	case ACPI_WRITE:

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html