Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1138901pxf; Fri, 9 Apr 2021 00:33:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytNnIDJQ3Knar6AFAz6ljP9lC+kPTTBnbj+bR3S/E6PTbIqnv91SgfpXarsNwT36ppejLj X-Received: by 2002:a17:902:ed15:b029:e8:fe5f:a28f with SMTP id b21-20020a170902ed15b02900e8fe5fa28fmr11550917pld.76.1617953624395; Fri, 09 Apr 2021 00:33:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617953624; cv=none; d=google.com; s=arc-20160816; b=ikRYrvJB2SsfD7V+iutfRswIU1zVAJncyGGW1OPoRFSm85GcZfj7LBl1tZNxDn68D3 ueT4fswlPjtWMVridkWzpiHOb5wZJbrP3/GJnt5Fg2ooTj+JYtrC/TEimnDd92FnRyNR pTYxZwVnq2CCm5V0mLy7ZFIYn/WN8hi84hWUzAfRycvXY/dvbuOrQ0Nwdtf00ejiIqBY FJa7AcziZt0dw+UH3HXOWirF7vr2TlUGdqqesm2LX06X4LUjO9Gtftk+erzyPThnUay4 dPcl66JdMGJT1B6VH65hLDgkAC8ZjM69nF7eGvBiV9Lqd+SVQgpaeKh+11Sm3bB6g0ye nfRw== 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; bh=WgOMR1BAGZCccVYgEV7l8KHv/+kn9+x2p7g8WDz2jyE=; b=zOiIKstddcOmyYPn2fRZkOMoEKq/C//jlDYMvymLtA7DJiPTcjVCugSvvUq5mz1aJB /ZLfC31Y3MRbjK5E4TLGnrH/KrEEHA7rAQTGnZcuf+LtvaBtAyR+WugL/QG6VRtM7sa3 18OcxuNylcMod/eFLFmLR6FRfW1khoe9TSiVwZSiLCuQbJoIAMuCAwMKU7d4FbWijlva zQy9OS1+k6VLR7rziYGC+OLcM9Vfj/Yif3vk1j2JwhiTqFeKuKIMQYrZv6Se5SmNIcYZ dYS2jCnTgNkzEu7RDaNJw82hlxvem8nPrJWL65n6bk1wkFHbwuD84ps3x8hdZgEhKbBc pcrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OeYiuupH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y67si2134514pgy.484.2021.04.09.00.33.32; Fri, 09 Apr 2021 00:33:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OeYiuupH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231280AbhDIHdE (ORCPT + 99 others); Fri, 9 Apr 2021 03:33:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:53646 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbhDIHdC (ORCPT ); Fri, 9 Apr 2021 03:33:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 03AAC61107; Fri, 9 Apr 2021 07:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617953570; bh=GvVTq5brV34CvZ6GSWYRQLHzYPaMescflxgpD8SKrVU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OeYiuupHNuq5FcoR00Dq9Y+lOR/ELIVOIGwNuZddaiEvaiD+m4sD08Swc3VxpOR8u +Gb3BQsS36xnUbLR6kBSztHsOWzO7cvh8VdklSSy9S6vhTj83Pr+y1ELsfAKOcYIp6 Spanzz9aM5TOriPDBoTnr4QMG0MjFIhKClQq+TKMH4oup7BGVWcbKlwkle83La0JN5 IzwrVUSWIxCXVRi2dnSB5XZh9c0HcmspTM7Y9N6NWGwNiam26WKc56EWnlSnmiwtoA Vic6kxC2MsmvxCKPPJoc04o2GqUn3eNIio0ENuUPuSXKGm/FvF9K4G0CKGKuRbF/bX WQTipzx6VQsZQ== Received: from johan by xi.lan with local (Exim 4.93.0.4) (envelope-from ) id 1lUldF-0001lw-Gx; Fri, 09 Apr 2021 09:32:45 +0200 Date: Fri, 9 Apr 2021 09:32:45 +0200 From: Johan Hovold To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Tetsuo Handa , Jiri Slaby Subject: Re: [PATCH 00/13] tty.h cleanups Message-ID: References: <20210408125134.3016837-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 08, 2021 at 08:01:08PM +0200, Greg Kroah-Hartman wrote: > On Thu, Apr 08, 2021 at 04:25:22PM +0200, Johan Hovold wrote: > > On Thu, Apr 08, 2021 at 02:51:21PM +0200, Greg Kroah-Hartman wrote: > > > Turns out there is a lot of tty-internal stuff in include/linux/tty.h > > > that do not belong there. Create a internal-to-the-tty-layer .h file > > > for these types of things and move function prototypes to it instead of > > > being in the system-wide header file. > > > > > > Along the way clean up the use of some old tty-only debugging macros and > > > use the in-kernel dev_*() calls instead. > > > > I'm afraid that's not a good idea since not all ttys have a > > corresponding class device. Notable exception include pseudo terminals > > and serdev. > > > > While dev_printk() can handle a NULL device argument without crashing, > > we'll actually lose log information by removing the tty printk helpers. > > I think the same info will be printed here as before, just some NULL > information at the beginning, right? And the benifits overall (for real > tty devices), should outweigh the few devices that do not have this > information. No, you'll only be losing information (tty driver and tty name). Here's a pty example, where the first line in each pair use dev_info() and the second tty_info(): [ 10.235331] (NULL device *): tty_get_device [ 10.235441] ptm ptm0: tty_get_device [ 10.235586] (NULL device *): tty_get_device [ 10.235674] pts pts0: tty_get_device and similar for serdev, which is becoming more and more common. Johan