public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* i386 warnings in acpi-test
@ 2008-02-16  4:47 Andrew Morton
  2008-02-16  5:42 ` Len Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2008-02-16  4:47 UTC (permalink / raw)
  To: linux-acpi, Len Brown

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i386 warnings in acpi-test
  2008-02-16  4:47 i386 warnings in acpi-test Andrew Morton
@ 2008-02-16  5:42 ` Len Brown
  2008-02-17 21:49   ` Rafael J. Wysocki
  2008-02-21  7:49   ` Len Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Len Brown @ 2008-02-16  5:42 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-acpi

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

On Friday 15 February 2008 23:47, Andrew Morton wrote:
> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i386 warnings in acpi-test
  2008-02-16  5:42 ` Len Brown
@ 2008-02-17 21:49   ` Rafael J. Wysocki
  2008-02-21  7:49   ` Len Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2008-02-17 21:49 UTC (permalink / raw)
  To: Len Brown; +Cc: Andrew Morton, linux-acpi

On Saturday, 16 of February 2008, Len Brown wrote:
> 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(-)

Index: linux-2.6/arch/x86/kernel/acpi/sleep.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/acpi/sleep.c
+++ 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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i386 warnings in acpi-test
  2008-02-16  5:42 ` Len Brown
  2008-02-17 21:49   ` Rafael J. Wysocki
@ 2008-02-21  7:49   ` Len Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Len Brown @ 2008-02-21  7:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-acpi

On Saturday 16 February 2008 00:42, Len Brown wrote:

> > 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 <ming.m.lin@intel.com>

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

Signed-off-by: Ming Lin <ming.m.lin@intel.com>
---
diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c
index 2e9ce94..3f51b7e 100644
--- a/drivers/acpi/executer/exregion.c
+++ b/drivers/acpi/executer/exregion.c
@@ -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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-21  8:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16  4:47 i386 warnings in acpi-test Andrew Morton
2008-02-16  5:42 ` Len Brown
2008-02-17 21:49   ` Rafael J. Wysocki
2008-02-21  7:49   ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox