Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp667276rdb; Thu, 1 Feb 2024 23:20:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IELPgIQph3ALc2hEprrx5pGjk6eD/VpmSLSC2mwzoi35gwVtard2jX+lgB5JHP4XjtbjzE0 X-Received: by 2002:a17:90a:cc2:b0:295:c61c:1c07 with SMTP id 2-20020a17090a0cc200b00295c61c1c07mr7242119pjt.21.1706858404513; Thu, 01 Feb 2024 23:20:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706858404; cv=pass; d=google.com; s=arc-20160816; b=y3TPPW061WA3ttFr+lCtkgqFog4TKSQC/ncULcnU+Ug6RXWgh1zV6WQakmJxun4JH7 2jboanPJ2+Mi+Fz620OtlCAc7FNqhNiYH3R50+K0NnXKKlRjNx4qo0q7DVnmhOC42/pg YAdLCCBAbjm5oyRFkDBwhgvyMLq5irFAi0FvyzA2KS7Lu6Stjmbv2SL+NgXhkbfyU1rr 8xrQA9Ay1Qe+HCHLf8vGVp9hd2Btg5xWWzKXWZ8ZFOn4WYYoV1H63llhQwSNvxkAwHga i4gwlOMWtprUzrXsIFfetvcTkBJkI5g81G7zvL2L9pI+wL07i9DW6flBYUvRyH+TBCKD f+Fg== 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=xLWuCiz71nrFcofnKFk6KegVSb2S3GdsptB+HP0vce8=; fh=yZVD5PSfQJFEkDyQEns6OCjwk8v9AmqhwG0GgrCFQQM=; b=nzkfZg2yKjDszmvQAb0bWvF9d+bLf3LGEXomshLRNbKb0nHAInRHj8QGiQTQXMcDYb WtuUH+YfCSvBrFuIPJm+hCj5p8J0EowgpB8ECpsFHwwbglM8pQD/2GiHl2a3vJV09h72 MsEepwc3XH6jEwA+pagk5upJtJCswlWOcl8lY1DO1HxJKTD7ozqudGCP6CIJNq73b1ts UgGOTu7eViwydrSQlz060VJQOEMI6UqXJ+zkQuS6q3qFvsiKQnEIWbCk0hJXDqUWobEm jdyyF4mtm1nHtX3Y9yDWYxN/rL/eyh5AeBPepKi8eVkE2EneSOWGMwOyLsaUrSK1ZTC9 fngg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u2Gxc7Vw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-49326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXeifGE2RXOr/EDNj+0/ZKiG1uOVCOuBX8ZZ/AuMDRipsQ6WLpLp0Mrb5LyDa2sHEe9brqNGLXHL3AbI+a66k7/sc20x6+y5Och08ZV0w== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g23-20020a17090ace9700b00295aaad967asi1225020pju.137.2024.02.01.23.20.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 23:20:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u2Gxc7Vw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-49326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49326-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 87FE4291EED for ; Fri, 2 Feb 2024 06:59:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 724A22C1BA; Fri, 2 Feb 2024 06:56:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="u2Gxc7Vw" 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 94B41282E9; Fri, 2 Feb 2024 06:56:27 +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=1706856987; cv=none; b=bBkZiune8khOsk22QTEs0vRQJ+2zDbLwBVfb0iy8NASVVgDuuMUR2XWUkUijNSs122vJ94jmPknHwjDwFi1JqNtdqWBov6P0eG1JyxR+eCntOGpI/VK5WuNlTOZ6Aw6SHVFha5XF5OOwKA1rPtN1OZQGkv1AZY2qC5j4whb5Uj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706856987; c=relaxed/simple; bh=UbOFvmxMCfDnw/gmoV7JLKUwxcacwjOcrfiF+WJiOpA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Qh1Di9RA2MyL3HdpKZnCpRJryFI6HF4yoSvIUWeeiQKBoIvNik0k9aFzQI8RVbEtuRCDcaUNp4ikc1CvkRJOtq2Dqcm2Jcj3f1D9H6TSMR9lhnjFyf2Ee3s9aq6Cl6BA6uAqSz3dd3f4v4oJHCWwsoe6viUruRrUV0XC7JTzXrA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=u2Gxc7Vw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 043D3C433C7; Fri, 2 Feb 2024 06:56:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706856987; bh=UbOFvmxMCfDnw/gmoV7JLKUwxcacwjOcrfiF+WJiOpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u2Gxc7VwSJBG7CcwBfKs9oPAEVwykMwexruSoEhi8oUL0csvCt+2CF0WkHFYMaIWE X3PWCJKXlhMvIS2zvFaENLuA6DQ32HEeAjQr/j44j3egVRA490bidTep3YqB7d0M6d J80MmCN58phB0hL1EoULMno8ykxGoAwHCchWlHF7LnE2dN0qHfqhaYXaCqN34lnn9R Bjtsnw4FHQgoo/WqjqFSg7F8E8R4+4yTVMfUM1Q5MQq6/9rZ+3tsUNiVVPgCgPC0LR /D/kZehfDHaaZhZ7B7uktgYV0OeviVaQoM4ljNCDT0Fg3/tctWP23hdpLKox3eKYzx e4e7SQhG3fnUQ== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 10/22] tty: vt: accept u8 in do_con_trol() and vc_setGx() Date: Fri, 2 Feb 2024 07:55:56 +0100 Message-ID: <20240202065608.14019-11-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240202065608.14019-1-jirislaby@kernel.org> References: <20240202065608.14019-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 These functions expect u8 as the control character. Switch the type from 'int' appropriately. The caller passing the value (do_con_write()) is fixed as well. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/vt/vt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 42bc0957a654..451a852ed234 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -2144,7 +2144,7 @@ static void reset_terminal(struct vc_data *vc, int do_clear) csi_J(vc, CSI_J_VISIBLE); } -static void vc_setGx(struct vc_data *vc, unsigned int which, int c) +static void vc_setGx(struct vc_data *vc, unsigned int which, u8 c) { unsigned char *charset = &vc->state.Gx_charset[which]; @@ -2198,7 +2198,7 @@ enum { }; /* console_lock is held */ -static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) +static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, u8 c) { /* * Control characters can be used in the _middle_ @@ -2963,7 +2963,7 @@ static int do_con_write(struct tty_struct *tty, const u8 *buf, int count) param.vc = vc; while (!tty->flow.stopped && count) { - int orig = *buf; + u8 orig = *buf; buf++; n++; count--; -- 2.43.0