Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp193457rdb; Thu, 18 Jan 2024 00:06:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDI/Boyuwqdzyz+tVEWGB+0hnq/weQOAsrSrM2F49aNwaJUp8iS6kJpno56xuCI1MmNki1 X-Received: by 2002:aa7:9889:0:b0:6d9:a0da:4fbc with SMTP id r9-20020aa79889000000b006d9a0da4fbcmr334509pfl.36.1705565213915; Thu, 18 Jan 2024 00:06:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705565213; cv=pass; d=google.com; s=arc-20160816; b=wn4RmWb6rJDzKEwQqUKGgPjJ0KOkjJubKkCtMfw2L/lrIkvAeDvA3flWfVepIMmlK4 w2T2RBvv8jvU1ZwHwBq026LUfZUxc3NIdtXklh5KnCNONxn0cmwn+P4NKereJkXJnbW5 krbPVqWP3T60xHfJRfKhRErDGuUTX+gT/HS71ykDM0LDSADzgFQV0yd2zUrYr3ovlnFF 0dH8hldYAOC02rqHGOlYQ5HOlyQVZ+HW59lZtd7zFJwx9bU6EMePv3TKz76hGhfjrjmI ILEEh4kRQKr6qZYq56q6LkOdirmxBLqDpGHo63W7FAh+M//PLml/hhpHtKM1Nmh9sJjV YD/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=AghGoEJTmfT9JGqjtrWxF+l0vhRKDwpsDDWK73D6tAE=; fh=rBgshbbup7AStmIKFP/MZgKVOWlXYCY6hJahWj1YBks=; b=sI2GOq1rObpIb/pKBc2wA9/ou3X5QDP3MTpJhUuIqcC8cCvTLaQzJUG2P+GkJJsOui ompqlQxyk8dTtXJpUGDluVdv6CV1+SfVrB7IFoqay3tY6RZ68bxUB1qyOVCYEJdEfMsf VhTSN1eHxo1pKjATxn0QPRaD7IWBuWMhvsebrPOaPXr55cOKVew+gZDxwrEZ7jeysxXJ 1HgNoHYfkgJJfShjsdx7Wl409UETBYSQmw+5d/5NVOCXV924Kx8+N5hnFJj9PjR5/4Z/ SlyxkckAHoxawbnD0ghN+O1XnhUppC8vNtJUzbqFaAnFsQFvSJy+IAvLaZgFOdqYIWHt Ecyw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C+Nw7bll; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29821-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29821-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h10-20020a65518a000000b005cdb0648eb8si1050917pgq.508.2024.01.18.00.06.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 00:06:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29821-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C+Nw7bll; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29821-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29821-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 648E9284A9F for ; Thu, 18 Jan 2024 08:06:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07B3D2E82C; Thu, 18 Jan 2024 07:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="C+Nw7bll" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B4822E658; Thu, 18 Jan 2024 07:59:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705564758; cv=none; b=ga9YxpYF77lmtxQPTcTrg9uniIFD9sOVI2Hw53EAoHpUgGwa7Ft0BNSBf4VDBVSr6IWQQIbR8ljQOjGtTtCianr/mBiJ69fnTMbI7pCiE+QMYHt5+bpi3kYRMGObz9PA8YiIz3ljh29M4J0+E1p5fzEaz7VfOOmE13pZiBmNSeo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705564758; c=relaxed/simple; bh=cqURl25QFkwlFyKcGIxTktkkLSYtk64KcuI48GLYf8A=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; b=XpswdcYBwVqkkg6Ktiv4Ui7KPbHUMWiZLJtCphLStJeIR6Hab5lnLbyP+jkDFK5Xn+KF5qY/gYsav81fvGMdbcEcsi8ohZvN9hXAfFrSvjpKG3RyE+hDFN/FCmFslOxZEb7Q6kYaya1PGt/tSqm3mqfRz0bhbqLlOA+sBnPcljk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=C+Nw7bll; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F517C433F1; Thu, 18 Jan 2024 07:59:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705564757; bh=cqURl25QFkwlFyKcGIxTktkkLSYtk64KcuI48GLYf8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C+Nw7bllyMMp9LW+nGs6s5cMq8GxD1xEhsl+LyPb+D7NjAqEPnAooDk2st5GaPUng EZY93HjviMzPAH1v6SYzao5utDo0FP1nuLHH0pt024gPrC3cjuFMJy92iJS97DU8n/ tNHy9V3+yS0xUm7+bsgPS+cgI9t28Kxg3k+sgFZkzAqTjy9a3fDViBz+Md1UcwBG+3 xY0JbJGWt6+yd5A/kd8I/TrGRbUz+Zj/m7nayBsjTBo24hCZOc7zTW0s6fw95br8t1 hFYwYfJH6eMtgkQ6Dx/IQF6judXryBJLzqhVHhXA3jrTOcHomG0/W8Augcq2Me9q+3 WC5kUnF7wEymA== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Helge Deller , "James E.J. Bottomley" , Daniel Vetter , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-parisc@vger.kernel.org Subject: [PATCH 34/45] tty: vt: make font of consw::con_font_set() const Date: Thu, 18 Jan 2024 08:57:45 +0100 Message-ID: <20240118075756.10541-35-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240118075756.10541-1-jirislaby@kernel.org> References: <20240118075756.10541-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Provided the font parameter of consw::con_font_set() is not supposed to be changed, make it const. Signed-off-by: Jiri Slaby (SUSE) Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Daniel Vetter Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-parisc@vger.kernel.org --- drivers/tty/vt/vt.c | 2 +- drivers/video/console/newport_con.c | 5 +++-- drivers/video/console/sticon.c | 4 ++-- drivers/video/console/vgacon.c | 2 +- drivers/video/fbdev/core/fbcon.c | 2 +- include/linux/console.h | 5 +++-- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 756291f37d47..196c849ca492 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -4639,7 +4639,7 @@ static int con_font_get(struct vc_data *vc, struct console_font_op *op) return rc; } -static int con_font_set(struct vc_data *vc, struct console_font_op *op) +static int con_font_set(struct vc_data *vc, const struct console_font_op *op) { struct console_font font; int rc = -EINVAL; diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index dbb31bf87bf1..4203bd5fd0a1 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c @@ -496,7 +496,8 @@ static bool newport_blank(struct vc_data *c, enum vesa_blank_mode blank, return true; } -static int newport_set_font(int unit, struct console_font *op, unsigned int vpitch) +static int newport_set_font(int unit, const struct console_font *op, + unsigned int vpitch) { int w = op->width; int h = op->height; @@ -568,7 +569,7 @@ static int newport_font_default(struct vc_data *vc, struct console_font *op, cha return newport_set_def_font(vc->vc_num, op); } -static int newport_font_set(struct vc_data *vc, struct console_font *font, +static int newport_font_set(struct vc_data *vc, const struct console_font *font, unsigned int vpitch, unsigned int flags) { return newport_set_font(vc->vc_num, font, vpitch); diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index cbb9ef438214..710201fb8ce4 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c @@ -153,7 +153,7 @@ static void sticon_set_def_font(int unit) } } -static int sticon_set_font(struct vc_data *vc, struct console_font *op, +static int sticon_set_font(struct vc_data *vc, const struct console_font *op, unsigned int vpitch) { struct sti_struct *sti = sticon_sti; @@ -253,7 +253,7 @@ static int sticon_font_default(struct vc_data *vc, struct console_font *op, char return 0; } -static int sticon_font_set(struct vc_data *vc, struct console_font *font, +static int sticon_font_set(struct vc_data *vc, const struct console_font *font, unsigned int vpitch, unsigned int flags) { return sticon_set_font(vc, font, vpitch); diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 1ef318bac703..ea086b39c6f5 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -1039,7 +1039,7 @@ static int vgacon_adjust_height(struct vc_data *vc, unsigned fontheight) return 0; } -static int vgacon_font_set(struct vc_data *c, struct console_font *font, +static int vgacon_font_set(struct vc_data *c, const struct console_font *font, unsigned int vpitch, unsigned int flags) { unsigned charcount = font->charcount; diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index eee2adf5c682..62474630c4d4 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -2460,7 +2460,7 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, int charcount, * but lets not assume that, since charcount of 512 is small for unicode support. */ -static int fbcon_set_font(struct vc_data *vc, struct console_font *font, +static int fbcon_set_font(struct vc_data *vc, const struct console_font *font, unsigned int vpitch, unsigned int flags) { struct fb_info *info = fbcon_info_from_console(vc->vc_num); diff --git a/include/linux/console.h b/include/linux/console.h index fbb32e702472..a500caadbad0 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -83,8 +83,9 @@ struct consw { bool (*con_switch)(struct vc_data *vc); bool (*con_blank)(struct vc_data *vc, enum vesa_blank_mode blank, bool mode_switch); - int (*con_font_set)(struct vc_data *vc, struct console_font *font, - unsigned int vpitch, unsigned int flags); + int (*con_font_set)(struct vc_data *vc, + const struct console_font *font, + unsigned int vpitch, unsigned int flags); int (*con_font_get)(struct vc_data *vc, struct console_font *font, unsigned int vpitch); int (*con_font_default)(struct vc_data *vc, -- 2.43.0