Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp431549rdf; Tue, 21 Nov 2023 06:42:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IEMOpTP/59MB2TDZDD0MGpw+tYKBzIwHsMZu7eRN33BfgbnzelTSZ3q4TJZJ/fFu1/hesDq X-Received: by 2002:a05:6a00:2d21:b0:6c3:6148:570f with SMTP id fa33-20020a056a002d2100b006c36148570fmr12964678pfb.33.1700577721107; Tue, 21 Nov 2023 06:42:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700577721; cv=none; d=google.com; s=arc-20160816; b=svx1kSdViIcRPiG8yaoZlecNzYTnPEKz7Xc4IpJH0z024uLLZeAbl6iDnI9RWyuJhr CR5+fXjz+LxffIwNJhGPS4bDs+3Vz4b/fKYwnRxkTxlgEHZF2Z22Q41FmBnkX28Tw0Ck N7/lHvBVj1Y03P98kOSnLLe37uc8Z9euNVIFT4qeETI5xGsF1Fywf9L+EaoasNTx6FWi gVFfaW3S4P3Fctu6inz1aOsjbDrZND/6f5HnmNKZgMMeHQTuGg7YQs5uKo/c3Ym+4rVN 1YMLaztDSBWPidWqEFoTLIS4eVDQJgrStYRTUuNSFIXmUlbEmyF0h8YxjjhiES/Fdv7L g/zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=NSc7dP9JzioiJiPzKQCkXwUEPBhmaH4jbrYRamLVKsQ=; fh=4QRPAQB2QtI7AazXGuFQNE3OWdDYHlR+gMb6Vc0F/kY=; b=FEZDvXeyqWdMIos1NYUZGoPZIaHiEnXm0zjsScancxf77EZYm/6Bh3cQ2iKhZKBeGq FjHnfyQfjNnytAW51zN18PPJ4b2mmhgdcwTlzNoBLPB7kZEuMPXEHLM4p3ujvWCx9ZR/ jOJEhalfCKak4XipywKchksBqvgp3Jaftx+uK5JVF7HNyTWD5SuEuEnn07WwlWFHrACi UzLMdOcnrPLPMCK0n0C2p2zSXKyYMaB1sJvBK1165rkvVhI0XIBWhV+27UG2trk7De5W bsgbEW7oxgqf+lQ2EHPVSDwkuB4N1FE+w2IkUQwO4i7oK8v6GxVWe8e9maSz9SR67z4h AHmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=kJI22AIu; dkim=neutral (no key) header.i=@suse.cz header.b=yDveSRTO; 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 Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id h10-20020a63df4a000000b005b92b8e70f1si10317294pgj.27.2023.11.21.06.42.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 06:42:01 -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=@suse.cz header.s=susede2_rsa header.b=kJI22AIu; dkim=neutral (no key) header.i=@suse.cz header.b=yDveSRTO; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 47D99805114E; Tue, 21 Nov 2023 06:41:36 -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 S234295AbjKUOlZ (ORCPT + 99 others); Tue, 21 Nov 2023 09:41:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234359AbjKUOlX (ORCPT ); Tue, 21 Nov 2023 09:41:23 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CE28D69; Tue, 21 Nov 2023 06:41:19 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BB4461F8B8; Tue, 21 Nov 2023 14:41:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1700577677; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NSc7dP9JzioiJiPzKQCkXwUEPBhmaH4jbrYRamLVKsQ=; b=kJI22AIuRUb3nVsA+UJE6w2U9+rrfphlpRFyqA9z71oNPm7LVaJntV8vddvAtR2AHlmWj1 3zlWa5/ljsCcbJyqP6XJ9afEvEZpRbA+TrMfPsZ49E3KmkkJf62uSLARhUwRhS70mUwVqj UlFCWY6twxUQLILMfHpa4V1PO2JNj9A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1700577677; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NSc7dP9JzioiJiPzKQCkXwUEPBhmaH4jbrYRamLVKsQ=; b=yDveSRTOubmCcQmsntdchqyzuNwmHSc04CB6N/AqUXqbkxdWpKedjuaiLf5arcrx4RJjDv jobwcrw/OzS66dCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B1C39138E3; Tue, 21 Nov 2023 14:41:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id P8BXK43BXGXnWgAAMHmgww (envelope-from ); Tue, 21 Nov 2023 14:41:17 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id F2478A07D9; Tue, 21 Nov 2023 15:41:16 +0100 (CET) Date: Tue, 21 Nov 2023 15:41:16 +0100 From: Jan Kara To: "Jiri Slaby (SUSE)" Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara Subject: Re: [PATCH 01/17] tty: deprecate tty_write_message() Message-ID: <20231121144116.4kvwinm2vjevmqcy@quack3> References: <20231121092258.9334-1-jirislaby@kernel.org> <20231121092258.9334-2-jirislaby@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231121092258.9334-2-jirislaby@kernel.org> Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -5.01 X-Spamd-Result: default: False [-5.01 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.21)[71.76%] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 06:41:36 -0800 (PST) On Tue 21-11-23 10:22:42, Jiri Slaby (SUSE) wrote: > 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 Sure, that was indeed a hack. Feel free to add: Acked-by: Jan Kara Honza > --- > 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 > -- Jan Kara SUSE Labs, CR