Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp258272rdb; Mon, 22 Jan 2024 03:21:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMQXwg4uEtdtJMM6PIEuIGUCDIb1J0f9b+trMg9WXhqyQ5CrA/DzWuo6Xe/gdx9P34FllN X-Received: by 2002:a17:90a:be14:b0:28f:f491:c4a5 with SMTP id a20-20020a17090abe1400b0028ff491c4a5mr1444787pjs.98.1705922488287; Mon, 22 Jan 2024 03:21:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705922488; cv=pass; d=google.com; s=arc-20160816; b=UV218q2zQmZiE+VRmgriEggm1jYC9S2Pw4xRW5d1b9CJcvzLFXIAoGlLyArLvhZsyb hK7umdbzbnvsRxGC1IW593qeMhYguTh+OY3gHYWwXRo6O4Iwh9A+Ylti1kXROXgWw5Qh Z4YTYZolbcGISXCYN/2J8W/gGXiglLkPd1tDb34s3rjjSGvcToSRcn9dhGwz4lOZb/Lv XR4pX4f3X7Z+ofqRhRDO0MU7ZWVVrMSIAFoG9eYiwPRmJtwDreEd1PFfntLuhJTMemVg 4hsIomSQjCLKe+0hUZCF71Z9141MpAbD22xyDwgVMQFG9hYm8wfSqeJ5j0OKq3Ab2vbv JpuA== 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=ETJ1izEd5v5Dwa55ctu+rNNh/guqsD/VSInfePMYaIw=; fh=1YNwm5KBWetjB3qGkhgLqh/dZnCTsWuqRk83JW6hjgE=; b=X1TvuvEt/g+g8pKNl6g6xjySUyHLRsJAqdKPQi2awM4lC3rjaoYQak/KvAbSMta71j QvVqhBq66hnhZsyvaLqa2y3TJNd3WLz4mwSB80SN1Ab9SrX423dlDelese0+7rMS8EBV 7fp0cVwtnXDfWIjXbf65fw+2tD1jfkf0SAg9W+n+vROpbN5pBt7fhcAqNjgL6Vh7bYyC jNEkLyCFkQ2bEqGyfeeZNFOF6B7ft7SeUf0GtKhTGB1f8Nm5SceYxb5DUswEdV13ur8P FwCW/zG44FeqnkJp8SfjguE67t7tc1UaPeTmsg3hulFajNGS9Hf18pQ+nrE3dhpxZnLy fLPg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PRbHUgHF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32858-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32858-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x14-20020a17090aca0e00b002903e315e4bsi6618760pjt.81.2024.01.22.03.21.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 03:21:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32858-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=PRbHUgHF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32858-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32858-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 171A228CE9C for ; Mon, 22 Jan 2024 11:19:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D72E48793; Mon, 22 Jan 2024 11:05:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PRbHUgHF" 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 A9BF948781; Mon, 22 Jan 2024 11:05:37 +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=1705921537; cv=none; b=UPghqrYyT1y11CxPNPY4LgWnthL/uCwKRMdgdBfzT2oK6rIWzQy9kPcnZAaANsIkJeLvrnZa1N5+7ctmz7Szn+6SkP/5c/0EVB3t4rNB6iX7DnVHmgQ1pPUlGnXWULWy54IbM5Zrmp3vf1ADt3V793XdsCV4TsqKcHpw/+qwjAU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705921537; c=relaxed/simple; bh=yElSmtG37qdY1QnV95p5waGPy2ApYIEYWs4uZ+i9NVg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZPRNt0g/iASQLVCH/EIKV0CTRf2qbi8XCEwlQPAJ4WQUI78mdZrKvZ5u5l6iRdBx5hzW2cDdCFRa1JmR5FUqCDKMj3obFxBwAKBAmb7LDV3iUtcHchVNw78TBfFLv/tCpp+VOhxZHBySwNMqAx3AOioAvpjIq3CF2Z3PuCsuwu4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PRbHUgHF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69B4DC43394; Mon, 22 Jan 2024 11:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705921537; bh=yElSmtG37qdY1QnV95p5waGPy2ApYIEYWs4uZ+i9NVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PRbHUgHFzLa480wveIWYQZHKNMyf6XTDxZapcWX2mn56a8MAPNZ5+sZSEJUmauIWM xnpRDgpSDjd46/bbEwl5M++Y3EstSPovezQ6iKQqCCfXjEc7gpCx47KuNGfDHk2tAK z2AMMlRTFV7hcubN2PaBuC/OhyPefNQwHAzj21fE+ZU3MRs/PUl4x5jU7BGV5kLCYb TGAxDPzVKXNOaXFMKJTfa6WgWJYt6mZKapQ5Cpk234e5asrrghldNuJyOnDwZoT4YB CIGk6xBNE2npOpXRN8JIaFRsCtXro5xOt2MGATcpnyaIuAsuU+W0K0yToZNo9DTuqy PehOnF4zjqHPw== 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 44/47] tty: vt: remove unused consw::con_flush_scrollback() Date: Mon, 22 Jan 2024 12:03:58 +0100 Message-ID: <20240122110401.7289-45-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 consw::con_flush_scrollback() is unused since commit 973c096f6a85 (vgacon: remove software scrollback support). Drop it. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/vt/vt.c | 27 ++++++++++++--------------- include/linux/console.h | 4 ---- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index cbe1a1106d53..bfe51af9a0f3 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -888,21 +888,18 @@ static void flush_scrollback(struct vc_data *vc) WARN_CONSOLE_UNLOCKED(); set_origin(vc); - if (vc->vc_sw->con_flush_scrollback) { - vc->vc_sw->con_flush_scrollback(vc); - } else if (con_is_visible(vc)) { - /* - * When no con_flush_scrollback method is provided then the - * legacy way for flushing the scrollback buffer is to use - * a side effect of the con_switch method. We do it only on - * the foreground console as background consoles have no - * scrollback buffers in that case and we obviously don't - * want to switch to them. - */ - hide_cursor(vc); - vc->vc_sw->con_switch(vc); - set_cursor(vc); - } + if (!con_is_visible(vc)) + return; + + /* + * The legacy way for flushing the scrollback buffer is to use a side + * effect of the con_switch method. We do it only on the foreground + * console as background consoles have no scrollback buffers in that + * case and we obviously don't want to switch to them. + */ + hide_cursor(vc); + vc->vc_sw->con_switch(vc); + set_cursor(vc); } /* diff --git a/include/linux/console.h b/include/linux/console.h index fa2cd81102b8..1eac3e6e32a2 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -96,10 +96,6 @@ struct consw { enum vc_intensity intensity, bool blink, bool underline, bool reverse, bool italic); void (*con_invert_region)(struct vc_data *vc, u16 *p, int count); - /* - * Flush the video console driver's scrollback buffer - */ - void (*con_flush_scrollback)(struct vc_data *vc); /* * Prepare the console for the debugger. This includes, but is not * limited to, unblanking the console, loading an appropriate -- 2.43.0