* [PATCH] [media] s5p-fimc: Fix incorrect condition in fimc_lite_reqbufs()
@ 2012-09-25 11:19 Sachin Kamat
2012-09-25 13:39 ` Sylwester Nawrocki
0 siblings, 1 reply; 3+ messages in thread
From: Sachin Kamat @ 2012-09-25 11:19 UTC (permalink / raw)
To: linux-media; +Cc: mchehab, s.nawrocki, sachin.kamat, patches
When precedence rules are applied, the condition always evaluates
to be false which was not the intention. Adding the missing braces
for correct evaluation of the expression and subsequent functionality.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/media/platform/s5p-fimc/fimc-lite.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/platform/s5p-fimc/fimc-lite.c b/drivers/media/platform/s5p-fimc/fimc-lite.c
index 9289008..20e5e24 100644
--- a/drivers/media/platform/s5p-fimc/fimc-lite.c
+++ b/drivers/media/platform/s5p-fimc/fimc-lite.c
@@ -825,7 +825,7 @@ static int fimc_lite_reqbufs(struct file *file, void *priv,
reqbufs->count = max_t(u32, FLITE_REQ_BUFS_MIN, reqbufs->count);
ret = vb2_reqbufs(&fimc->vb_queue, reqbufs);
- if (!ret < 0)
+ if (!(ret < 0))
fimc->reqbufs_count = reqbufs->count;
return ret;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [media] s5p-fimc: Fix incorrect condition in fimc_lite_reqbufs()
2012-09-25 11:19 [PATCH] [media] s5p-fimc: Fix incorrect condition in fimc_lite_reqbufs() Sachin Kamat
@ 2012-09-25 13:39 ` Sylwester Nawrocki
2012-09-25 15:28 ` Sachin Kamat
0 siblings, 1 reply; 3+ messages in thread
From: Sylwester Nawrocki @ 2012-09-25 13:39 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-media, mchehab, patches
Hi Sachin,
On 09/25/2012 01:19 PM, Sachin Kamat wrote:
> When precedence rules are applied, the condition always evaluates
> to be false which was not the intention. Adding the missing braces
> for correct evaluation of the expression and subsequent functionality.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
> drivers/media/platform/s5p-fimc/fimc-lite.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/platform/s5p-fimc/fimc-lite.c b/drivers/media/platform/s5p-fimc/fimc-lite.c
> index 9289008..20e5e24 100644
> --- a/drivers/media/platform/s5p-fimc/fimc-lite.c
> +++ b/drivers/media/platform/s5p-fimc/fimc-lite.c
> @@ -825,7 +825,7 @@ static int fimc_lite_reqbufs(struct file *file, void *priv,
>
> reqbufs->count = max_t(u32, FLITE_REQ_BUFS_MIN, reqbufs->count);
> ret = vb2_reqbufs(&fimc->vb_queue, reqbufs);
> - if (!ret < 0)
> + if (!(ret < 0))
> fimc->reqbufs_count = reqbufs->count;
Thanks for the catch. It looks like my search/replace oversight..
I think it's better to just make it
if (!ret)
fimc->reqbufs_count = reqbufs->count;
Since this bug is relatively harmless I could queue it for v3.7, with the
above change if you are OK with that. Or would you like to resend this
patch with changed summary ?
>
> return ret;
Regards,
Sylwester
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [media] s5p-fimc: Fix incorrect condition in fimc_lite_reqbufs()
2012-09-25 13:39 ` Sylwester Nawrocki
@ 2012-09-25 15:28 ` Sachin Kamat
0 siblings, 0 replies; 3+ messages in thread
From: Sachin Kamat @ 2012-09-25 15:28 UTC (permalink / raw)
To: Sylwester Nawrocki; +Cc: linux-media, mchehab, patches
Hi Sylwester,
On 25 September 2012 19:09, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
> Hi Sachin,
>
> On 09/25/2012 01:19 PM, Sachin Kamat wrote:
>> When precedence rules are applied, the condition always evaluates
>> to be false which was not the intention. Adding the missing braces
>> for correct evaluation of the expression and subsequent functionality.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>> drivers/media/platform/s5p-fimc/fimc-lite.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/media/platform/s5p-fimc/fimc-lite.c b/drivers/media/platform/s5p-fimc/fimc-lite.c
>> index 9289008..20e5e24 100644
>> --- a/drivers/media/platform/s5p-fimc/fimc-lite.c
>> +++ b/drivers/media/platform/s5p-fimc/fimc-lite.c
>> @@ -825,7 +825,7 @@ static int fimc_lite_reqbufs(struct file *file, void *priv,
>>
>> reqbufs->count = max_t(u32, FLITE_REQ_BUFS_MIN, reqbufs->count);
>> ret = vb2_reqbufs(&fimc->vb_queue, reqbufs);
>> - if (!ret < 0)
>> + if (!(ret < 0))
>> fimc->reqbufs_count = reqbufs->count;
>
> Thanks for the catch. It looks like my search/replace oversight..
> I think it's better to just make it
>
> if (!ret)
> fimc->reqbufs_count = reqbufs->count;
>
> Since this bug is relatively harmless I could queue it for v3.7, with the
> above change if you are OK with that. Or would you like to resend this
> patch with changed summary ?
Either option is OK with me :)
Anyway I will update the patch as suggested by you and resend with a
simple 1 line summary.
>
>>
>> return ret;
>
> Regards,
> Sylwester
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-25 15:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-25 11:19 [PATCH] [media] s5p-fimc: Fix incorrect condition in fimc_lite_reqbufs() Sachin Kamat
2012-09-25 13:39 ` Sylwester Nawrocki
2012-09-25 15:28 ` Sachin Kamat
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).