From patchwork Wed Mar 10 11:01:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 396683 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp273958jai; Wed, 10 Mar 2021 03:01:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcLiJbNQYco8Hp/dYP4LM5MkN1nzGYpYDHghd8OZnudKnVQKFzm0wMpQS5StiOHD7tnxYw X-Received: by 2002:a50:ec0e:: with SMTP id g14mr2625131edr.264.1615374081243; Wed, 10 Mar 2021 03:01:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615374081; cv=none; d=google.com; s=arc-20160816; b=iOsOTpfeSXnQn1R7UDn9svy2BFdDWJSJam8kLkrLNfvpZ1BgTvHaeChhnmFpM4g4oI 27fy+IZjmxlGK13aT4nl9EydaUqDgrkQapOh3qifEyDV1UgezswJ07JTC1OeuzyhZv8W GcwS2Guf20qz05GeDARD1AZjG2GB9C3MQD3t5jjOLOt6PjdErr+kF/Gkys34HtGdWiQ1 cg8hQD5Ld60uXzVllL8ZNStUwOYMdnkyiM7HhsNZszLHu8HzTwuPiBNkq9kedMt9vQWz Uu4Ye3CLd8uP3k+DTYMJy+xrmdiyFm+aMELmmkhBoOMs3YqUcXQBlt1vzY/XNIrQzfHs y41g== 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=CYAsVxNH+TlnVgEzTnpC+zvcvR0N+SKKF5vE4T4Nlss=; b=BkGEI7ZS/C7PzmSQEFt5SaPYt6qgjYmmhbBVtoy/1VQOFkEQLcyAIXYUHOQwdQynHW L93GpHAxCxm0IlvJF5ExHpSW+ZbqCfp+XakkI25fea7Lnyci7BD25w27yiGzlikGlOX4 bp5ZBSR2+oq3WYr8eXE56ngSlNAgJWjGlxhiCk124vIndhoH8bt+iHF12yhJP6TC6SNK D87RN6cAPjP4ygQUi0DKBQ2w5+0LtVF7l0s6Ig2iCX/0evQW4FjIhZA6nD/6u9962drb iNmGhLi8eOp7Z8MNTtHVJPMcD0kQZyAU/yeKZ/Kh9qACZKQMU2xYBHaKeX1U1Whu7QOF Yk7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e1U7P490; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id k9si11563028ejc.706.2021.03.10.03.01.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 03:01:21 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e1U7P490; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 1E7188284A; Wed, 10 Mar 2021 12:01:18 +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="e1U7P490"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AEB4382887; Wed, 10 Mar 2021 12:01:13 +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,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 43EC88006D for ; Wed, 10 Mar 2021 12:01:08 +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-wr1-x432.google.com with SMTP id h98so22764202wrh.11 for ; Wed, 10 Mar 2021 03:01:08 -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=CYAsVxNH+TlnVgEzTnpC+zvcvR0N+SKKF5vE4T4Nlss=; b=e1U7P490Azp0nieH9nr0DXmnZivGlRMbbiaymqMRzGqFqjIzN4lw0gYKbrU2cvP+IP GBDoWSMzoQP5+mEc3QMRqaUiEHLj4Y79W6Tqbt+zypIdPnAKcKbSH/UTHWz9c3aEW1Zb W/de0GN9mmlMFBJfIA6d8CU399A39Mvox0KR3Tv9JwTyeqnX6cMGW5CXP1KyV7gjSHhV OKVvt+mTSXg2CD33bB3GFWQZY4fLneAqkFNkXQ1UmHkL7tZJA7qpxcOeEmeXoYKYOz01 f5mrjj/Yg81wT7JOt8tqmXxAMocKqfVtf2ZuGsCiOmtrKoEByauTZAp37v+mPwkVHY1n 3Vbg== 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=CYAsVxNH+TlnVgEzTnpC+zvcvR0N+SKKF5vE4T4Nlss=; b=PbLcwE+54zh7+yYhYqEcjUPMZikFxZ1oUf51VNXzSlIqXqp+/8S9V5jRNh/Y6ZFb4v uvc9BmcWiTVGO5QoffgiJ9Rap9H9xo5wHFgsrMbpLTdeOcCjxHiyjfGG0sgIJYjXcNyP AtSL2evCv4VF0ZfByjFtyz/IpKwGiswIBeNWuU7b++v+CSNdEuLC9ed5KsgjbLXxOgLd ID4aHM0VhpjStRG5X2CP6oMtXJBaZeA6dUudj8qyfgEIln3YhAeSF8vfsIUnad4GaSb5 JkKFm2RhTk4DSQwC/4dwAQZZppiNiJR+ozb+hixiQ1MAmVuyJ4JdosDF20v4wY65kGi6 b6gA== X-Gm-Message-State: AOAM532/F4qumQtynJv/mW+Ux39tiY1mnKZ15WzbdfLva1oGYFNjOKn9 y6oorv3v4VGXr5NQngnL6gbN0A== X-Received: by 2002:a05:6000:11c1:: with SMTP id i1mr2891482wrx.215.1615374067614; Wed, 10 Mar 2021 03:01:07 -0800 (PST) Received: from apalos.home ([2a02:587:4647:e6c6:2e56:dcff:fe9a:8f06]) by smtp.gmail.com with ESMTPSA id j12sm28777710wrx.59.2021.03.10.03.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 03:01:07 -0800 (PST) From: Ilias Apalodimas To: jens.wiklander@linaro.org Cc: Ilias Apalodimas , Simon Glass , Sean Anderson , Patrick Delaunay , u-boot@lists.denx.de Subject: [PATCH] tee: optee: Change printing during optee_probe Date: Wed, 10 Mar 2021 13:01:00 +0200 Message-Id: <20210310110100.3040439-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() -> log_err() and report those explicitly. Signed-off-by: Ilias Apalodimas --- drivers/tee/optee/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.30.1 Reviewed-by: Patrick Delaunay diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index b898c32edc0b..1b0a7c0c9668 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__); + log_err("%s: OP-TEE api uid mismatch\n", __func__); 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__); + log_err("%s: OP-TEE api revision mismatch\n", __func__); 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__); + log_err("%s: OP-TEE capabilities mismatch\n", __func__); return -ENOENT; }