Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp265341rdb; Mon, 22 Jan 2024 03:38:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZ0KZcuh9taBnZcPZN9UVDZRd28xfwSB87QQLpDYIVmOcnFxXBWiJ1+JmHZ5wMapr9cD8a X-Received: by 2002:a05:6e02:e51:b0:360:7e0a:a8d3 with SMTP id l17-20020a056e020e5100b003607e0aa8d3mr2681390ilk.95.1705923498852; Mon, 22 Jan 2024 03:38:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705923498; cv=pass; d=google.com; s=arc-20160816; b=QdPbBu5KLbbFpXF4obEqhLAXkY3JuAqp1MnElSjCKBg8PcgDL/aZuMpaPl1IXLgStf oQLb2kzxdJY1FE4B2hQvh8+ADO/IbCckxeqNhHeTL17QLWFzLbey/ukVdB0YUTx3PlYc 36RILtoAyh6YO3LqwnTO6TbPgf5SJge7zwj4bt9hRwVQ+iwlQB1Irpo0+9qC63RKKE7d 2mZOwCYt1moYUavT0bqy68NsS5s1d4oAY/wTg7v8Aqi7xaMaiRQjr1hkTgF1O/x1iJmj QFbpeuM89PfP8q4TwxXXRXH5rzKduzvJNAh5dRg3QaKTKfJYo+fqI9IDqSjH9LXZZMNJ iXtA== 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=Uswelp5JzYZmTGBJ7ncu5IV7ZWXz53d90QvOUMr6XVk=; fh=1YNwm5KBWetjB3qGkhgLqh/dZnCTsWuqRk83JW6hjgE=; b=Q4TW8d3qE2IuJMylr8dBt8rzOO17qg+RnOLdDoIbfHk7FWAOocmw8hn5+AAUMMXWGt POffl8i63NrOLIINpTAzc0JTHKgL6lx5CzF07kwpEnzR3dDT+/x1XL/XC4h4KrC+Ms3w RnRZkJdjTLRtYpfxcZPpvjOycOu8unbwqFeLlQ4rRLH8WfyozW6hS//1kzSIBgQ2LRVe BzZNiFWUSKXJ9vBsWWjY3NmhYCUw803gYDyqxXPa4Lbr6w5KftNjMu4ZGvThNrFiEJjc KiXUWZU3R2uYEdfOrkv6CbwPY0uohyzOHFfSOzeWskN1QoBlW36sNKFar23BpHWR70Ly SPWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GD82W+4L; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32825-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32825-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e21-20020a656795000000b005cecfa36709si8031413pgr.344.2024.01.22.03.38.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 03:38:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32825-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GD82W+4L; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32825-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32825-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3F4FBB2C9B0 for ; Mon, 22 Jan 2024 11:09:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 056643DB96; Mon, 22 Jan 2024 11:04:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GD82W+4L" 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 54A423DB86; Mon, 22 Jan 2024 11:04:35 +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=1705921475; cv=none; b=RzTstXBzKkwOulmKT+hMX8uWlK+E3v9CkqzIB9g1rTQXpxDREIGc5btP50RQIba/nLtDH30Ml91e79tjfUhhNXZjDSsWEbVj1MEmkxcgjmaurhEDUQoYDrCdNoX1YTgmpDlxH5oedbOV9Z1NLwYvx4cz6OnF1DRWVGhoKK0NYD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705921475; c=relaxed/simple; bh=bnN9HZ+jI61Phc1A4Wql+BO8sOtHFz/ndSLyznnytgM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o4fU4dE3Zw+M91so05omlefIsKpc63efSRLabAuaGxSGJ2tHskCl5QrDx3guhKlh0TfKgjtQ7GHfmYvn0VptIL74byg0K7YEapPyeAPNH4CtI8bIUzlEGP07wpBQVgvXUumfPdbYFXBCOouZRpAn55QsKqDZQyMjSH0JuRT7niA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GD82W+4L; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC666C433F1; Mon, 22 Jan 2024 11:04:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705921474; bh=bnN9HZ+jI61Phc1A4Wql+BO8sOtHFz/ndSLyznnytgM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GD82W+4LHirl7JcCfqckyQn4Do+dUDtCQN+YfWSa1g9BqTFSkX8Wgv0By+B1QLkCH cnpXW+j0kjLJZ+Cu68LxazTq90Ta4VrYV2dZ5n4KbGnbcyDbMBophgyDma6aYzYRAk fj5EhJcAcgjSD6w8IaeCEX4saBYVcCntawLZjJhzSdeiRe2BSV+VTOJpGRRL6ptt0H GswAc+hwAfsOcwSnyzlbhHwldOrfdi0zLHKUISp0DG1leYohA5ofSB0+jwPAI4T5zl FjgyTPhK8f0iM04jkDB02c7lrZrO+Szue5DZaqMPnXM3THpEDkYMXz42NJPKNCj85h m0D5BpYz6uh6w== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH v2 16/47] tty: vt: reflow csi_K() Date: Mon, 22 Jan 2024 12:03:30 +0100 Message-ID: <20240122110401.7289-17-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122110401.7289-1-jirislaby@kernel.org> References: <20240122110401.7289-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 Push cases one level left, according to coding style. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/vt/vt.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 2f3f5e4817f6..8d868aa33733 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -1555,20 +1555,20 @@ static void csi_K(struct vc_data *vc) int offset; switch (vc->vc_par[0]) { - case CSI_K_CURSOR_TO_LINEEND: - offset = 0; - count = vc->vc_cols - vc->state.x; - break; - case CSI_K_LINESTART_TO_CURSOR: - offset = -vc->state.x; - count = vc->state.x + 1; - break; - case CSI_K_LINE: - offset = -vc->state.x; - count = vc->vc_cols; - break; - default: - return; + case CSI_K_CURSOR_TO_LINEEND: + offset = 0; + count = vc->vc_cols - vc->state.x; + break; + case CSI_K_LINESTART_TO_CURSOR: + offset = -vc->state.x; + count = vc->state.x + 1; + break; + case CSI_K_LINE: + offset = -vc->state.x; + count = vc->vc_cols; + break; + default: + return; } vc_uniscr_clear_line(vc, vc->state.x + offset, count); scr_memsetw(start + offset, vc->vc_video_erase_char, 2 * count); -- 2.43.0