Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7098931pxb; Thu, 18 Feb 2021 01:03:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9wLYkvs/L7vrZ3dEwUKrqp5RU2jpQ3RY5M35JbjVWLwuNkHEtuZmAGqBqWHLJi1XNffrR X-Received: by 2002:a50:ee0e:: with SMTP id g14mr3183760eds.159.1613639011252; Thu, 18 Feb 2021 01:03:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613639011; cv=none; d=google.com; s=arc-20160816; b=DygT6uiEADnGzTWycbyRrIu6Tml3eYUE0s06R4nBMrbIxmHDMFqjrIlteEkc6JoL25 iX0JcyYREivuKgIbDiPVnsKDLvPbr0xkWDKEsfcM9lF4cvJpoCGzU5isS6xstw1WKhCG R3cgl2SJtoo8zHew0bgYK+AJJvvMhKYxt2WFgeHJsr0SPH7GwF+wvgONHYJ2lswawbHz 0sRH0rTnqfaXEVPfjnXZOguKihd6YaUCFUbE7TWJj0WlHxsX5+ThXtci4W+2bEt/0NTb GFfdGEMT7vg4hOeMbblOEPtcJpbaY4WEHlppypsJxgdDVtqFUAt62KrKSkwwHwGDjIJd IX3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=IcYZSN1jm5G7ucKigmAja2WzkamzXsJAtbYcHGNrAIk=; b=Eig/+Du3lMeTuOigNlz+PcP9z/e1i+0WCQ7Zc4VNjqR9o/iWkBZKW60ptgogKY+/Vd r2GGgh04yXXOxcMeUT7GwixIvyCbK9+B4CRI2mBw35niV3yuf778NH7OLP1QX+u5S7Kf RjDUAGpZRNqU1/wXGJA3/p/xzwV7CgWTJSFSGHmHpIBYSHwqINZaefC/rdSryPbshRdY V3PD2SCeJ2lWxBkuBRb/beuMyAUQQZ9p77poweKIbKsea2zVaZDjHbfNkkEPGSWyizPN 5zcYn7axmIho/Og/FqiFSVAIXWfTdrb31HAXVjHIl7swt3LWKniOK7LQMAV5Cfb1cqwR sFOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si3281342edy.244.2021.02.18.01.03.06; Thu, 18 Feb 2021 01:03:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231451AbhBRI7i (ORCPT + 99 others); Thu, 18 Feb 2021 03:59:38 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:41897 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbhBRH4N (ORCPT ); Thu, 18 Feb 2021 02:56:13 -0500 Received: from uno.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) (Authenticated sender: jacopo@jmondi.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 0BE67200011; Thu, 18 Feb 2021 07:54:44 +0000 (UTC) Date: Thu, 18 Feb 2021 08:55:10 +0100 From: Jacopo Mondi To: Andrey Konovalov Cc: junak.pub@gmail.com, robert.foss@linaro.org, sakari.ailus@linux.intel.com, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, laurent.pinchart@ideasonboard.com, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] v4l: common: v4l2_get_link_freq: add printing a warning Message-ID: <20210218075510.dcqbpmft46bymmnd@uno.localdomain> References: <20210217221134.2606-1-andrey.konovalov@linaro.org> <20210217221134.2606-2-andrey.konovalov@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210217221134.2606-2-andrey.konovalov@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrey, On Thu, Feb 18, 2021 at 01:11:32AM +0300, Andrey Konovalov wrote: > Print a warning if V4L2_CID_LINK_FREQ control is not implemented. > > Signed-off-by: Andrey Konovalov > --- > drivers/media/v4l2-core/v4l2-common.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c > index 133d20e40f82..f1abdf2ab4ec 100644 > --- a/drivers/media/v4l2-core/v4l2-common.c > +++ b/drivers/media/v4l2-core/v4l2-common.c > @@ -461,6 +461,8 @@ s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul, > > freq = qm.value; > } else { > + pr_warn("%s: V4L2_CID_LINK_FREQ not implemented\n", __func__); > + It's a shame we can't access a struct device * somehow :( Also, nitpicking (please bear with me here) it is absolutely correct that V4L2_CID_LINK_FREQ is not implemented, but I think the real deal here is that the link rate is estimanted from PIXEL_RATE and that might be wrong. What about (insipired from the error message in match_fwnode() which I find useful) pr_warn("%s: Link frequency estimanted using pixel rate: result might be inaccurate\n", __func__); pr_warn("%s: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver\n", __func___); Anyway, whatever works Reviewed-by: Jacopo Mondi Thanks j > if (!mul || !div) > return -ENOENT; > > -- > 2.17.1 >