* [PATCH 1/1] mfd: aat2870: Fix sparse error
@ 2013-09-10 10:55 Sachin Kamat
2013-09-10 11:20 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2013-09-10 10:55 UTC (permalink / raw)
To: linux-kernel; +Cc: lee.jones, sameo, sachin.kamat, Jin Park
Fixes the following error:
drivers/mfd/aat2870-core.c:296:20: error:
incompatible types in comparison expression (different type sizes)
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Jin Park <jinyoungp@nvidia.com>
---
drivers/mfd/aat2870-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c
index 6f68472..14d9542 100644
--- a/drivers/mfd/aat2870-core.c
+++ b/drivers/mfd/aat2870-core.c
@@ -293,7 +293,7 @@ static ssize_t aat2870_reg_write_file(struct file *file,
unsigned long addr, val;
int ret;
- buf_size = min(count, (sizeof(buf)-1));
+ buf_size = min(count, (size_t)(sizeof(buf)-1));
if (copy_from_user(buf, user_buf, buf_size)) {
dev_err(aat2870->dev, "Failed to copy from user\n");
return -EFAULT;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] mfd: aat2870: Fix sparse error
2013-09-10 10:55 [PATCH 1/1] mfd: aat2870: Fix sparse error Sachin Kamat
@ 2013-09-10 11:20 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2013-09-10 11:20 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-kernel, sameo, Jin Park
On Tue, 10 Sep 2013, Sachin Kamat wrote:
> Fixes the following error:
> drivers/mfd/aat2870-core.c:296:20: error:
> incompatible types in comparison expression (different type sizes)
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Jin Park <jinyoungp@nvidia.com>
> ---
> drivers/mfd/aat2870-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c
> index 6f68472..14d9542 100644
> --- a/drivers/mfd/aat2870-core.c
> +++ b/drivers/mfd/aat2870-core.c
> @@ -293,7 +293,7 @@ static ssize_t aat2870_reg_write_file(struct file *file,
> unsigned long addr, val;
> int ret;
>
> - buf_size = min(count, (sizeof(buf)-1));
> + buf_size = min(count, (size_t)(sizeof(buf)-1));
> if (copy_from_user(buf, user_buf, buf_size)) {
> dev_err(aat2870->dev, "Failed to copy from user\n");
> return -EFAULT;
Applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-10 11:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-10 10:55 [PATCH 1/1] mfd: aat2870: Fix sparse error Sachin Kamat
2013-09-10 11:20 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox