Message ID | CAPgLHd-p6=0ay8ZKJ=sNzyS5C6x0dJTH=EO1SqwiYciO2gTUJg@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 1TTCCM-0004HF-73 for patchwork@linuxtv.org; Tue, 30 Oct 2012 14:49:42 +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 1TTCCL-00046A-Hj; Tue, 30 Oct 2012 14:49:42 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753338Ab2J3Ntk (ORCPT <rfc822;patchwork@linuxtv.org>); Tue, 30 Oct 2012 09:49:40 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:55759 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753004Ab2J3Ntj (ORCPT <rfc822;linux-media@vger.kernel.org>); Tue, 30 Oct 2012 09:49:39 -0400 Received: by mail-qc0-f174.google.com with SMTP id o22so159658qcr.19 for <linux-media@vger.kernel.org>; Tue, 30 Oct 2012 06:49:38 -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=8IT2cPSDNMVyvjrCYzk675LTBeG7AnD9/Py0/MKRZSQ=; b=NxsBByJ5lhnIwquF0yB+J272QCayWxxNRDV3WsE7vxm21/x8dPHruYQeF/dCzMoevi Pf6sA/DPvouAkQZ7X648fxsEVOh20cHSjXMxRdJyGm7fwikqbDLWW6aunaRT0Y2Ow6yI TTnBtHa9rj6nAnidRMzpiPJZbvMIwr0tu8EwQJ551i2CqYRQSMvq8ayRPjlNOubgthRG gS0/x0bSA7pi3Uwk9VojzxWzDUTEQxz5GRHI3+LrnLzdfaq55+qbaM43lhV06/9y2wCp Q0Ze6Um91FUE50+zT4T8NaTLYMGBf4UDk2pm3lWPwYBeg1fRLChdj4PMQHHCaLB/oEQX +HCA== MIME-Version: 1.0 Received: by 10.49.63.97 with SMTP id f1mr26020988qes.4.1351604978836; Tue, 30 Oct 2012 06:49:38 -0700 (PDT) Received: by 10.229.207.197 with HTTP; Tue, 30 Oct 2012 06:49:38 -0700 (PDT) Date: Tue, 30 Oct 2012 21:49:38 +0800 Message-ID: <CAPgLHd-p6=0ay8ZKJ=sNzyS5C6x0dJTH=EO1SqwiYciO2gTUJg@mail.gmail.com> Subject: [PATCH] [media] vpif_display: fix condition logic in vpif_enum_dv_timings() 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.133923 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_1100_1199 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:49 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_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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
Hi Wei, On Tue, Oct 30, 2012 at 7:19 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_display.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks for the patch, I'll queue it for 3.8. Regards, --Prabhakar Lad > diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c > index b716fbd..977ee43 100644 > --- a/drivers/media/platform/davinci/vpif_display.c > +++ b/drivers/media/platform/davinci/vpif_display.c > @@ -1380,7 +1380,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; > } > > > -- > 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:19 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_display.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Applied to my tree with following commit message, davinci: vpif_display: 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_display.c b/drivers/media/platform/davinci/vpif_display.c > index b716fbd..977ee43 100644 > --- a/drivers/media/platform/davinci/vpif_display.c > +++ b/drivers/media/platform/davinci/vpif_display.c > @@ -1380,7 +1380,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; > } > > > -- > 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_display.c b/drivers/media/platform/davinci/vpif_display.c index b716fbd..977ee43 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -1380,7 +1380,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; }