Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2442427rwb; Fri, 11 Nov 2022 09:19:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf6hPaEv0zn5ikR5ba9MHs/dctqYVSTlc0CTautWpZNOQEgUEHHPSOsfqjPaJvLmcg4bZj/Q X-Received: by 2002:a17:907:6f1a:b0:78d:981a:d997 with SMTP id sy26-20020a1709076f1a00b0078d981ad997mr2716772ejc.654.1668187178984; Fri, 11 Nov 2022 09:19:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668187178; cv=none; d=google.com; s=arc-20160816; b=GYG73do7iAafQms1dC2DombkIHtOnnxw+g+GzIIheI8QvGMExeBtZ/NazVUNI6aQxH fbuDWKrcFo0iQ8MGrEPg/wwMqqaEvX402J/RC3yQLd0zDfGKFHAmnTyFhOaKG2bbSlRd p9kwDOTDaA+ouoObEQA0ShQv7oj8ppY9xKf56I3YqosGFppqQtj8I7QiOCTA6Gu57Wtr N5UrsmcV5L4zlobChlNfzDeVkbwh0ahtss98ZJymdltHqvITiU1k3B5mp4yJFT0XHw81 9R1UPMtIGblRQeXne3LMEzWT1S2W3wuAQHHYvvEucJhlFyvcAanZiNCw4Z6sbA6qcYkj c7RA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=a6b9KXsg5dToubTWdDWhESPxXt+EzBA6z0cwcmLplZ8=; b=eA4bpKLjIgDryoK4xrTBVitvLARAuh3R5U0QHxQn4+WMB/saR7UM9ZBN8nOP+QMOlc XlUgDf90/W3eXQq2odLPLscvYhygIwVkmFXuRLJJkBsbpE6BKp1NchexJLGuQnC9WwBh iB48Aq/HEDVKTSAr0GpieJaWSATEEn9JiXVG9W9Y8Jr3T1zlfbG6ihwbs1uc1UpYzbar TzhvEmTBd8bzrIPkr7EAsCsnIyvoNGzRDOv9G2fFRMCZie4NUog3BnfUdyz/GhCyq6gJ EUex634V5NFCcBVaLrwNtQPYLulf4L01Eo3kusKlUNuip9/pQUlqhEMU/kbJg8lMv1M0 zJ6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs6-20020a0564020c4600b00461dc830100si2739429edb.452.2022.11.11.09.19.15; Fri, 11 Nov 2022 09:19:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233179AbiKKQNo (ORCPT + 91 others); Fri, 11 Nov 2022 11:13:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232968AbiKKQNm (ORCPT ); Fri, 11 Nov 2022 11:13:42 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 935BA6594 for ; Fri, 11 Nov 2022 08:13:40 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7C5A71FB; Fri, 11 Nov 2022 08:13:46 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 43D9B3F73D; Fri, 11 Nov 2022 08:13:39 -0800 (PST) Date: Fri, 11 Nov 2022 16:13:36 +0000 From: Sudeep Holla To: Ludvig =?utf-8?Q?P=C3=A4rsson?= Cc: Jens Wiklander , kernel@axis.com, Sumit Garg , Sudeep Holla , op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tee: optee: Populate child nodes in probe function Message-ID: <20221111161336.msozo7l632jvbwcn@bogus> References: <20221109160708.507481-1-ludvig.parsson@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221109160708.507481-1-ludvig.parsson@axis.com> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 On Wed, Nov 09, 2022 at 05:07:08PM +0100, Ludvig P?rsson wrote: > Currently there is no dependency between the "linaro,scmi-optee" driver > and the tee_core. If the scmi-optee driver gets probed before the > tee_bus_type is initialized, then we will get an unwanted error print. > > This patch enables putting scmi-optee nodes as children to the optee > node in devicetree, which indirectly creates the missing dependency. > > Signed-off-by: Ludvig P?rsson > --- > drivers/tee/optee/smc_abi.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c > index a1c1fa1a9c28..be6f02fd5a7f 100644 > --- a/drivers/tee/optee/smc_abi.c > +++ b/drivers/tee/optee/smc_abi.c > @@ -1533,6 +1533,11 @@ static int optee_probe(struct platform_device *pdev) > if (rc) > goto err_disable_shm_cache; > > + /* Populate any dependent child node (if any) */ > + rc = devm_of_platform_populate(&pdev->dev); > + if (rc) > + goto err_disable_shm_cache; > + While I agree with idea of populating dependent child nodes from here, I am not sure if it is OK to give error if that fails or to just continue as there may be other users(like the user-space) for the OPTEE in general. -- Regards, Sudeep