From patchwork Sat Jan 17 00:56:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1549 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=1768611469; bh=hi+5n9YGMxkC1o1UgbOJJVvIyS+koBzk1p7y2D/nYuk=; 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=Q5A1rg09WMSSZ5Q3mc02tvXBuFCTFZahaZMnJnDOsPkZjBTbQyaZS6AAJr3O9gNv/ dCblHL0Opgj4bB/biZsA2wCERPu48tKjJmHyQqKudRQXUkyKcCdaKPWTSo8RBORW2w kohJH9mIquCLzarafc+knh5Ju+hb3/A8/7uF6BZ90HBDZBi9Hw0xaV208iSsaK5iVr IiWczu9vBVBeqfAGf+3ernKFV+nArdp1yXqGOdIMnuxmz4PIiigTqb2pMOUy6fRHyy 43/HJKrQwtAReqK1Fh3saWs7JlEY87Ruu76GgbLYVhnaYZUbN2/k5sEsD/KY0YLik+ 5z3VxOLJLBk6Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E114F693E7 for ; Fri, 16 Jan 2026 17:57:49 -0700 (MST) 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 04GlQ4fDBfbA for ; Fri, 16 Jan 2026 17:57:49 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768611469; bh=hi+5n9YGMxkC1o1UgbOJJVvIyS+koBzk1p7y2D/nYuk=; 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=Q5A1rg09WMSSZ5Q3mc02tvXBuFCTFZahaZMnJnDOsPkZjBTbQyaZS6AAJr3O9gNv/ dCblHL0Opgj4bB/biZsA2wCERPu48tKjJmHyQqKudRQXUkyKcCdaKPWTSo8RBORW2w kohJH9mIquCLzarafc+knh5Ju+hb3/A8/7uF6BZ90HBDZBi9Hw0xaV208iSsaK5iVr IiWczu9vBVBeqfAGf+3ernKFV+nArdp1yXqGOdIMnuxmz4PIiigTqb2pMOUy6fRHyy 43/HJKrQwtAReqK1Fh3saWs7JlEY87Ruu76GgbLYVhnaYZUbN2/k5sEsD/KY0YLik+ 5z3VxOLJLBk6Q== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D0700693E0 for ; Fri, 16 Jan 2026 17:57:49 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768611468; bh=n72gbOOoip+eZAZIGfjLdcp96/vBOlRq/rLJKoR+3P8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VqNj8ICm9fMw/mnxEaP/RSTzz0q2fZv3thdpxU7RZ7tz4mdS2rGWMqz93tSiHPYF2 iMxPdvDN/vjEBRPlTJUSUyjdpYqSF+XrMh/YkK0MiIBS506hlLo7g/cUhXNkyltgKf AAm7LGYZqpPc95dmSF2CyX3vDZCM1LrcFZPiQPwEvDuWzCXQL6KKjAZe/oPQn5/i8i 0d/KfCPocWSDgJMXc3m8mBmoVf8TN6wuo+uSDT/E9zXEDQFZ31z2HJSnC1y60qF897 BBm7Mk6Kuc0co/gyYPPc2wzGZZPdt0MQ+TO2gwA9d87f63lOHk7JLfGPBY87jfl5Ua vhMkv5vKVThdQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 62ECE693D7; Fri, 16 Jan 2026 17:57:48 -0700 (MST) 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 n5YVprEMydQS; Fri, 16 Jan 2026 17:57:48 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768611464; bh=gZNMQPIRqI6rpb12jTeziUbUDI0uSxsVrJojCIg9mow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eLHe0f6DhFa+YZX8gobfKsv+BG1MA7W9VmUuqRF8S27WGm2dX2PEOMxXAj1K5Zavd p6N3ZBGN8q4zpoVuHGqyCFmR2AUAKAX52VQEu+8oDihY951+6U8HPFynahKAHjh4q/ PTNLyCj9FKRfm7e1PuKsdTrPnbo0RvZ9w6NPR2jSHTeOzp2I+MzpU/ysc0Sngb+77b frqfytM07jDwknY3p955xOSbfMtJHFn018TJxb29eVnmvlCWd29/S+U3LNXt9ema+2 fIGRa7srVQEuuY3hKNaaCK4FUozmBY/dWpedQ1kVm+LOcpzh6ECRA7bj5OAExCeX57 hT12jv+Y1Kh+A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 179A6693B1; Fri, 16 Jan 2026 17:57:44 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 16 Jan 2026 17:56:45 -0700 Message-ID: <20260117005702.1684841-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260117005702.1684841-1-sjg@u-boot.org> References: <20260117005702.1684841-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: SEVHT43WMPBK6JQP6K63EQ2JQLI7R5PG X-Message-ID-Hash: SEVHT43WMPBK6JQP6K63EQ2JQLI7R5PG 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: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/18] video: Update cli_index_adjust() to use vidconsole_ctx 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 Change cli_index_adjust() to take a struct vidconsole_ctx pointer instead of struct vidconsole_priv, since cli_index is now part of the context structure. Update all callers accordingly. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- drivers/video/vidconsole-uclass.c | 4 ++-- include/video_console.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index eda55fcf04e..ed9311bd05e 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -85,7 +85,7 @@ static int vidconsole_back(struct udevice *dev) ctx->ycur = 0; } assert(ctx->cli_index); - cli_index_adjust(priv, -1); + cli_index_adjust(ctx, -1); return video_sync(dev->parent, false); } @@ -478,7 +478,7 @@ static int vidconsole_output_glyph(struct udevice *dev, int ch) ctx->last_ch = ch; if (ctx->xcur_frac >= ctx->xsize_frac) vidconsole_newline(dev); - cli_index_adjust(priv, 1); + cli_index_adjust(ctx, 1); return 0; } diff --git a/include/video_console.h b/include/video_console.h index 43b894048ed..d3e8b3f3c9f 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -612,10 +612,10 @@ static inline void vidconsole_readline_end(void) } #endif /* CONFIG_CURSOR */ -static inline void cli_index_adjust(struct vidconsole_priv *priv, int by) +static inline void cli_index_adjust(struct vidconsole_ctx *ctx, int by) { if (CONFIG_IS_ENABLED(CURSOR)) - priv->ctx.cli_index += by; + ctx->cli_index += by; } /**