Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp581075imm; Wed, 26 Sep 2018 03:41:37 -0700 (PDT) X-Google-Smtp-Source: ACcGV63OwNUEjrwEWm0V6ptJ4ywYrGH7+rVTKEwH09KSBeKLOlCbLGwq1O8OMDKiZTi6OSJOtCBN X-Received: by 2002:a17:902:e5:: with SMTP id a92-v6mr5405365pla.273.1537958497229; Wed, 26 Sep 2018 03:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537958497; cv=none; d=google.com; s=arc-20160816; b=Xp1yPTO/0PIyo5BsBnJjIPoOiSIIIgcILrm/+bppnn7EEGm7QgfcHDx2X4evuc8YYf FVrgETu8pgArFwEQRGkesZbYwVCr4Sine3EbCd51PDHQmwPtLZofDKcSmY2w4DzUWR93 l7s7uJPDB25W6ctpGIUSy3zo346tSlB203IKHaZSghnEiHczh/Q8fGZJM3k//8crSo1v WTQQO7TmCyLwrEkdvcPUSHwNl3/RtY+IsfjrFEF74tJLaGaQ/63nDjbDenZiqCVXBU3P ZGWBYsGFiyltz1vRG9ZnQ6Zkh/Y7h8AlUkt/aZpVyoCA9zcO2SZJPxDsBKT7cxMkQ9j4 gtMw== 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=19uKCDBEfYn2uKI9KIS3PONiIiR+2PnNLgpUkZZ9QCM=; b=MaFzWW06lk6f7683TPujpCOQRRf8BX6WPOq6hIbBNvJ/OrFcXYHXS+gj8et88SDWIt xG0emhH7wk8Lcyjcgy8fKny4vE5usTf8f8y2LiqxAA+e1oetchO5uyZxjeZ/4H6frObj HBFSVF4HC5u2l9AMDBerKRgEQn7o2OmTv9dLq008DL/5/8tixN217O9i9g5h8x+rUGX3 6T73758ZgptpvZS7FF87aFhBGyz/xe12J8aAAQlQzIjYXApIOy+UbbGkinrAntbTmVa1 qheeZecTunLaNsgixW4m1+fEC0rKQBN+gIDAmiMPKTtGBZZhjFVIE9xqmS60USslXrNP 4BrA== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5-v6si5160842pgm.222.2018.09.26.03.41.22; Wed, 26 Sep 2018 03:41:37 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727677AbeIZQxD (ORCPT + 99 others); Wed, 26 Sep 2018 12:53:03 -0400 Received: from mga09.intel.com ([134.134.136.24]:60940 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726841AbeIZQxD (ORCPT ); Wed, 26 Sep 2018 12:53:03 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 03:40:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,306,1534834800"; d="scan'208";a="93847289" Received: from jmoran2-mobl2.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.252.26.29]) by orsmga001.jf.intel.com with ESMTP; 26 Sep 2018 03:40:40 -0700 Received: by kekkonen.fi.intel.com (Postfix, from userid 1000) id 2FCF021E3F; Wed, 26 Sep 2018 13:40:39 +0300 (EEST) Date: Wed, 26 Sep 2018 13:40:39 +0300 From: Sakari Ailus To: Mauro Carvalho Chehab Cc: Steve Longerbeam , 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: <20180926104038.tc3u7vzojumcthen@kekkonen.localdomain> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180926063335.3c3b863d@coco.lan> 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 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? 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. > > Haven't write myself any piece of code using async framework, on a first > glance, trying to register twice sounds like an error to me. > > Sakari, what do you think? -- Regards, Sakari Ailus sakari.ailus@linux.intel.com