From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: WANG Cong <xiyou.wangcong@gmail.com>,
Jarek Poplawski <jarkao2@o2.pl>,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
len.brown@intel.com, Andrew Morton <akpm@osdl.org>
Subject: Re: [Git Patch] ACPI: Fix a warning of discarding qualifiers from pointer target type
Date: Tue, 21 Aug 2007 19:22:51 +0400 [thread overview]
Message-ID: <46CB034B.1070904@suse.de> (raw)
In-Reply-To: <20070821151820.GB21089@ftp.linux.org.uk>
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 {
>
next prev parent reply other threads:[~2007-08-21 15:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
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
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=46CB034B.1070904@suse.de \
--to=astarikovskiy@suse.de \
--cc=akpm@osdl.org \
--cc=jarkao2@o2.pl \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
--cc=xiyou.wangcong@gmail.com \
/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 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).