Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp251970rdf; Tue, 21 Nov 2023 01:23:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IF00VTbx6wiDtizBMEE6MAJb/kDB1Z+wqqYd5NFbFEexUAzmYb6Wh3IB5Ws3Ny7j7ArWTPN X-Received: by 2002:a17:903:1251:b0:1c5:d8a3:8789 with SMTP id u17-20020a170903125100b001c5d8a38789mr9563486plh.4.1700558618415; Tue, 21 Nov 2023 01:23:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700558618; cv=none; d=google.com; s=arc-20160816; b=C0hNfwXHi/w1cTDYt2d9sSKsm7CfBYZ5tY1o4oDb2YiOWWnY2tDntGLBBQ2cOcYUMF 7Owb0fc+w+XdbsbdHJgS450Ur3OB0zUXOv+HqFO9H40keNWO12bW4GRd4X1ummB+2cIk YdQqpZ6WyUbH7UjBUZnKsaKe/SBPLHdQqh13iDAvDTWF8ZIzODEme+2yCWQJck31kHBX U/UMVH7fjzgZABux0lOWu7vqgH7YImFsNQctNt5CsFwKPqZdoEScGNlEep2NxT5vjscH sjgtaLjWmnj51yiDg6/GfhNBn9hy4Rw3aYW4xRVIa30AQ6MpwF3E/g0pKTYitH8PXrqs ZdcA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IYBZvQINm/vWYcKYVX9nfvGzToHYmMl+JlQ3a0hrSVQ=; fh=OKDSw5KQfA+e+l9c9sJ4OM2IEJzRfwhO10kuMVmrYjA=; b=z216QHECTxWwUsYuS9c++yqoP8GfmGdfSfBM8D66O97MeiExzfX66tsoY27ZbMRwIw W+2dyyiLK//NTFGJBK1Xr3GoSuHNXHvKv8gyKYdZizR8qNnZzQyJHuuyi9l/vdAMIm7T r+X2XqDG+iwdul26Lft3tmJIR3r9s4i9kyqmwnrIfFTpv/WpDzUI+SC2EnfGHFGuaUU1 h8yxgH9tZYv/ZxD4lcDOh1ncY6ukChJNIGaBi8N4XTbj2xFkCUp3jvkpHvzgS9diahs2 sRbzia0+4X+crfCZHyK4BdakDOQdSdUufKkDtyF4EUagB4HVc2CkFtAo3kjsSxdPKGvl euaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YiCF7hYQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id ja13-20020a170902efcd00b001bdcd2e1706si9505346plb.196.2023.11.21.01.23.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 01:23:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YiCF7hYQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 0B4FA8035C4F; Tue, 21 Nov 2023 01:23:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232033AbjKUJXL (ORCPT + 99 others); Tue, 21 Nov 2023 04:23:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231982AbjKUJXJ (ORCPT ); Tue, 21 Nov 2023 04:23:09 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7A14C1 for ; Tue, 21 Nov 2023 01:23:05 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DB03C433CA; Tue, 21 Nov 2023 09:23:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700558585; bh=mTUBCg9Yy/6tTejWqtj99Kn79h3uid57bb+Gyj0JwX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YiCF7hYQDFJ7iZfFuIc0whqlPUrb5gJbYUxDcESqiskN1TNAL55wg+KmOhTb8VpUk /9zSCYWOyK7dKNuVCYzbuMKlBIpesIQ1wqDe0Ac5LaRPZZUNbP8ATRclwuvKseiO3h sr9wY7zH3J6s62Tng2++B0rSi8xfhhWQxw+IlCMxsng8k5fl9HEmc6mtCMODBipFUe d8uzTK8zPrYYH0nKfhzMQrMbMbBq58MxL0MhrbWEjvSxuVsJVFZgyoAgNlGeLPIdWO j/4tCayQOZttxL3FwOoKxfCGfZ456y4zkP0C77Sh+u4w3WFmJ0TdJdQZO7yp/0dyd4 b7ZbqzonWr9jA== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Jan Kara Subject: [PATCH 01/17] tty: deprecate tty_write_message() Date: Tue, 21 Nov 2023 10:22:42 +0100 Message-ID: <20231121092258.9334-2-jirislaby@kernel.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231121092258.9334-1-jirislaby@kernel.org> References: <20231121092258.9334-1-jirislaby@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 21 Nov 2023 01:23:33 -0800 (PST) tty_write_message() has only one user: quotas. In particular, there the use depends on CONFIG_PRINT_QUOTA_WARNING. And that is deprecated and marked as BROKEN already too. So make tty_write_message() dependent on that very config option. This action in fact drops tty_write_message() from the vmlinux binary. Good riddance. Signed-off-by: Jiri Slaby (SUSE) Cc: Jan Kara --- drivers/tty/tty_io.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 06414e43e0b5..ee5a90f9adb5 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1047,6 +1047,7 @@ static ssize_t iterate_tty_write(struct tty_ldisc *ld, struct tty_struct *tty, return ret; } +#ifdef CONFIG_PRINT_QUOTA_WARNING /** * tty_write_message - write a message to a certain tty, not just the console. * @tty: the destination tty_struct @@ -1057,6 +1058,8 @@ static ssize_t iterate_tty_write(struct tty_ldisc *ld, struct tty_struct *tty, * needed. * * We must still hold the BTM and test the CLOSING flag for the moment. + * + * This function is DEPRECATED, do not use in new code. */ void tty_write_message(struct tty_struct *tty, char *msg) { @@ -1069,6 +1072,7 @@ void tty_write_message(struct tty_struct *tty, char *msg) tty_write_unlock(tty); } } +#endif static ssize_t file_tty_write(struct file *file, struct kiocb *iocb, struct iov_iter *from) { -- 2.42.1