Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp484781imn; Wed, 27 Jul 2022 11:30:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1srut0oLsTlQoUCguF+JglMZNkTyJQVqFqXTc6Uu4c833neM85AiUviyMMpePt3bwr/yWtm X-Received: by 2002:a17:90a:f481:b0:1f2:43c:a61 with SMTP id bx1-20020a17090af48100b001f2043c0a61mr6221230pjb.134.1658946615462; Wed, 27 Jul 2022 11:30:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658946615; cv=none; d=google.com; s=arc-20160816; b=RolJmACIrD6EndKhyUMnSqiIJdRGTTUdTKneL5bGD7xEmNUlZ2BJZuywGNHX28IZCE EabliFzNBW0YRKGH0DiOglB7n8BFTfHVcLpmXF6Dvqq+dgctbnJhHXyhFplbUVAWUBik 1wTJL1bVeIABvT5EdBW6iyL1DYyXRntl9StOtTfv1/6NyvqKzzo+cTsbpS3OJG5KuH8V qgWgsj6hWgjcJvh+bla2hhQSfFbNxCtzqrlbMtpWEsJnONG6EAE89Q9185N6TvN265tq l+a10rbL2mSemVRBWkSJzwLPSTqpz4jONf998ONxeybtakrP7TnkhyLZ73gxdu8DP2aY uQkg== 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=YWTPI9QQhh8konOt7h8b5ety39QxPAvHK1+0hyC4TEA=; b=eaq1nC2KmWjA8YUQ+fCpvb4BnroXP14GgkmaEVJIbDgFe5EO+PxMmirpx/y6VzTMjc mCyVUWtkyoV+i0DwEQNIsffXg31brCiSJt3vVxPzTYilpWlwXX7wy5HXNnyI0SDdiSOQ XJ/03/86brbDsywnIGMT09P1WeFXFApG8lE0B79v7mYBW1BQvud2PpokHcopjgDGsyjQ U3NuZlZC8K3K+6lcjFSj2nSAw6SEMy/LMmF9EK1PsITsNcO4noNPwK46OMtkXag5qNuG 75KM9fY2hQmjOzyBu5vgsX/pDmKZXx+2k29wA95bqW4/AdPZqgJtI0tVXW1k46/uMfFP w7Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FOZyWa7i; 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 t73-20020a63784c000000b0040d9515987asi21316084pgc.62.2022.07.27.11.29.59; Wed, 27 Jul 2022 11:30:15 -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=FOZyWa7i; 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 S236003AbiG0QrD (ORCPT + 99 others); Wed, 27 Jul 2022 12:47:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240438AbiG0QqU (ORCPT ); Wed, 27 Jul 2022 12:46:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C1B760513; Wed, 27 Jul 2022 09:31:38 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 34AA461A3F; Wed, 27 Jul 2022 16:31:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15C3AC43140; Wed, 27 Jul 2022 16:31:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658939497; bh=/GMk23CtWzGG8cLYQdV4sSVjdwm9g382gacanHf4Ph0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FOZyWa7iRAdI+bcw19nIu5rPaY3xYiKaG8RGcLyn/jvc5+v5L8N2N7s+cMsmrt1gu F/ERCjHFAjdg2s9l5kwUlm+oJSu/3OeDbQ//GwbxtdLcGWj5b/Qnwl4l0OyPuAmb9N M4F49CckwaZZRALFuiqsf8iITJyigv6J49EgoWTk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold , Jiri Slaby Subject: [PATCH 5.4 83/87] tty: drop tty_schedule_flip() Date: Wed, 27 Jul 2022 18:11:16 +0200 Message-Id: <20220727161012.425940164@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220727161008.993711844@linuxfoundation.org> References: <20220727161008.993711844@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 @@ -395,27 +395,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 @@ -557,7 +536,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,