Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp478024imn; Wed, 27 Jul 2022 11:18:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1urtXHzneBdHY1+4A2x1PYCOkV1Ey2mvxgBfF8lbBqe3/OYZ6XcmypuSMiO45nnktmcYNAW X-Received: by 2002:a17:907:7290:b0:72b:3799:624c with SMTP id dt16-20020a170907729000b0072b3799624cmr18584627ejc.108.1658945927024; Wed, 27 Jul 2022 11:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658945927; cv=none; d=google.com; s=arc-20160816; b=P6o+13cXtYGLIoeDH0HM7K48CExFzsWCnBk9R+5ZekjkfRNZfZ/LnJPTtmazJOnVZF O1NLcdC0l+mABbVwy2maTInZzzJHO6fNpkbHBEaeSiJodT/PMJrU0ADP3O6MPCyyd879 IJotWlIdoxovykBfo3+Ti+x4VcOd41nITUi/1UZm8Mccf0Nh7yoIjCnHxuk873x1NoDs fbavBu452oWJs3vnih1cutRXog7fRrlXdISPpS7swnary6v4BwFA4PaMKsg3I3zvYt7D mOeVLvr8AtGxo6wUQXmbcqoImw1U2tJiTRPUzGDMwDS6EsI66Sbo3GDC0jdVJezsp4FX 29Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xCWucTWxMOuYphH1R4XLtMxSue4uYCihq+/c4Cf9inM=; b=zvm/flfnrk1ugEcu65nzHkHQutNFuh1enXIdPbM3W4gviLRXwj23qhd6oD68gGmP6W F21hafGyyhag3vws2/qqjNJX5h7fPbukL8+rjLyZhH48/E6oZw+Yyxs7BHSTLP4paryq vT4FvJVgWBOsnmEOunqZBMkwAF3Zu3nquIUqZJLE93E08ek4K1sYJXl7OZIVL9Pwv+Nv Jb1l80UmMY1zDkFRI3t9w0V/HHJDbhYNGUYfjqge8OhvcRmcjH6Edwh5voaCMnasXfRq an04pldqS0PFZe9V/5rEqlYG2Xd/IdXubgdgCud4khkux1Rr+fHbe9dopvW8V0SbLElf R/Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1j6vlNAu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f2-20020a1709062c4200b0072fb44407fdsi12591112ejh.962.2022.07.27.11.18.22; Wed, 27 Jul 2022 11:18:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1j6vlNAu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238528AbiG0Qgs (ORCPT + 99 others); Wed, 27 Jul 2022 12:36:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237771AbiG0QfG (ORCPT ); Wed, 27 Jul 2022 12:35:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A4804F667; Wed, 27 Jul 2022 09:27:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7126DB821C3; Wed, 27 Jul 2022 16:27:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D21BFC433C1; Wed, 27 Jul 2022 16:27:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658939255; bh=WmCeooSfx1oYC7pgLZp0XLUVDmyYNFktrIvPo2aqTME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1j6vlNAu4gu/XU+n7S4lIXLxXe/a0vR9jOlju/kVoLrhuzqWu/hR6uXtE1cOlDfvA Rpl7Gl9LYVgIK6S2AVec30/oPj0Zub4jM9tkfZ0UAX/aiuujm+SEHIo+9s0mlkLzvW SJeW18TwWhUT16ojtQ52+itTjnk/m5lz6BJsRUak= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold , Jiri Slaby Subject: [PATCH 4.19 55/62] tty: drop tty_schedule_flip() Date: Wed, 27 Jul 2022 18:11:04 +0200 Message-Id: <20220727161006.293132187@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220727161004.175638564@linuxfoundation.org> References: <20220727161004.175638564@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiri Slaby commit 5db96ef23bda6c2a61a51693c85b78b52d03f654 upstream. Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014, tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). All users were converted in the previous patches, so remove tty_schedule_flip() completely while inlining its body into tty_flip_buffer_push(). One less exported function. Reviewed-by: Johan Hovold Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20211122111648.30379-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- drivers/tty/tty_buffer.c | 30 ++++++++---------------------- include/linux/tty_flip.h | 1 - 2 files changed, 8 insertions(+), 23 deletions(-) --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -390,27 +390,6 @@ int __tty_insert_flip_char(struct tty_po EXPORT_SYMBOL(__tty_insert_flip_char); /** - * tty_schedule_flip - push characters to ldisc - * @port: tty port to push from - * - * Takes any pending buffers and transfers their ownership to the - * ldisc side of the queue. It then schedules those characters for - * processing by the line discipline. - */ - -void tty_schedule_flip(struct tty_port *port) -{ - struct tty_bufhead *buf = &port->buf; - - /* paired w/ acquire in flush_to_ldisc(); ensures - * flush_to_ldisc() sees buffer data. - */ - smp_store_release(&buf->tail->commit, buf->tail->used); - queue_work(system_unbound_wq, &buf->work); -} -EXPORT_SYMBOL(tty_schedule_flip); - -/** * tty_prepare_flip_string - make room for characters * @port: tty port * @chars: return pointer for character write area @@ -552,7 +531,14 @@ static void flush_to_ldisc(struct work_s void tty_flip_buffer_push(struct tty_port *port) { - tty_schedule_flip(port); + struct tty_bufhead *buf = &port->buf; + + /* + * Paired w/ acquire in flush_to_ldisc(); ensures flush_to_ldisc() sees + * buffer data. + */ + smp_store_release(&buf->tail->commit, buf->tail->used); + queue_work(system_unbound_wq, &buf->work); } EXPORT_SYMBOL(tty_flip_buffer_push); --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h @@ -12,7 +12,6 @@ extern int tty_insert_flip_string_fixed_ extern int tty_prepare_flip_string(struct tty_port *port, unsigned char **chars, size_t size); extern void tty_flip_buffer_push(struct tty_port *port); -void tty_schedule_flip(struct tty_port *port); int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag); static inline int tty_insert_flip_char(struct tty_port *port,