Message ID | 20230421100430.28962-1-vaishnav.a@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp952225vqo; Fri, 21 Apr 2023 03:06:08 -0700 (PDT) X-Google-Smtp-Source: AKy350aMWonjRur1+Fa072m9UKtHrJ6FCS38KDngs/TufN5aXfx3uRk87scG+DGDFDAVfa9ufYHz X-Received: by 2002:a05:6a20:431c:b0:ef:ed72:779c with SMTP id h28-20020a056a20431c00b000efed72779cmr6443779pzk.8.1682071567946; Fri, 21 Apr 2023 03:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682071567; cv=none; d=google.com; s=arc-20160816; b=GkBcWNzvS7yb8r20GrjxFT9DyiDuuaPJ1ldRSHvHetq0VpLVsm6im4YODrOvq+nZzW Cxd3543tkRtjL2/0kvPLdaaWrGaZ13BnoHvH7RrMLiaTCw9STux1AucIP80VdEZ6ZNu4 SfwTu2qsPnWfFTyDRUbCk1G5qAc4eVda/PUQgtiXVrboWtl65s3NzL0Oh44jnWedPhmY K/c8qqrDDH9bXoyWLe+ur/u5GuipiVlZFrGpkCRqAvVt55Wx3uQXTqYj6XNnM27/1tBG d33bjXWJ1jbfvNxXWbfnzejE5JYfWCiyG/E60DpwQv2u29GRa77pbRicwdU3ddxc/A4N /o8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=rDJjkLEWgWQKOCBzrTnDZV9WdVOoQEU3x29VW9Nmsbs=; b=sVaIbBcgWdXYwnGlaxWSEaTflZbwMHQYzZuGdYTnVsSrJNUmC8kUCBXsjhgTwKm0Xz zchBuPH92FmVpI3zXxZCUgYZXLwDtgS9dy50WFP/bvpRZoCTW2JBWrDRa+X/HkDxmt+n n3iWpXDNUPOsrzMphnJIzMABN6w8EMkixqYMFnCzgy/GglyY84RY9LsH4cdFpjBMKh4W 3V2Q2glOSNcUilTkdCv+tQcs33pxqOOETrX5u/LfWdgMYvwiZ3WUI8Lh8lsHxMsw1T6P HXINjRjz+0vSn8GBjKJrxUlDF6gr5BDgvfXJYpPGJA2CQTi3tULinoLPAZXSiGPSAYYh gvbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=D8sVJla+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z21-20020a63e115000000b0051eff07b9f5si3877749pgh.84.2023.04.21.03.05.52; Fri, 21 Apr 2023 03:06:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=D8sVJla+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229709AbjDUKE7 (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Fri, 21 Apr 2023 06:04:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231594AbjDUKEn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 21 Apr 2023 06:04:43 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE4A4B755; Fri, 21 Apr 2023 03:04:39 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33LA4WaS065937; Fri, 21 Apr 2023 05:04:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1682071472; bh=rDJjkLEWgWQKOCBzrTnDZV9WdVOoQEU3x29VW9Nmsbs=; h=From:To:CC:Subject:Date; b=D8sVJla+D03D+rTjFYdJYGK6Z413A/fMQrNXYE8Rq3HcriAblgInpKYu6fALLqEkM WlnEciMGm9BM2Rv/oYjm4upl4GbZ/hU7ww2M6PGuoWZOXftxIoLB8/bYMHOMmgW2Jf 95eEPm//P58AIuSi8L0wGqwyiTwNmAmAVobrPOds= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33LA4WKv115829 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 21 Apr 2023 05:04:32 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 21 Apr 2023 05:04:32 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Fri, 21 Apr 2023 05:04:32 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33LA4UIF005944; Fri, 21 Apr 2023 05:04:31 -0500 From: Vaishnav Achath <vaishnav.a@ti.com> To: <mchehab@kernel.org>, <sakari.ailus@linux.intel.com>, <laurent.pinchart@ideasonboard.com>, <hverkuil-cisco@xs4all.nl> CC: <linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <u-kumar1@ti.com>, <vaishnav.a@ti.com> Subject: [PATCH] media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad() Date: Fri, 21 Apr 2023 15:34:30 +0530 Message-ID: <20230421100430.28962-1-vaishnav.a@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763779876804291023?= X-GMAIL-MSGID: =?utf-8?q?1763779876804291023?= |
Series |
media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad()
|
|
Commit Message
Vaishnav Achath
April 21, 2023, 10:04 a.m. UTC
While updating v4l2_create_fwnode_links_to_pad() to accept non-subdev
sinks, the check is_media_entity_v4l2_subdev() was not removed which
prevented the function from being used with non-subdev sinks, Drop the
unnecessary check.
Fixes: bd5a03bc5be8 ("media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad()")
Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
---
drivers/media/v4l2-core/v4l2-mc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Hi Vaishnav, Thank you for the patch. On Fri, Apr 21, 2023 at 03:34:30PM +0530, Vaishnav Achath wrote: > While updating v4l2_create_fwnode_links_to_pad() to accept non-subdev > sinks, the check is_media_entity_v4l2_subdev() was not removed which > prevented the function from being used with non-subdev sinks, Drop the > unnecessary check. > > Fixes: bd5a03bc5be8 ("media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad()") > > Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Sakari, the commit this patch fixes will land in v6.4, should this be merged as a v6.4 fix ? > --- > drivers/media/v4l2-core/v4l2-mc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c > index bf0c18100664..22fe08fce0a9 100644 > --- a/drivers/media/v4l2-core/v4l2-mc.c > +++ b/drivers/media/v4l2-core/v4l2-mc.c > @@ -314,8 +314,7 @@ int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd, > { > struct fwnode_handle *endpoint; > > - if (!(sink->flags & MEDIA_PAD_FL_SINK) || > - !is_media_entity_v4l2_subdev(sink->entity)) > + if (!(sink->flags & MEDIA_PAD_FL_SINK)) > return -EINVAL; > > fwnode_graph_for_each_endpoint(dev_fwnode(src_sd->dev), endpoint) {
On Fri, Apr 21, 2023 at 03:10:48PM +0300, Laurent Pinchart wrote: > Hi Vaishnav, > > Thank you for the patch. > > On Fri, Apr 21, 2023 at 03:34:30PM +0530, Vaishnav Achath wrote: > > While updating v4l2_create_fwnode_links_to_pad() to accept non-subdev > > sinks, the check is_media_entity_v4l2_subdev() was not removed which > > prevented the function from being used with non-subdev sinks, Drop the > > unnecessary check. > > > > Fixes: bd5a03bc5be8 ("media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad()") > > > > Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > Sakari, the commit this patch fixes will land in v6.4, should this be > merged as a v6.4 fix ? I'd think so. I'll take this soonish.
diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c index bf0c18100664..22fe08fce0a9 100644 --- a/drivers/media/v4l2-core/v4l2-mc.c +++ b/drivers/media/v4l2-core/v4l2-mc.c @@ -314,8 +314,7 @@ int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd, { struct fwnode_handle *endpoint; - if (!(sink->flags & MEDIA_PAD_FL_SINK) || - !is_media_entity_v4l2_subdev(sink->entity)) + if (!(sink->flags & MEDIA_PAD_FL_SINK)) return -EINVAL; fwnode_graph_for_each_endpoint(dev_fwnode(src_sd->dev), endpoint) {