From patchwork Tue Sep 29 11:00:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 297438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1760C4727C for ; Tue, 29 Sep 2020 12:47:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A6C1208B8 for ; Tue, 29 Sep 2020 12:47:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601383644; bh=9rCrCU/IlF42dXf6kWQ22ZRUzkR1Au7ZM8NK732koDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1i5Kth51uHtC0RZt4lefU/vTIBFAGAdfY8090Muisp0qEXSL82rGk2ni1bN16edqx NoVlgPBURnktGA3qRCWf4woI3+AWkaGJlFTX235cj4UwfHLFWCpYmZC318CBFekKnu RmltWjlglyshOsZMxy3/vK42Y7JVhn1g6JzrEcto= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732781AbgI2MrL (ORCPT ); Tue, 29 Sep 2020 08:47:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:43162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728818AbgI2LGM (ORCPT ); Tue, 29 Sep 2020 07:06:12 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B4B8321D46; Tue, 29 Sep 2020 11:06:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601377571; bh=9rCrCU/IlF42dXf6kWQ22ZRUzkR1Au7ZM8NK732koDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vLN47IcCv+02TtMy39Ki5OQQeSkY6tqmy55VgoWoO3itK7B3l2D+TswXT8Cdkc7Ju glO3f4W0ko11rHnkiSlyZgBpidgodNt5eVwTlc+kXEWbX1OmAjRxqf77TOmRfQMuaN YfEZWCAEBmIiYbvriksi5NAnDqTKA/dzBzDjQHE0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiri Slaby , Thomas Winischhofer , linux-usb@vger.kernel.org, Jean-Christophe Plagniol-Villard , Tomi Valkeinen , "James E.J. Bottomley" , Helge Deller , linux-fbdev@vger.kernel.org, linux-parisc@vger.kernel.org, Ajay Kaher Subject: [PATCH 4.4 80/85] tty: vt, consw->con_scrolldelta cleanup Date: Tue, 29 Sep 2020 13:00:47 +0200 Message-Id: <20200929105932.191358795@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929105928.198942536@linuxfoundation.org> References: <20200929105928.198942536@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Jiri Slaby commit 97293de977365fe672daec2523e66ef457104921 upstream. * allow NULL consw->con_scrolldelta (some consoles define an empty hook) * => remove empty hooks now * return value of consw->con_scrolldelta is never checked => make the function void * document consw->con_scrolldelta a bit Signed-off-by: Jiri Slaby Cc: Thomas Winischhofer Cc: linux-usb@vger.kernel.org Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: Ajay Kaher [ for 4.4.y backport, only do the first change above, to prevent .con_scrolldelta from being called if not present - gregkh] Signed-off-by: Greg Kroah-Hartman --- drivers/tty/vt/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -2484,7 +2484,7 @@ static void console_callback(struct work if (scrollback_delta) { struct vc_data *vc = vc_cons[fg_console].d; clear_selection(); - if (vc->vc_mode == KD_TEXT) + if (vc->vc_mode == KD_TEXT && vc->vc_sw->con_scrolldelta) vc->vc_sw->con_scrolldelta(vc, scrollback_delta); scrollback_delta = 0; }