From patchwork Sat Jan 16 21:51:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1427589 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=jjKn7+9Z; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DJBbw3M6tz9sVr for ; Sun, 17 Jan 2021 08:52:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 31B70829A7; Sat, 16 Jan 2021 22:51:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="jjKn7+9Z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EE65382991; Sat, 16 Jan 2021 22:51:52 +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.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (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 0278282991 for ; Sat, 16 Jan 2021 22:51:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2d.google.com with SMTP id b19so22877615ioa.9 for ; Sat, 16 Jan 2021 13:51:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WIxbA94igBqVGlHkYsgzVbotYSJ+uWhKv6ZmL5FMWkc=; b=jjKn7+9Z5SdvloOxhtoXLxgMwMa1qjcAi15jrfrN3e14oW+x+yj7Zr4LCAjwNR+twn /FsR6gHKJ+QVnMpNS9IIV2ii3ydLlj9YRsrBkzJUk3ttGc6NImOop1IVZ+OSdeIMZQa+ JgBUl/8+xhA8Naf5R+Wh7DlkETqhtKu4/23y4= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=WIxbA94igBqVGlHkYsgzVbotYSJ+uWhKv6ZmL5FMWkc=; b=Xxq+pKdrYMtaDLJ02EbzRQdiNIXA/CnW4AbDIsXXjeWSfoSR4hThfTWl1Ly30kw9mu K8UAel/olof+/7NFA+psBVM2wclwC8lemp/x4Wc+oRS8YPo6dzynFMByQMzxVe+x1KGb 369JqMVtxmz6YGgAZKKSLA9Jq+ezpU21tl+xD4AAhkpnbnrOPMcdjUQ3IkWZQs2wxojo VZOa5d0H5lh33DIT0dTpTrE3o7HhWFD7v0eji/brl4uCmJ57wEzEkXVU0czhysD8lsyO OVYPctsbDGNbYRdV93rUODqQTL0iFdJxrvZhDtml9psbHI0u0ENYiLbiuZrpzBc6hKkH DB8w== X-Gm-Message-State: AOAM5319H/WhSx7jD43/PrMAzRURoZchZ0PstC7cTforH3OVbeUdsJvp 8Ovg8wRmG+fxYBYcPEBDCEeFawjyx9S56FE+ X-Google-Smtp-Source: ABdhPJyZqwIIWgFc2qjem7r4bAjtBfY+VA8fNm+VNlc9XHrPsKkpO7vap1Umi7fWjOnwaC0yN+ToYw== X-Received: by 2002:a5d:84cf:: with SMTP id z15mr12768225ior.81.1610833906673; Sat, 16 Jan 2021 13:51:46 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id r19sm7519665ila.70.2021.01.16.13.51.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Jan 2021 13:51:46 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Bin Meng Subject: [PATCH 02/11] tpm: Use logging in the uclass Date: Sat, 16 Jan 2021 14:51:29 -0700 Message-Id: <20210116215138.1218256-3-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210116215138.1218256-1-sjg@chromium.org> References: <20210116215138.1218256-1-sjg@chromium.org> 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.3 at phobos.denx.de X-Virus-Status: Clean Update this to use log_debug() instead of the old debug(). Signed-off-by: Simon Glass --- drivers/tpm/tpm-uclass.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/tpm/tpm-uclass.c b/drivers/tpm/tpm-uclass.c index beb0fa3f93c..35774a6289e 100644 --- a/drivers/tpm/tpm-uclass.c +++ b/drivers/tpm/tpm-uclass.c @@ -4,6 +4,8 @@ * Written by Simon Glass */ +#define LOG_CATEGORY UCLASS_TPM + #include #include #include @@ -87,15 +89,15 @@ int tpm_xfer(struct udevice *dev, const uint8_t *sendbuf, size_t send_size, ordinal = get_unaligned_be32(sendbuf + TPM_CMD_ORDINAL_BYTE); if (count == 0) { - debug("no data\n"); + log_debug("no data\n"); return -ENODATA; } if (count > send_size) { - debug("invalid count value %x %zx\n", count, send_size); + log_debug("invalid count value %x %zx\n", count, send_size); return -E2BIG; } - debug("%s: Calling send\n", __func__); + log_debug("%s: Calling send\n", __func__); ret = ops->send(dev, sendbuf, send_size); if (ret < 0) return ret;