Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp518706imm; Wed, 26 Sep 2018 02:34:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV63j0H/F+0bkUaetSUdSFgARwD1zluHptnP9FJqlkaAXW0p0EX6of6TE/Rs2cycxEKsBF7mR X-Received: by 2002:a17:902:6a8b:: with SMTP id n11-v6mr5228149plk.16.1537954467834; Wed, 26 Sep 2018 02:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537954467; cv=none; d=google.com; s=arc-20160816; b=klIX/9eG/c/7VYkItOOdGt41DP7t7aEFerF6dj1wKu8+rW8opJERLbboT7YZYxIztP IW5JO/BaA59nGGeWPV8JuEc2BcQYO8JuGwTZQRfi0Su5jOXfOqVdYQ1Ku/O9iy32ZzWq UZNb190qPuS81ypm9vfRrDrD7MToyfBNdvlRxqlods0QAaMjclDgzulUzv9znJQ9dyrp dzhuAqVQOw2+a4b4fZhH5Y7sNJXObK7QCpwh/7r1KDHlGMBuO6eiPv+6rQaGbr6Y8aNo B/WN/+y5sb3S0Pyry98B8Hd9m1rU8dTRKsFtHiDNQNu+JIblHQ3DAbWU7a8K140QoHI8 VjtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=3U7hfMzcimC7DYPkkt47StWN6o+SdKi5RDLagmwY7kM=; b=rGNdPhjABRkV5G53b5WcHMZtgnAgTGnih/WVz7YhDIpQi4vLYvvk1V4IzyqXcQa/Hs wGcae/fFsMQ6rIIDmmzqlr+Bw097Wticf8zjW+WVvHBMf9wgs/vqIH6weyXIsmm0OV0h i0jz2Ulf9kOPkhlHJ7BjFB5DEend/axN7DMVrc3dzHb4TAQxVIc23oVcIn+BrmVPv3zX iOmNhK46K52gBAnUNvN8uyil6CtBeoiPMNEBF+iC6vJGtdYXencZVk+t5kuSQT2vBioK aSnI48Qk867HZsEl/3qFrpGHXjP3sCKlZCRt6mAV6gHYuEsgpI/OiIbyBwjY51JGxKLS W2Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=MiyXmNFi; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a71-v6si4676796pge.281.2018.09.26.02.34.12; Wed, 26 Sep 2018 02:34:27 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=MiyXmNFi; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727132AbeIZPqH (ORCPT + 99 others); Wed, 26 Sep 2018 11:46:07 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49380 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726565AbeIZPqG (ORCPT ); Wed, 26 Sep 2018 11:46:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3U7hfMzcimC7DYPkkt47StWN6o+SdKi5RDLagmwY7kM=; b=MiyXmNFiMA9tyrU6aaO0f/jau wNRLJUw9bMa8LlIV2nJ8PkwprhD6hq/CS7AuE4QF+MP4oLLeLYXlxz+GMyfiyKCXZWCjJR4upVYR2 cOk8WH1wywtvvt+kkm6lT96crbIguXEGtxJs8nvykB6hHf+q2wURXuobY+RPY+SpwNqYldIXpS6g1 LaCti5Oug5a7AJY6E3fduxQyFWWR8bhd1hg2w+2PmqQ+B4V2YljZpo+gf+aYvPKhAKIvULpEb0dzJ N/M5JxgJVxi+Z8Qdzsx4PsgHHwsNDEV6pWsHqZWsfAR4hfGppB54ko2XSmIZ1hVYx0XAno/vOPmtv CJg9ff1kQ==; Received: from 177.43.23.201.dynamic.adsl.gvt.net.br ([177.43.23.201] helo=coco.lan) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g56CT-0005oD-8I; Wed, 26 Sep 2018 09:33:57 +0000 Date: Wed, 26 Sep 2018 06:33:35 -0300 From: Mauro Carvalho Chehab To: Steve Longerbeam , Sakari Ailus Cc: Steve Longerbeam , , Mauro Carvalho Chehab , Niklas =?UTF-8?B?U8O2ZGVybHVu?= =?UTF-8?B?ZA==?= , Hans Verkuil , Sebastian Reichel , open list Subject: Re: [PATCH v6 02/17] media: v4l2: async: Allow searching for asd of any type Message-ID: <20180926063335.3c3b863d@coco.lan> In-Reply-To: <36fd43b2-695d-b990-bec2-c4d88ccb8e88@mentor.com> 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> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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? Thanks, Mauro