Message ID | CAPgLHd-QVvRuOFHz0nLKgShmJ383sNs4HD6vxMi4ym75c-q-Zg@mail.gmail.com (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 1TTC81-0003yG-Gj for patchwork@linuxtv.org; Tue, 30 Oct 2012 14:45:13 +0100 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 1TTC80-00037J-Gn; Tue, 30 Oct 2012 14:45:13 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753519Ab2J3NpD (ORCPT <rfc822;patchwork@linuxtv.org>); Tue, 30 Oct 2012 09:45:03 -0400 Received: from mail-qa0-f46.google.com ([209.85.216.46]:61018 "EHLO mail-qa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753395Ab2J3NpB (ORCPT <rfc822;linux-media@vger.kernel.org>); Tue, 30 Oct 2012 09:45:01 -0400 Received: by mail-qa0-f46.google.com with SMTP id c26so2159143qad.19 for <linux-media@vger.kernel.org>; Tue, 30 Oct 2012 06:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=+dQF5AhFDXR9H9GwVns19qm6XcdyMcMMMoR0kBwnMXw=; b=svSEmGOqCHRd/i6qVi7IZtlH/MReuPwjGdch1VcItxzDsnEHnabTZYeWdf/B0Ca5BO bSKx3v2nmacbs3R66bZLG7jzc3KpL25ja9HjCQlcUxcBF1h+GF4J6QtML7DmOOG0aCyc oifFCi9h5tFGGqGbv3/K+Fl9Z36smd5bzDhFl/5vDUrM9TqU43Gn3nI8W6HUnWpfjOfb DXWa86B6yYU1x7wGRx5rV6RXOFRB55lMpC/ilv3P4XfDtzeN3YdXMYX5UuSPLDsNyAZz +3RSxKSrxOnYphw3UPtTJ94MaCxoZpOnpgclNpI0WUHSFOU1Ebs88cL7jSPyQKKwMhM7 xWtA== MIME-Version: 1.0 Received: by 10.49.85.202 with SMTP id j10mr26153134qez.59.1351604700489; Tue, 30 Oct 2012 06:45:00 -0700 (PDT) Received: by 10.229.207.197 with HTTP; Tue, 30 Oct 2012 06:45:00 -0700 (PDT) Date: Tue, 30 Oct 2012 21:45:00 +0800 Message-ID: <CAPgLHd-QVvRuOFHz0nLKgShmJ383sNs4HD6vxMi4ym75c-q-Zg@mail.gmail.com> Subject: [PATCH] [media] vpif_capture: fix condition logic in vpif_capture.c From: Wei Yongjun <weiyj.lk@gmail.com> To: mchehab@infradead.org, prabhakar.lad@ti.com Cc: yongjun_wei@trendmicro.com.cn, linux-media@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 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.10.30.133316 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' CN_TLD 0.1, FORGED_FROM_GMAIL 0.1, MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1400_1499 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DKIM_SIGNATURE 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __DATE_TZ_HK 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_HTTP_RECEIVED 0, __PHISH_SPEAR_STRUCTURE_1 0, __PHISH_SPEAR_STRUCTURE_2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
Wei Yongjun
Oct. 30, 2012, 1:45 p.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> The pattern E == C1 && E == C2 is always false. This patch fix this according to the assumption that && should be ||. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> --- drivers/media/platform/davinci/vpif_capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 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
Comments
Wei, On Tue, Oct 30, 2012 at 7:15 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > The pattern E == C1 && E == C2 is always false. This patch > fix this according to the assumption that && should be ||. > > dpatch engine is used to auto generate this patch. > (https://github.com/weiyj/dpatch) > > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > --- > drivers/media/platform/davinci/vpif_capture.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Thanks for the patch, I'll queue it for 3.8. Regards, --Prabhakar Lad > diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c > index fcabc02..2d28a96 100644 > --- a/drivers/media/platform/davinci/vpif_capture.c > +++ b/drivers/media/platform/davinci/vpif_capture.c > @@ -1715,7 +1715,7 @@ vpif_enum_dv_timings(struct file *file, void *priv, > int ret; > > ret = v4l2_subdev_call(ch->sd, video, enum_dv_timings, timings); > - if (ret == -ENOIOCTLCMD && ret == -ENODEV) > + if (ret == -ENOIOCTLCMD || ret == -ENODEV) > return -EINVAL; > return ret; > } > @@ -1735,7 +1735,7 @@ vpif_query_dv_timings(struct file *file, void *priv, > int ret; > > ret = v4l2_subdev_call(ch->sd, video, query_dv_timings, timings); > - if (ret == -ENOIOCTLCMD && ret == -ENODEV) > + if (ret == -ENOIOCTLCMD || ret == -ENODEV) > return -ENODATA; > return ret; > } > > > -- > 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 -- 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 Wei, On Tue, Oct 30, 2012 at 7:15 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > The pattern E == C1 && E == C2 is always false. This patch > fix this according to the assumption that && should be ||. > > dpatch engine is used to auto generate this patch. > (https://github.com/weiyj/dpatch) > > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > --- > drivers/media/platform/davinci/vpif_capture.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Applied to my tree with following commit message, davinci: vpif_capture: fix return type check for v4l2_subdev_call() The v4l2_subdev_call() call returns -ENODEV when subdev is null and -ENOIOCTLCMD wnen no icotl is present. This patch fixes the return type check for v4l2_subdev_call(). The pattern E == C1 && E == C2 is always false. This patch fix this according to the assumption that && should be ||. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Regards, --Prabhakar Lad > diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c > index fcabc02..2d28a96 100644 > --- a/drivers/media/platform/davinci/vpif_capture.c > +++ b/drivers/media/platform/davinci/vpif_capture.c > @@ -1715,7 +1715,7 @@ vpif_enum_dv_timings(struct file *file, void *priv, > int ret; > > ret = v4l2_subdev_call(ch->sd, video, enum_dv_timings, timings); > - if (ret == -ENOIOCTLCMD && ret == -ENODEV) > + if (ret == -ENOIOCTLCMD || ret == -ENODEV) > return -EINVAL; > return ret; > } > @@ -1735,7 +1735,7 @@ vpif_query_dv_timings(struct file *file, void *priv, > int ret; > > ret = v4l2_subdev_call(ch->sd, video, query_dv_timings, timings); > - if (ret == -ENOIOCTLCMD && ret == -ENODEV) > + if (ret == -ENOIOCTLCMD || ret == -ENODEV) > return -ENODATA; > return ret; > } > > > -- > 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 -- 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
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index fcabc02..2d28a96 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -1715,7 +1715,7 @@ vpif_enum_dv_timings(struct file *file, void *priv, int ret; ret = v4l2_subdev_call(ch->sd, video, enum_dv_timings, timings); - if (ret == -ENOIOCTLCMD && ret == -ENODEV) + if (ret == -ENOIOCTLCMD || ret == -ENODEV) return -EINVAL; return ret; } @@ -1735,7 +1735,7 @@ vpif_query_dv_timings(struct file *file, void *priv, int ret; ret = v4l2_subdev_call(ch->sd, video, query_dv_timings, timings); - if (ret == -ENOIOCTLCMD && ret == -ENODEV) + if (ret == -ENOIOCTLCMD || ret == -ENODEV) return -ENODATA; return ret; }