Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp685189imm; Fri, 28 Sep 2018 05:17:04 -0700 (PDT) X-Google-Smtp-Source: ACcGV60hwzFbZDVIvlhDXDW11rRy4B8+duR/8WQ+neHQVaEbxRyt2JmzfHnHfryaGXnMJ5lulADE X-Received: by 2002:a63:fc46:: with SMTP id r6-v6mr14884961pgk.345.1538137024247; Fri, 28 Sep 2018 05:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538137024; cv=none; d=google.com; s=arc-20160816; b=l79ilGHpnbk8UE5pUwAvHYdsXWEMpIARZ+UUaBh6yjfWh7P4BjAyljnvVaW4s3yabg ZCfEFz8g5gkoSouAuUQE/ab/USlUZoFJlW7S9RTso9AC4uXNsHWWa9L7pDhpQhsFqY9P iBlPMz/+fxnUsOskqhcPWblj81qKIYEntcqIpVpNHmRhgB0gXjGOecfl4kdS3DR2w+Qe FXTkqO+Emtv6Jijl+2Z7U28aLBrBcMTsB0RwwOls3JJmd4H/ubGAjQmHOkSYcBjHAklp W9y3C6D4NkL6bKHWJgCZpYevDMrCoYiMibZY9Y0I4un8CjQ1VFwhy9o7WvJ7yHXOclZW YGxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=oSL3gv2dlKOkG2gNdkA5c1CrbyV41Mr8CI65ldSZ8h4=; b=HAX5OXzQVttiAmfrvDAiv1c6RNrPuJRYYTBLAzcy8It7YvtD97JKDny2RAH4VbK0A7 9XSkEjr79U0SEKmzClD54RAwkMYhWnSDsIy+utkbRuINNtgpOOzpQQ4BvyyyB56Q4kZH v5XnUwqtTcJDsjyy8qNnAWp4rVaj3eQQ6PF2iGf/XRXfMG/qJmyteE6wxHFPwxw53Dmk npOgWI/jEAOw+sDxEMF4gRGDJON6WN0Sk4ZcK00mDDF9yV3YOrLOkwPia2OxJzbjEoYV zTqnqN6pNmS7Mdf188WvwREDCH0StE9EHIaIYkYaBZVL2JOrIhYRU2gfWF44tNxPooK0 0FhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a63-v6si5058176pla.123.2018.09.28.05.16.47; Fri, 28 Sep 2018 05:17:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728832AbeI1SkE (ORCPT + 99 others); Fri, 28 Sep 2018 14:40:04 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:36938 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726430AbeI1SkE (ORCPT ); Fri, 28 Sep 2018 14:40:04 -0400 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2001:1bc8:1a6:d3d5::80:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id 62721634C7E; Fri, 28 Sep 2018 15:16:32 +0300 (EEST) Received: from sakke by valkosipuli.localdomain with local (Exim 4.89) (envelope-from ) id 1g5rhA-0000Nt-6R; Fri, 28 Sep 2018 15:16:32 +0300 Date: Fri, 28 Sep 2018 15:16:32 +0300 From: Sakari Ailus To: Steve Longerbeam Cc: Sakari Ailus , Mauro Carvalho Chehab , Steve Longerbeam , linux-media@vger.kernel.org, Mauro Carvalho Chehab , Niklas =?iso-8859-1?Q?S=F6derlund?= , Hans Verkuil , Sebastian Reichel , open list Subject: Re: [PATCH v6 02/17] media: v4l2: async: Allow searching for asd of any type Message-ID: <20180928121631.6nobkbegwnfeerpb@valkosipuli.retiisi.org.uk> References: <1531175957-1973-1-git-send-email-steve_longerbeam@mentor.com> <1531175957-1973-3-git-send-email-steve_longerbeam@mentor.com> <20180924140604.23e2b56f@coco.lan> <20180925192045.59c83e3d@coco.lan> <36fd43b2-695d-b990-bec2-c4d88ccb8e88@mentor.com> <20180926063335.3c3b863d@coco.lan> <20180926104038.tc3u7vzojumcthen@kekkonen.localdomain> <89ff305e-4b0a-b59d-bb4f-99e8e6cfde90@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <89ff305e-4b0a-b59d-bb4f-99e8e6cfde90@mentor.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 26, 2018 at 10:49:18AM -0700, Steve Longerbeam wrote: > Hi Mauro, Sakari, > > > On 09/26/2018 03:40 AM, Sakari Ailus wrote: > > Hi Mauro, Steve, > > > > On Wed, Sep 26, 2018 at 06:33:35AM -0300, Mauro Carvalho Chehab wrote: > > > Em Tue, 25 Sep 2018 18:05:36 -0700 > > > Steve Longerbeam escreveu: > > > > > > > On 09/25/2018 03:20 PM, Mauro Carvalho Chehab wrote: > > > > > Em Tue, 25 Sep 2018 14:04:21 -0700 > > > > > Steve Longerbeam escreveu: > > > > > > > > @@ -392,12 +406,11 @@ static int __v4l2_async_notifier_register(struct v4l2_async_notifier *notifier) > > > > > > > > case V4L2_ASYNC_MATCH_CUSTOM: > > > > > > > > case V4L2_ASYNC_MATCH_DEVNAME: > > > > > > > > case V4L2_ASYNC_MATCH_I2C: > > > > > > > > - break; > > > > > > > > case V4L2_ASYNC_MATCH_FWNODE: > > > > > > > > - if (v4l2_async_notifier_fwnode_has_async_subdev( > > > > > > > > - notifier, asd->match.fwnode, i)) { > > > > > > > > + if (v4l2_async_notifier_has_async_subdev( > > > > > > > > + notifier, asd, i)) { > > > > > > > > dev_err(dev, > > > > > > > > - "fwnode has already been registered or in notifier's subdev list\n"); > > > > > > > > + "asd has already been registered or in notifier's subdev list\n"); > > > > > > > Please, never use "asd" on messages printed to the user. While someone > > > > > > > may understand it while reading the source code, for a poor use, > > > > > > > "asd" is just a random sequence of 3 characters. > > > > > > I will change the message to read: > > > > > > > > > > > > "subdev descriptor already listed in this or other notifiers". > > > > > Perfect! > > > > But the error message is removed in the subsequent patch > > > > "[PATCH 03/17] media: v4l2: async: Add v4l2_async_notifier_add_subdev". > > > > > > > > I could bring it back as a dev_dbg() in v4l2_async_notifier_asd_valid(), but > > > > this shouldn't be a dev_err() anymore since it is up to the media platform > > > > to decide whether an already existing subdev descriptor is an error. > > > Hmm... that's an interesting discussion... what cases do you think it > > > would be fine to try to register twice an asd notifier? > > It should be a fairly common case that a sub-device has multiple fwnode > output ports. In that case it's possible multiple sub-devices downstream > from it will each encounter it when parsing the fwnode graph, and attempt > to add it to their notifiers asd_list multiple times. That isn't an error, > any > attempt to add it after the first add should be ignored. > > imx-media is an example, there is a CSI-2 transmitter with four fwnode > output ports for each CSI-2 virtual channel. Those channels each go to > one of four Camera Sensor Interface in the imx6 IPU. So each CSI will > encounter the CSI-2 transmitter when parsing its fwnode ports. > > > > Only the error message is removed; this case is still considered an error. > > I think it'd be better to keep this error message; it helps debugging. > > Ok I will add it back, but it should be a dev_dbg(). Fine for me. Could you address especially the author vs. SoB line difference in the set, and re-post to the list, please? I've pushed the latest set including my fwnode patches (which you can ignore) to my linuxtv.org tree v4l2-fwnode branch; feel free to use these as the basis. I've fixed a few conflicts in there in rebasing on current media tree master. -- Regards, Sakari Ailus e-mail: sakari.ailus@iki.fi