Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2268425rdb; Mon, 9 Oct 2023 20:36:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEr5vnsost1EceF8LPWV8zzJbQ8ZZIhcASL3i8zQ6taiwUnLgDZe0s7T8C22/rYiqaSY0aT X-Received: by 2002:a17:90a:f698:b0:27c:e346:375c with SMTP id cl24-20020a17090af69800b0027ce346375cmr1621521pjb.18.1696909008920; Mon, 09 Oct 2023 20:36:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696909008; cv=none; d=google.com; s=arc-20160816; b=FgKmwvAGJ2lk34kAZMCKY1CxELeICMMwxrABN3yDVAqSI6gvG2058aLRUQK+bxQ3lt 3dNXXdiIookdGenyQukyN1KL0qhWlaWLNoel0qyfXr22kykWqOAXs42PEkOy24EAC4r9 jouXd2lJLeNTdGzTaYPrlKQZv4qkrCfMgEBq+2n74frPOIusY7fyCKcW5O0AI3TJKXcJ gMWeZm43KK0/vMuuaia6rbglhKIwPEE9PG3fuoj7s5xn1Ufjl5ZvIZh5XYNvsWLiFxUS YEziZ7Pb/9EpxgwfZsZCHIQV5BLzCKhujGcH3LxSK7Gief3pmQFymSH99I7Z8qg9PwOF gFhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=rb8e0IICZkV6fHDUrgqjV3WMI1gw+DOK8PrcPfSWC7M=; fh=2QHNt2eh4ovcYVyoXv7xEngngPiU67TAucTrXHCw8eo=; b=aNClQOdOgEndS4m2jrUStMWfhrxxEWz3bUfhnEarvy18tg6viNac8RyoViDkpq2Kq5 j12lm1N2VGK3mN7gk6bFvBnzXZvogH3lVA/rxFBKerms1eTNRpt8u35RZjsijaE5oF3K NhTtTpmqLUJ/AwP3WYmxAC8T4aAYO0OhrOPqWGoeQWo60UaSNK4q8Jdx25JvhP2dgORb jwCnKOK7xvLHkhVgoSboS3o5yRURIw3+bzQC3q+ZOjeVwYrZVZzu1LCxqWEQmVwD1dcQ MCbWLRvILniWFYO2Yzeo+rZnaW6ze1nXYsTOLG3Mf7AujnJHSlO/v2Er7HY2tB94+pcm nAHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Vzz8N3HY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id bx24-20020a17090af49800b002774c17dd73si8043434pjb.11.2023.10.09.20.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 20:36:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Vzz8N3HY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0319681121CD; Mon, 9 Oct 2023 20:36:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442003AbjJJDgk (ORCPT + 99 others); Mon, 9 Oct 2023 23:36:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378482AbjJJDgj (ORCPT ); Mon, 9 Oct 2023 23:36:39 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0534C92; Mon, 9 Oct 2023 20:36:37 -0700 (PDT) Received: from [IPV6:2405:201:2033:3002:3848:5d20:59c9:c87c] (unknown [IPv6:2405:201:2033:3002:3848:5d20:59c9:c87c]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CFD363D6; Tue, 10 Oct 2023 05:36:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1696908994; bh=HN7mDg7VsRlOfml4LOazT/vu//u9sVi/DeEg8aI9kx0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Vzz8N3HYNAaoX6t+b+qpI6/WYFDa6z5TFAP3P/En7CocheAYqcWv2FSuPF8ggTgSz h/XzBYdem7qn0KwrtcTdE9kPFGAuellAG0lhN9fNm8ej3eHzgGgFSfQE1Ws6TkqjEH HO3vEJeX1Xdi2JZcxI3EUxqQgZZdLl/yV1pTUxks= Message-ID: <9de11f54-6f25-6945-b42c-bc3632563a56@ideasonboard.com> Date: Tue, 10 Oct 2023 09:06:28 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 5/5] media: i2c: imx335: Improve configuration error reporting To: Kieran Bingham , linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Sakari Ailus , "Paul J. Murphy" , Daniele Alessandrelli , Mauro Carvalho Chehab , open list References: <20231010005126.3425444-1-kieran.bingham@ideasonboard.com> <20231010005126.3425444-6-kieran.bingham@ideasonboard.com> Content-Language: en-US From: Umang Jain In-Reply-To: <20231010005126.3425444-6-kieran.bingham@ideasonboard.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 09 Oct 2023 20:36:48 -0700 (PDT) Hi Kieran, Thank you for the patch. On 10/10/23 6:21 AM, Kieran Bingham wrote: > The existing imx335_parse_hw_config function has two paths > that can be taken without reporting to the user the reason > for failing to accept the hardware configuration. > > Extend the error reporting paths to identify failures when > probing the device. > > Signed-off-by: Kieran Bingham > --- > drivers/media/i2c/imx335.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c > index 1a34b2a43718..753e5c39e0fa 100644 > --- a/drivers/media/i2c/imx335.c > +++ b/drivers/media/i2c/imx335.c > @@ -864,8 +864,10 @@ static int imx335_parse_hw_config(struct imx335 *imx335) > } > > ep = fwnode_graph_get_next_endpoint(fwnode, NULL); > - if (!ep) > + if (!ep) { > + dev_err(imx335->dev, "Failed to get next endpoint"); missing '\n' at the end. > return -ENXIO; > + } > > ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg); > fwnode_handle_put(ep); > @@ -890,6 +892,8 @@ static int imx335_parse_hw_config(struct imx335 *imx335) > if (bus_cfg.link_frequencies[i] == IMX335_LINK_FREQ) > goto done_endpoint_free; > > + dev_err(imx335->dev, "no compatible link frequencies found"); Ditto. Other than that, Reviewed-by: Umang Jain > + > ret = -EINVAL; > > done_endpoint_free: