2010-11-03 18:14:12

by Dmitry Torokhov

[permalink] [raw]
Subject: [PATCH] eeepc-wmi: fix compiler warning

This fixes the following:

CC [M] drivers/platform/x86/eeepc-wmi.o
drivers/platform/x86/eeepc-wmi.c:322: warning: initialization from incompatible pointer type

Signed-off-by: Dmitry Torokhov <[email protected]>
---

drivers/platform/x86/eeepc-wmi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index 462ceab..0d50fbb 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -298,8 +298,8 @@ static void eeepc_wmi_notify(u32 value, void *context)
kfree(obj);
}

-static int store_cpufv(struct device *dev, struct device_attribute *attr,
- const char *buf, size_t count)
+static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
{
int value;
struct acpi_buffer input = { (acpi_size)sizeof(value), &value };


2010-11-03 18:44:00

by Chris Bagwell

[permalink] [raw]
Subject: Re: [PATCH] eeepc-wmi: fix compiler warning

On Wed, Nov 3, 2010 at 1:14 PM, Dmitry Torokhov
<[email protected]> wrote:
> This fixes the following:
>
> ?CC [M] ?drivers/platform/x86/eeepc-wmi.o
> drivers/platform/x86/eeepc-wmi.c:322: warning: initialization from incompatible pointer type
>
> Signed-off-by: Dmitry Torokhov <[email protected]>
> ---
>
> ?drivers/platform/x86/eeepc-wmi.c | ? ?4 ++--
> ?1 files changed, 2 insertions(+), 2 deletions(-)
>
>
> diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
> index 462ceab..0d50fbb 100644
> --- a/drivers/platform/x86/eeepc-wmi.c
> +++ b/drivers/platform/x86/eeepc-wmi.c
> @@ -298,8 +298,8 @@ static void eeepc_wmi_notify(u32 value, void *context)
> ? ? ? ?kfree(obj);
> ?}
>
> -static int store_cpufv(struct device *dev, struct device_attribute *attr,
> - ? ? ? ? ? ? ? ? ? ? ?const char *buf, size_t count)
> +static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr,
> + ? ? ? ? ? ? ? ? ? ? ? ? ?const char *buf, size_t count)
> ?{
> ? ? ? ?int value;
> ? ? ? ?struct acpi_buffer input = { (acpi_size)sizeof(value), &value };
> --

Opps. Sorry, I missed that warning. ssize_t is obviously correct return value.

Reviewed-by: Chris Bagwell <[email protected]>

2010-11-14 16:36:42

by Corentin Chary

[permalink] [raw]
Subject: Re: [PATCH] eeepc-wmi: fix compiler warning

On Wed, Nov 3, 2010 at 7:43 PM, Chris Bagwell <[email protected]> wrote:
> On Wed, Nov 3, 2010 at 1:14 PM, Dmitry Torokhov
> <[email protected]> wrote:
>> This fixes the following:
>>
>>  CC [M]  drivers/platform/x86/eeepc-wmi.o
>> drivers/platform/x86/eeepc-wmi.c:322: warning: initialization from incompatible pointer type
>>
>> Signed-off-by: Dmitry Torokhov <[email protected]>
>> ---
>>
>>  drivers/platform/x86/eeepc-wmi.c |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>>
>> diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
>> index 462ceab..0d50fbb 100644
>> --- a/drivers/platform/x86/eeepc-wmi.c
>> +++ b/drivers/platform/x86/eeepc-wmi.c
>> @@ -298,8 +298,8 @@ static void eeepc_wmi_notify(u32 value, void *context)
>>        kfree(obj);
>>  }
>>
>> -static int store_cpufv(struct device *dev, struct device_attribute *attr,
>> -                      const char *buf, size_t count)
>> +static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr,
>> +                          const char *buf, size_t count)
>>  {
>>        int value;
>>        struct acpi_buffer input = { (acpi_size)sizeof(value), &value };
>> --
>
> Opps.  Sorry, I missed that warning.  ssize_t is obviously correct return value.
>
> Reviewed-by: Chris Bagwell <[email protected]>
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Just queued the same patch on my repo, I should have read the list first.

Matthew can you queue this one for next batch ?
Thanks,

--
Corentin Chary
http://xf.iksaif.net

2010-11-24 16:52:29

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH] eeepc-wmi: fix compiler warning

Applied, thanks.

--
Matthew Garrett | [email protected]