From patchwork Fri Nov 17 01:03:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiang W X-Patchwork-Id: 1864903 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=jTYw3GML; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=eRi+iSeN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SWdxG70Cpz1yS8 for ; Fri, 17 Nov 2023 12:05:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zzBwVnMIlhiMnWYDnzEvAuBrsm3XB+39zUbxa/+EWpI=; b=jTYw3GML6t+8r1 qbVX6mOtTZ3SDnxgRhHf2rWFePnyzyg+RXXX/EiAzGlDqIRN7XR+Kzc9k6IY+7xTWqF0WgmxL1JRp NdSPIdsmVknkQOT/HgUuuXoga4q/40bZMnNLCmlu16dNuk39zOmQ3KnDrvbdNmXiDJrUZoDVVuSHL dZtSa9tGjNH2OiSBF8eJVD6GOJwJtZvP5RMIMmH8xPsGVigMWMxlT0o6EePw4yzTNyJ8hTsn/Nvr8 W0FVWE8ozDwnhFOicDi7gz6SOkxndyVbrtuNxpQgUNCzuZQBbRR//qbrCn3INP9kl2v3NaA1zA4ZC Uar1fZkQFQAsEWaWt4PA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3nI9-005NZT-0k; Fri, 17 Nov 2023 01:05:05 +0000 Received: from m15.mail.126.com ([45.254.50.224]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3nI6-005NYJ-05 for opensbi@lists.infradead.org; Fri, 17 Nov 2023 01:05:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=Dtoz3 2+rngfwM6NebPEitTrrbidFY9PPIlSU3/Si/SA=; b=eRi+iSeNccfKqNL1apP3x CDPqd2N4kpiuB1sxxCkqksfh2HCtH9orrZZIhLxpEYIc60K+gBH0Y6C47BNau1iN A8D7ZorbXcbrdBwxtkBv1CmguUUGWCctSPWNGSdBMWImXaW1DsS6MFZkiqd5Dx+e /dxDn5+nTmLMMLgk58RdsI= Received: from T490.lan (unknown [112.83.183.252]) by zwqz-smtp-mta-g1-0 (Coremail) with SMTP id _____wD3H1UuvFZlR9AjCw--.38662S3; Fri, 17 Nov 2023 09:04:47 +0800 (CST) From: Xiang W To: opensbi@lists.infradead.org Cc: anup@brainfault.org, Xiang W , Chen Pei , Guo Ren Subject: [PATCH 2/2] lib: utils/serial: remove semihosting_putc Date: Fri, 17 Nov 2023 09:03:59 +0800 Message-ID: <20231117010440.105759-2-wxjstz@126.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231117010440.105759-1-wxjstz@126.com> References: <20231117010440.105759-1-wxjstz@126.com> MIME-Version: 1.0 X-CM-TRANSID: _____wD3H1UuvFZlR9AjCw--.38662S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7AF1DGrW8Xr1UXF1xZry7Wrg_yoW8JF4fpa 4fKan2yF48JFyxX3yDJrsFqry2gFnayF9Fgayjgw1IvryUX3WxXwsrGay5Zr15W345JFyj yF4ktr1rCw48J3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pRiSdDUUUUU= X-Originating-IP: [112.83.183.252] X-CM-SenderInfo: pz0m23b26rjloofrz/xtbBdBQqOmSdLj9a6gABsp X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231116_170502_483148_F530B5BF X-CRM114-Status: UNSURE ( 7.17 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: For some debuggers that do not implement SYSWRITEC and SYSREADC operations, we can use SYSWRITE and SYSREAD instead like the implementation of semihosting_putc(). This makes semihosting_putc/semihosti [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [45.254.50.224 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [wxjstz[at]126.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org For some debuggers that do not implement SYSWRITEC and SYSREADC operations, we can use SYSWRITE and SYSREAD instead like the implementation of semihosting_putc(). This makes semihosting_putc/semihosting_puts similar. Since console_putc/console_puts are now interchangeable, removing the semihosting_putc. Signed-off-by: Chen Pei Signed-off-by: Xiang W Reviewed-by: Guo Ren Reviewed-by: Anup Patel --- lib/utils/serial/semihosting.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/utils/serial/semihosting.c b/lib/utils/serial/semihosting.c index a27c69e..19ebaa0 100644 --- a/lib/utils/serial/semihosting.c +++ b/lib/utils/serial/semihosting.c @@ -178,11 +178,6 @@ static unsigned long semihosting_puts(const char *str, unsigned long len) return (ret < 0) ? 0 : ret; } -static void semihosting_putc(char ch) -{ - semihosting_puts(&ch, 1); -} - static int semihosting_getc(void) { char ch = 0; @@ -199,7 +194,6 @@ static int semihosting_getc(void) static struct sbi_console_device semihosting_console = { .name = "semihosting", - .console_putc = semihosting_putc, .console_puts = semihosting_puts, .console_getc = semihosting_getc };