Message ID | 1348571944-7139-1-git-send-email-sachin.kamat@linaro.org (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1TGTEE-0002RW-F2 for patchwork@linuxtv.org; Tue, 25 Sep 2012 13:23:02 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp for <patchwork@linuxtv.org> id 1TGTED-0002rh-Ii; Tue, 25 Sep 2012 13:23:02 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755539Ab2IYLWp (ORCPT <rfc822;patchwork@linuxtv.org>); Tue, 25 Sep 2012 07:22:45 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:56770 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754810Ab2IYLWo (ORCPT <rfc822;linux-media@vger.kernel.org>); Tue, 25 Sep 2012 07:22:44 -0400 Received: by padhz1 with SMTP id hz1so1591877pad.19 for <linux-media@vger.kernel.org>; Tue, 25 Sep 2012 04:22:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=iwXK/ENJbNSuF1XrIuDvWHGNpuX30TEM0t+iuFaxOso=; b=bxuC9CYlzlAbvZqiUSZ3mbMO7ZYM4i/o0gXm8UFg4wLi031m5AAiV4LyyRodjvoZDp WQpErRVgWfoaWld2s6nOeRLB826o/fQsHY/KQYjfYj9j6DE4s6Wsrq5Omj2i6fxCYceF 2DleppF2vffyZceGTHudF3iunHfW1f57gieyqkF1n1D7OdQhPWT2PhvArGXMR1CMNrYw 1lqbnY7vO9oSttIZW9qteepEHy1RbC9I4r6O2gNd9/UCsQj20lqv1RXfaLySUcv9LSNY 1ui/a3FZRlmOe9rF+awEHqyIIAmtIcfWfKw5SQgwIWPfebNf4aoLh/PnHdqbfVcsgwdP mESw== Received: by 10.68.136.229 with SMTP id qd5mr12733776pbb.154.1348572163551; Tue, 25 Sep 2012 04:22:43 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id uh7sm197087pbc.35.2012.09.25.04.22.40 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 04:22:42 -0700 (PDT) From: Sachin Kamat <sachin.kamat@linaro.org> To: linux-media@vger.kernel.org Cc: mchehab@infradead.org, s.nawrocki@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH] [media] s5p-fimc: Fix incorrect condition in fimc_lite_reqbufs() Date: Tue, 25 Sep 2012 16:49:04 +0530 Message-Id: <1348571944-7139-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQljUJTXMz/RGFXUz/lho2kU0CrhFwYJuw+dQ+6FC35TKH/Ivqbi4gTHPES70eZ49niZmhRk Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.9.25.111529 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_1099 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
Sachin Kamat
Sept. 25, 2012, 11:19 a.m. UTC
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(-)
Comments
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 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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
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;