* [Git Patch] ACPI: Fix a warning of discarding qualifiers from pointer target type
[not found] <20070821132038.GA22254@ff.dom.local>
@ 2007-08-21 15:07 ` WANG Cong
2007-08-21 15:14 ` Alexey Starikovskiy
0 siblings, 1 reply; 8+ messages in thread
From: WANG Cong @ 2007-08-21 15:07 UTC (permalink / raw)
To: Jarek Poplawski
Cc: linux-kernel, linux-acpi, astarikovskiy, len.brown, Andrew Morton
Fix this warning:
drivers/acpi/ec.c: In function `acpi_ec_ecdt_probe':
drivers/acpi/ec.c:873: warning: passing arg 1 of `acpi_get_devices' discards qualifiers from pointer target type
(I don't know whether this fix hits the real problem.)
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
---
drivers/acpi/ec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6.23-rc3-git3/drivers/acpi/ec.c
===================================================================
--- linux-2.6.23-rc3-git3.orig/drivers/acpi/ec.c
+++ linux-2.6.23-rc3-git3/drivers/acpi/ec.c
@@ -869,8 +869,8 @@ int __init acpi_ec_ecdt_probe(void)
boot_ec->handle = ACPI_ROOT_OBJECT;
} else {
printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
- status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
- boot_ec, NULL);
+ status = acpi_get_devices((char *)ec_device_ids[0].id,
+ ec_parse_device, boot_ec, NULL);
if (ACPI_FAILURE(status))
goto error;
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Git Patch] ACPI: Fix a warning of discarding qualifiers from pointer target type
2007-08-21 15:07 ` [Git Patch] ACPI: Fix a warning of discarding qualifiers from pointer target type WANG Cong
@ 2007-08-21 15:14 ` Alexey Starikovskiy
2007-08-21 15:18 ` Al Viro
0 siblings, 1 reply; 8+ messages in thread
From: Alexey Starikovskiy @ 2007-08-21 15:14 UTC (permalink / raw)
To: WANG Cong
Cc: Jarek Poplawski, linux-kernel, linux-acpi, len.brown,
Andrew Morton
WANG Cong wrote:
> Fix this warning:
>
> drivers/acpi/ec.c: In function `acpi_ec_ecdt_probe':
> drivers/acpi/ec.c:873: warning: passing arg 1 of `acpi_get_devices' discards qualifiers from pointer target type
>
> (I don't know whether this fix hits the real problem.)
>
It is safe to give acpi_get_devices() const string, as it should not
modify it in any condition.
> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
>
>
ACK
Thanks,
Alex
> ---
> drivers/acpi/ec.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: linux-2.6.23-rc3-git3/drivers/acpi/ec.c
> ===================================================================
> --- linux-2.6.23-rc3-git3.orig/drivers/acpi/ec.c
> +++ linux-2.6.23-rc3-git3/drivers/acpi/ec.c
> @@ -869,8 +869,8 @@ int __init acpi_ec_ecdt_probe(void)
> boot_ec->handle = ACPI_ROOT_OBJECT;
> } else {
> printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
> - status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
> - boot_ec, NULL);
> + status = acpi_get_devices((char *)ec_device_ids[0].id,
> + ec_parse_device, boot_ec, NULL);
> if (ACPI_FAILURE(status))
> goto error;
> }
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Git Patch] ACPI: Fix a warning of discarding qualifiers from pointer target type
2007-08-21 15:14 ` Alexey Starikovskiy
@ 2007-08-21 15:18 ` Al Viro
2007-08-21 15:22 ` Alexey Starikovskiy
2007-08-22 7:57 ` Jarek Poplawski
0 siblings, 2 replies; 8+ messages in thread
From: Al Viro @ 2007-08-21 15:18 UTC (permalink / raw)
To: Alexey Starikovskiy
Cc: WANG Cong, Jarek Poplawski, linux-kernel, linux-acpi, len.brown,
Andrew Morton
On Tue, Aug 21, 2007 at 07:14:49PM +0400, Alexey Starikovskiy wrote:
> WANG Cong wrote:
> > Fix this warning:
> >
> > drivers/acpi/ec.c: In function `acpi_ec_ecdt_probe':
> > drivers/acpi/ec.c:873: warning: passing arg 1 of `acpi_get_devices' discards qualifiers from pointer target type
> >
> > (I don't know whether this fix hits the real problem.)
> >
> It is safe to give acpi_get_devices() const string, as it should not
> modify it in any condition.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
index ab65b2c..f39fbc6 100644
--- a/drivers/acpi/namespace/nsxfeval.c
+++ b/drivers/acpi/namespace/nsxfeval.c
@@ -540,7 +540,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
******************************************************************************/
acpi_status
-acpi_get_devices(char *HID,
+acpi_get_devices(const char *HID,
acpi_walk_callback user_function,
void *context, void **return_value)
{
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index b5cca5d..3d7ab9e 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -130,7 +130,7 @@ acpi_walk_namespace(acpi_object_type type,
void *context, void **return_value);
acpi_status
-acpi_get_devices(char *HID,
+acpi_get_devices(const char *HID,
acpi_walk_callback user_function,
void *context, void **return_value);
diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h
index aeb4498..8848265 100644
--- a/include/acpi/acstruct.h
+++ b/include/acpi/acstruct.h
@@ -146,7 +146,7 @@ struct acpi_init_walk_info {
struct acpi_get_devices_info {
acpi_walk_callback user_function;
void *context;
- char *hid;
+ const char *hid;
};
union acpi_aml_operands {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Git Patch] ACPI: Fix a warning of discarding qualifiers from pointer target type
2007-08-21 15:18 ` Al Viro
@ 2007-08-21 15:22 ` Alexey Starikovskiy
2007-08-21 15:47 ` Al Viro
2007-08-22 7:57 ` Jarek Poplawski
1 sibling, 1 reply; 8+ messages in thread
From: Alexey Starikovskiy @ 2007-08-21 15:22 UTC (permalink / raw)
To: Al Viro
Cc: WANG Cong, Jarek Poplawski, linux-kernel, linux-acpi, len.brown,
Andrew Morton
Al Viro wrote:
> On Tue, Aug 21, 2007 at 07:14:49PM +0400, Alexey Starikovskiy wrote:
>
>> WANG Cong wrote:
>>
>>> Fix this warning:
>>>
>>> drivers/acpi/ec.c: In function `acpi_ec_ecdt_probe':
>>> drivers/acpi/ec.c:873: warning: passing arg 1 of `acpi_get_devices' discards qualifiers from pointer target type
>>>
>>> (I don't know whether this fix hits the real problem.)
>>>
>>>
>> It is safe to give acpi_get_devices() const string, as it should not
>> modify it in any condition.
>>
>
>
Yes, that is the proper solution with a single drawback:
it touches ACPICA dual-licensed code and would take ages to commit,
and Len would probably ask you to give permission to re-license it under
BSD.
Regards,
Alex.
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
> index ab65b2c..f39fbc6 100644
> --- a/drivers/acpi/namespace/nsxfeval.c
> +++ b/drivers/acpi/namespace/nsxfeval.c
> @@ -540,7 +540,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
> ******************************************************************************/
>
> acpi_status
> -acpi_get_devices(char *HID,
> +acpi_get_devices(const char *HID,
> acpi_walk_callback user_function,
> void *context, void **return_value)
> {
> diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
> index b5cca5d..3d7ab9e 100644
> --- a/include/acpi/acpixf.h
> +++ b/include/acpi/acpixf.h
> @@ -130,7 +130,7 @@ acpi_walk_namespace(acpi_object_type type,
> void *context, void **return_value);
>
> acpi_status
> -acpi_get_devices(char *HID,
> +acpi_get_devices(const char *HID,
> acpi_walk_callback user_function,
> void *context, void **return_value);
>
> diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h
> index aeb4498..8848265 100644
> --- a/include/acpi/acstruct.h
> +++ b/include/acpi/acstruct.h
> @@ -146,7 +146,7 @@ struct acpi_init_walk_info {
> struct acpi_get_devices_info {
> acpi_walk_callback user_function;
> void *context;
> - char *hid;
> + const char *hid;
> };
>
> union acpi_aml_operands {
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Git Patch] ACPI: Fix a warning of discarding qualifiers from pointer target type
2007-08-21 15:22 ` Alexey Starikovskiy
@ 2007-08-21 15:47 ` Al Viro
2007-08-23 0:59 ` Brown, Len
0 siblings, 1 reply; 8+ messages in thread
From: Al Viro @ 2007-08-21 15:47 UTC (permalink / raw)
To: Alexey Starikovskiy
Cc: WANG Cong, Jarek Poplawski, linux-kernel, linux-acpi, len.brown,
Andrew Morton
On Tue, Aug 21, 2007 at 07:22:51PM +0400, Alexey Starikovskiy wrote:
> Yes, that is the proper solution with a single drawback:
> it touches ACPICA dual-licensed code and would take ages to commit,
> and Len would probably ask you to give permission to re-license it under
> BSD.
The latter is certainly not a problem (assuming that it's non-trivial
enough to be copyrightable, in the first place).
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Git Patch] ACPI: Fix a warning of discarding qualifiers from pointer target type
2007-08-21 15:18 ` Al Viro
2007-08-21 15:22 ` Alexey Starikovskiy
@ 2007-08-22 7:57 ` Jarek Poplawski
1 sibling, 0 replies; 8+ messages in thread
From: Jarek Poplawski @ 2007-08-22 7:57 UTC (permalink / raw)
To: Al Viro
Cc: Alexey Starikovskiy, WANG Cong, linux-kernel, linux-acpi,
len.brown, Andrew Morton
On Tue, Aug 21, 2007 at 04:18:20PM +0100, Al Viro wrote:
> On Tue, Aug 21, 2007 at 07:14:49PM +0400, Alexey Starikovskiy wrote:
> > WANG Cong wrote:
> > > Fix this warning:
> > >
> > > drivers/acpi/ec.c: In function `acpi_ec_ecdt_probe':
> > > drivers/acpi/ec.c:873: warning: passing arg 1 of `acpi_get_devices' discards qualifiers from pointer target type
> > >
> > > (I don't know whether this fix hits the real problem.)
> > >
> > It is safe to give acpi_get_devices() const string, as it should not
> > modify it in any condition.
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
> index ab65b2c..f39fbc6 100644
> --- a/drivers/acpi/namespace/nsxfeval.c
> +++ b/drivers/acpi/namespace/nsxfeval.c
> @@ -540,7 +540,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
> ******************************************************************************/
>
> acpi_status
> -acpi_get_devices(char *HID,
> +acpi_get_devices(const char *HID,
> acpi_walk_callback user_function,
> void *context, void **return_value)
> {
> diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
> index b5cca5d..3d7ab9e 100644
> --- a/include/acpi/acpixf.h
> +++ b/include/acpi/acpixf.h
> @@ -130,7 +130,7 @@ acpi_walk_namespace(acpi_object_type type,
> void *context, void **return_value);
>
> acpi_status
> -acpi_get_devices(char *HID,
> +acpi_get_devices(const char *HID,
> acpi_walk_callback user_function,
> void *context, void **return_value);
>
> diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h
> index aeb4498..8848265 100644
> --- a/include/acpi/acstruct.h
> +++ b/include/acpi/acstruct.h
> @@ -146,7 +146,7 @@ struct acpi_init_walk_info {
> struct acpi_get_devices_info {
> acpi_walk_callback user_function;
> void *context;
> - char *hid;
> + const char *hid;
> };
>
> union acpi_aml_operands {
>
So, it looks like this patch (or at least its -mm version) is working.
Now there is 'only' like this (there could be something new, because
I've forgotten to mention this yesterday's log was the second make,
after removing some small testing patch; here it's after make clean;
.config is the same; gcc 3.2.3):
sed: -e expression #1, char 154: Unknown option to 's'
kernel/power/pm.c:205: warning: `pm_register' is deprecated (declared at kernel/power/pm.c:64)
kernel/power/pm.c:205: warning: `pm_register' is deprecated (declared at kernel/power/pm.c:64)
kernel/power/pm.c:206: warning: `pm_send_all' is deprecated (declared at kernel/power/pm.c:180)
kernel/power/pm.c:206: warning: `pm_send_all' is deprecated (declared at kernel/power/pm.c:180)
drivers/pci/search.c: In function `pci_find_slot':
drivers/pci/search.c:99: warning: `pci_find_device' is deprecated (declared at include/linux/pci.h:480)
drivers/pci/search.c: At top level:
drivers/pci/search.c:437: warning: `pci_find_device' is deprecated (declared at drivers/pci/search.c:244)
drivers/pci/search.c:437: warning: `pci_find_device' is deprecated (declared at drivers/pci/search.c:244)
drivers/pci/search.c:438: warning: `pci_find_slot' is deprecated (declared at drivers/pci/search.c:96)
drivers/pci/search.c:438: warning: `pci_find_slot' is deprecated (declared at drivers/pci/search.c:96)
drivers/pci/msi.c:686: warning: weak declaration of `arch_msi_check_device' after first use results in unspecified behavior
drivers/pci/msi.c:698: warning: weak declaration of `arch_setup_msi_irqs' after first use results in unspecified behavior
drivers/pci/msi.c:718: warning: weak declaration of `arch_teardown_msi_irqs' after first use results in unspecified behavior
In file included from drivers/usb/host/ohci-hcd.c:859:
drivers/usb/host/ohci-pci.c: In function `ohci_pci_start':
drivers/usb/host/ohci-pci.c:202: warning: unused variable `pdev'
include/asm/processor.h: In function `native_get_debugreg':
include/asm/processor.h:524: warning: asm operand 0 probably doesn't match constraints
include/asm/processor.h: In function `native_set_debugreg':
include/asm/processor.h:551: warning: asm operand 0 probably doesn't match constraints
Root device is (8, 1)
Setup is 11036 bytes (padded to 11264 bytes).
System is 2428 kB
Cheers,
Jarek P.
PS: does somebody here remember these old good times:
real 56m19.454s
user 53m38.580s
sys 2m7.610s
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [Git Patch] ACPI: Fix a warning of discarding qualifiers from pointer target type
2007-08-21 15:47 ` Al Viro
@ 2007-08-23 0:59 ` Brown, Len
2007-08-23 1:28 ` Al Viro
0 siblings, 1 reply; 8+ messages in thread
From: Brown, Len @ 2007-08-23 0:59 UTC (permalink / raw)
To: Al Viro, Alexey Starikovskiy
Cc: WANG Cong, Jarek Poplawski, linux-kernel, linux-acpi,
Andrew Morton
>On Tue, Aug 21, 2007 at 07:22:51PM +0400, Alexey Starikovskiy wrote:
>> Yes, that is the proper solution with a single drawback:
>> it touches ACPICA dual-licensed code and would take ages to commit,
>> and Len would probably ask you to give permission to
>re-license it under
>> BSD.
>
>The latter is certainly not a problem (assuming that it's non-trivial
>enough to be copyrightable, in the first place).
The dual license is at the top of the file.
I just need to know when you touch one of these dual-license files
that Intel has your permission to ship your change to folks we
send the same file to under the BSD-style non-GPL license.
eg. BSD, Solaris and HPUX uses this same ACPICA files -- though in a
different format.
I've actually never had anybody say no when I asked.
And I've had some people who play laywers on TV tell me
this is not strictly necessary, but other people who play laywers
on TV tell me it is best to ask, so I do.
thanks,
-Len
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Git Patch] ACPI: Fix a warning of discarding qualifiers from pointer target type
2007-08-23 0:59 ` Brown, Len
@ 2007-08-23 1:28 ` Al Viro
0 siblings, 0 replies; 8+ messages in thread
From: Al Viro @ 2007-08-23 1:28 UTC (permalink / raw)
To: Brown, Len
Cc: Alexey Starikovskiy, WANG Cong, Jarek Poplawski, linux-kernel,
linux-acpi, Andrew Morton
On Wed, Aug 22, 2007 at 08:59:48PM -0400, Brown, Len wrote:
> The dual license is at the top of the file.
> I just need to know when you touch one of these dual-license files
> that Intel has your permission to ship your change to folks we
> send the same file to under the BSD-style non-GPL license.
> eg. BSD, Solaris and HPUX uses this same ACPICA files -- though in a
> different format.
You have it.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-08-23 1:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20070821132038.GA22254@ff.dom.local>
2007-08-21 15:07 ` [Git Patch] ACPI: Fix a warning of discarding qualifiers from pointer target type WANG Cong
2007-08-21 15:14 ` Alexey Starikovskiy
2007-08-21 15:18 ` Al Viro
2007-08-21 15:22 ` Alexey Starikovskiy
2007-08-21 15:47 ` Al Viro
2007-08-23 0:59 ` Brown, Len
2007-08-23 1:28 ` Al Viro
2007-08-22 7:57 ` Jarek Poplawski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).