From patchwork Wed Mar 10 13:35:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 396725 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp379918jai; Wed, 10 Mar 2021 05:35:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7wzD/DUFhSQzbOsU0Pv/WGO0C/KodS9q2lO11FUjyYaC3/cCGCgjIQPM/SQ/N8b9jPX66 X-Received: by 2002:a17:906:7d48:: with SMTP id l8mr3682642ejp.108.1615383325029; Wed, 10 Mar 2021 05:35:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615383325; cv=none; d=google.com; s=arc-20160816; b=xwr+uGMOomM09RZ5hqg38t9uYMMs4I9KJmbkrVE8skFd7kGCZmqgl6NTFfCnr+Mkcy D6Bx77RWMmn+UWNX1dIlmMrE9GXqb3ntVYBEtzvCfwd9tEOZ1umns/OjokPrUUZHezkK MsdNLSOj7TdHdO5TiJHQgcDyna9XsEJqwQBgbF1N0VySnzypwhXZGJnzAr/0XHiSvQlW 9jnz3M1BGinvUJBYpyZA5MdoJDidcv4RQAaTRAw7ekcQQ7p4hRz9vm1+7PQYsKhEhgGD 2h296vHyUquyeGZjWd7MWavX6X7+1AxtT2zy/Los5nwx6qYR4X/TEPkiHV4D6oxQI7E8 TVPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=nspo/UTQVr4FdI6bZiJEOHnqcgjmuFB4BdltgwvK9U4=; b=Fur+hBQf5L+NYybEbVKdcbHPf9RDdfWt5BtVp2QFeRWMiVrQDfwpe6DcBtmSUhF7VI bXeRKSLL6jO6tGHvUSOeVVucbIdhzcxyG+5M9b6W7p9PAsnu2AvRqfEDycyd3zaeDjNa kqWcCK6FD8v/o7N0hfaly5O1mW8QpAdKxKROvorm24TeevL+Iopc0LshveFx9WtgMnpT pgFyNKe/EaxjhyI9BVjYQCdEkp+a5IkKHIN7mf8rBTwjOKjhDDM+/I66z0GhT9+2+geB rVFuBNuo2SO3oU5RC7lU6Fc1SbUIGhvy/9CYiiQ54tl4/EV+eY7dcPjU7xGpk2OdxCKq 4Iyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wvzXeumq; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id y31si13508460edy.152.2021.03.10.05.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 05:35:25 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wvzXeumq; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 33903828BC; Wed, 10 Mar 2021 14:35:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="wvzXeumq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 268028289C; Wed, 10 Mar 2021 14:35:18 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E78AB8289C for ; Wed, 10 Mar 2021 14:35:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x329.google.com with SMTP id w7so7109369wmb.5 for ; Wed, 10 Mar 2021 05:35:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nspo/UTQVr4FdI6bZiJEOHnqcgjmuFB4BdltgwvK9U4=; b=wvzXeumqZYD5yH+m84IRgSSSCUK3MDa7+JWY8HyLsP2IK8TS5G9AYtPkTdvgeIZgzK RhsjerqMRK7GlROEPY2+SFa8IbUhPNAUDmoxWsuuO4ETCQ4gf5jIBiytV+qukmJOfSab Nba+lnPxIG0OulpFnnG5nyDuolRAZyUv2uQC4ufk1/XUXLyQoP4iW27vTCzekqnWC2Jf pcOYnsEcFf8J3fnwbWZkFKoUTvj1Oxzk0mplCEaueEOfOPIExg6oumJQnO/4Hfdfjzf8 NxUMvvojVYaLZHj8c/uwbM+T9JHLXh2X3ssqPPwQvbkGGvptREJBIFZtiH3XGp5X+n3s 25nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nspo/UTQVr4FdI6bZiJEOHnqcgjmuFB4BdltgwvK9U4=; b=lug3ztkr2dSn7Dhh5YjyRhR4sazC9vQ0iVBsD4eR2oBGltCLfO3CheaJQd7VG0uZbU GCBDmBM5uDKHa65wagVIKGsqpIcoX4IixrK+DBOm0JQjTXRAliI98m8eKMd/esUu5fH7 iVDQcU8OC+Rf4mXh/da/Ms2R0Waf4Pef7/QEByxpPHj8APrP9NjSYwHs6ASt8+iD/NlL hb0KntJMIa0Gdm95lnl99VKMfLzHDd14G69/AkEkI3YhMHURrJ7AOAbtX2bVJDUNyqp0 1HArEpwygNXRo7CpUATotCOF9BusZkbg3Cz/8iNPJVeQOO2L9o8xZ0odeZl7Ul5NHRXk Whpw== X-Gm-Message-State: AOAM530636ahX6pPUXi9NcAD0Q/k/fyYfF3O0xL+bOwI4QP9yaw9TDI8 S6ob1dk3t+QIij06P3eOxhadsg== X-Received: by 2002:a7b:ce06:: with SMTP id m6mr3339312wmc.38.1615383314595; Wed, 10 Mar 2021 05:35:14 -0800 (PST) Received: from apalos.home ([2a02:587:4647:e6c6:2e56:dcff:fe9a:8f06]) by smtp.gmail.com with ESMTPSA id v13sm33375868wrt.45.2021.03.10.05.35.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 05:35:14 -0800 (PST) From: Ilias Apalodimas To: jens.wiklander@linaro.org Cc: Ilias Apalodimas , Patrick Delaunay , Simon Glass , Sean Anderson , u-boot@lists.denx.de Subject: [PATCH v2] tee: optee: Change printing during optee_probe Date: Wed, 10 Mar 2021 15:35:11 +0200 Message-Id: <20210310133511.3048227-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Right now the error messages when optee has a version mismatch or shared memory is not configured are done with a debug(). That's not very convenient since you have to enable debugging to figure out what's going on, although this is an actual error. So let's switch the debug() -> dev_err() and report those explicitly. Signed-off-by: Ilias Apalodimas Reviewed-by: Patrick Delaunay --- drivers/tee/optee/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.30.1 diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index b898c32edc0b..73dbb22ba097 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -624,14 +624,14 @@ static int optee_probe(struct udevice *dev) u32 sec_caps; if (!is_optee_api(pdata->invoke_fn)) { - debug("%s: OP-TEE api uid mismatch\n", __func__); + dev_err(dev, "OP-TEE api uid mismatch\n"); return -ENOENT; } print_os_revision(dev, pdata->invoke_fn); if (!api_revision_is_compatible(pdata->invoke_fn)) { - debug("%s: OP-TEE api revision mismatch\n", __func__); + dev_err(dev, "OP-TEE api revision mismatch\n"); return -ENOENT; } @@ -642,7 +642,7 @@ static int optee_probe(struct udevice *dev) */ if (!exchange_capabilities(pdata->invoke_fn, &sec_caps) || !(sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM)) { - debug("%s: OP-TEE capabilities mismatch\n", __func__); + dev_err(dev, "OP-TEE capabilities mismatch\n"); return -ENOENT; }