From patchwork Mon Aug 25 16:27:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 131 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756139274; bh=clZoumKB3L0JLbci2+nz4KWmpDBD8QcqAQ/f5JtJ24c=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=GC33hOEwiyeEdw6U8ndt/1QHK7hoaWOXeDaH0BXhWw9s5XUeymrJ64Rg62xyMCkWc T2a5eMFOmhCXuZVZY++3GdgDDOAlTPcp7NPbkyxLZFVyk3LuUq/5eqchwzbkpjnoDh RK1vJFqhlaiX3eHksZD/TEnh23H+wFLPCFASFTmw02BHSHecb1sCCvfHdcUX/vh+r4 jZZ8i7j2FP91Dmx/bVvWErw7S8Sg9ddyqNCYOLQcrcBfcmQ1IQ5U2kxykiIScHfpgQ W0/aH675nRNW/3NNOtPrREWYzfh6Tct1Vs2/YvyO0zXR0nbw+spk62RV4DSDASyBpR Dem4vLOp/NuCw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 94A78677A4 for ; Mon, 25 Aug 2025 10:27:54 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id t1lNloXmoG94 for ; Mon, 25 Aug 2025 10:27:54 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756139273; bh=clZoumKB3L0JLbci2+nz4KWmpDBD8QcqAQ/f5JtJ24c=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Z/C2EphLrHmr5mwipBdlleR8MZ5xwM4gNxknoO8SDFRHFXz3rBR9vk38sFPPgvKP3 gbEecUVbmh7/YG1GcbMhSjHNSlyc9vUreNZ/kBZZseLxLZCO7shvj/3QfdRyjBpED6 Myad/nlc/qMiWkWosEUrvJt1QvRXV2d9i4Rl19kHWVvp0lqNC57zcLXmhzJv6J8Jsd GlA/0am+tdFcvj1vt+8oZG10pIc3rXbz+pIoV+cL7MC9LdbvUxItyQkX/61bJKpu8P 0tk77mx3ilIwuTQK9OoHd1Rb60dksKsFbgkLQgoK8LEm7nLv0+pdhkMEB6sVnDE9Jk 4gizypZvSQQJw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DB56B677A5 for ; Mon, 25 Aug 2025 10:27:53 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756139268; bh=hpujzsAS+Tsg5UJ0y0C6j0RVO924tUDpf044YByRoJ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EV6Y5A0GwR0KFYvoBmxP9rrhM/6Rd1qVmCrPsJYtFcU6Gl/EvIMWOMihPViYANKL/ JwJ8v1PKrLLvm+/uGFXC+xLzJdUKe7Phrib2vXnDQXUjsyKxG4eHA9EJiQHKuASvOT ApreHl9vb3Yfkn+ylM49oXD9KikRhUGPTliFz/HZE0z4dWbd27QKomqWKzsa3TQ0oC asAJuwExZ+nD3Z9qrcbX3mj2WXH+cNYHcEeEO5w1dCs/CVzS2IAcNI/F0HJdZWoNyu bNKp34Nqxz8RLPeAfQ+kxK52DytAzlQMVYvxo/pa0hBmaLjpfHdFWKuToBaSCb80aG Ld9X5I2rnmzGA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EECBD67787; Mon, 25 Aug 2025 10:27:48 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 5KNZ24sSQway; Mon, 25 Aug 2025 10:27:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756139266; bh=XG4+DVX5VxQWeCstiWC5rQ/phtcEYimW81WUj48M9ZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kcN73D1DyxyEfMB6FhdlL/zmPZ4TBwXDq+kPwYbDSeX6D1d4Zm3lTWrkvRgDQvGe7 WHn1Q/quFMZwpmQ4s7eqGTMlXwaIhnUER5WuaMk/JAK9wdnV94zT02eARX6cuifOgF QeOI7JiOCYXkD77pH2wmeL/vgL/Hi7pQ/FaddBmSh4pPmbWcKQ+p2GdtmktTScOkrk muSgu+xv+Th5BHrVqv0ZKKXWBjw8nNseJS/gSFm0FdKn9arZuTvxvw08AfDP0OpY68 eoIuPWjZEQJ/vFDdla2cp8rlvN84Z87Z7b17yZLD2JISyTe2cjmpcuHOYp6gOQPL53 grIAoqKqJ5bXQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 49B5C5E45E; Mon, 25 Aug 2025 10:27:46 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Mon, 25 Aug 2025 10:27:13 -0600 Message-ID: <20250825162727.3185381-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250825162727.3185381-1-sjg@u-boot.org> References: <20250825162727.3185381-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: V5LMJWEEEGG25IWUZUDZNJ3FL5APSUM4 X-Message-ID-Hash: V5LMJWEEEGG25IWUZUDZNJ3FL5APSUM4 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 10/16] console: Update coninfo to use sdev instead of dev List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The 'dev' variable is generally used for driver model, so change do_coninfo() to use sdev, to avoid confusion. Signed-off-by: Simon Glass --- (no changes since v1) cmd/console.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/cmd/console.c b/cmd/console.c index a8133ee3fa3..cb0c041d947 100644 --- a/cmd/console.c +++ b/cmd/console.c @@ -11,34 +11,33 @@ #include #include -extern void _do_coninfo (void); static int do_coninfo(struct cmd_tbl *cmd, int flag, int argc, char *const argv[]) { int l; struct list_head *list = stdio_get_list(); struct list_head *pos; - struct stdio_dev *dev; + struct stdio_dev *sdev; /* Scan for valid output and input devices */ puts("List of available devices\n"); list_for_each(pos, list) { - dev = list_entry(pos, struct stdio_dev, list); + sdev = list_entry(pos, struct stdio_dev, list); printf("|-- %s (%s%s)\n", - dev->name, - (dev->flags & DEV_FLAGS_INPUT) ? "I" : "", - (dev->flags & DEV_FLAGS_OUTPUT) ? "O" : ""); + sdev->name, + (sdev->flags & DEV_FLAGS_INPUT) ? "I" : "", + (sdev->flags & DEV_FLAGS_OUTPUT) ? "O" : ""); for (l = 0; l < MAX_FILES; l++) { if (CONFIG_IS_ENABLED(CONSOLE_MUX)) { if (iomux_match_device(console_devices[l], - cd_count[l], dev) >= 0) + cd_count[l], sdev) >= 0) printf("| |-- %s\n", stdio_names[l]); } else { - if (stdio_devices[l] == dev) + if (stdio_devices[l] == sdev) printf("| |-- %s\n", stdio_names[l]); }