All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: acpi: new sparse warnings in 2.6.25-rc2
Date: Thu, 21 Feb 2008 03:53:30 -0500	[thread overview]
Message-ID: <200802210353.30885.lenb@kernel.org> (raw)
In-Reply-To: <1203579134.20345.9.camel@brick>

On Thursday 21 February 2008 02:32, Harvey Harrison wrote:
> Introduced between 2.6.25-rc1 and -rc2.
> 
> drivers/acpi/executer/exregion.c:369:8: warning: incorrect type in argument 3 (different type sizes)
> drivers/acpi/executer/exregion.c:369:8:    expected unsigned int [usertype] *value
> drivers/acpi/executer/exregion.c:369:8:    got unsigned long long [usertype] *value
> 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:

      reply	other threads:[~2008-02-21  8:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21  7:32 acpi: new sparse warnings in 2.6.25-rc2 Harvey Harrison
2008-02-21  8:53 ` Len Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200802210353.30885.lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.