Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp987993rdf; Wed, 22 Nov 2023 02:30:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFaYEw7K2TTp+IZI767YSu5BIYRD+cwfNNTlsdze7q0Rcjl/3nxOALI/VMLpnsXQZVXVREj X-Received: by 2002:a17:902:ce0a:b0:1cc:7d96:3fe7 with SMTP id k10-20020a170902ce0a00b001cc7d963fe7mr1998323plg.28.1700649016740; Wed, 22 Nov 2023 02:30:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700649016; cv=none; d=google.com; s=arc-20160816; b=CakgQVQ2l8I7UmovXVzlbTN9Yb6Wf5SAmQiSEq6TnG92/obi0KZGIXmwwU+Dhp9Uob wb5XSxWZ0WpmyRZNBHlnV51wZBHGzz2Z45K/rPp6qaHDPBiqDzo52RvYxMv58NkTfSXa rhSjwM2hv882I2einEnXBqK2ruu7Q/EHZjXm2CakQrTHD3/VCDrWa/FnEEBT+76I5ib1 KcNOhcfSK5IhTUlaubYqxTgDHQ0qwnMxaWjW/iK5rNe4+Q7fLxO2OyGgQ20eO+tU4+tb 7EzlhA7PLl0IFNZXauPD75kSSvoKGOGUohq0n9WhLvvnhT2P2Qm+nt0pBwM46E/RjoLP msBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=hehgB0ZgOI69UolRb6btBmzPqi256w6vO1yv/gSbSdU=; fh=fCGZTi0gz7Fhx8LG/CI2gRp4NpXGvpzzHQ9U99CtZJA=; b=wFJ4oYO2ENC2yHMN0sG5afSepd7o7oscodczaDGJqFTmsL3ki3h4cqofc2OgJmZ1Hl 355rlJO9YmpcxWja/Djy3olp3usnPqIqLC7oJswKKOU+NYEw1H9bDPyfsqSHpT/hf6d5 LWXOGfftqAzOak6Qr7hL9PMgzCm8qjXswmL2bHhMtd2C8EmUi19SDT+kPkngso4K9cn+ p0a6hgUN12p2xRNFOuyg4Kxc4VNIvsD2hFtdZX5MWlfLXdYmwetI4STL7eKL8IBF/LY9 /pnqkJaf6aMoq3droHF0cJ1p4g/NwYrv3qeIaq4sjMH4Vlz6uLIEMdoF3YGNSRgaabk6 LC6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lMk8bWN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d5-20020a170902cec500b001c752577582si12527976plg.359.2023.11.22.02.30.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 02:30:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lMk8bWN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B373081121E2; Wed, 22 Nov 2023 02:27:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235080AbjKVK13 (ORCPT + 99 others); Wed, 22 Nov 2023 05:27:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235192AbjKVK1O (ORCPT ); Wed, 22 Nov 2023 05:27:14 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D272171E; Wed, 22 Nov 2023 02:27:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700648824; x=1732184824; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=fn/U3ax+BTUOrMmFTZ8WOmfBf3T0PsrvpDNHpbWZ7Rw=; b=lMk8bWN5s1lbPF4frO2VbFhmFBlATBrVP8k/B80yD9L2L3SNjHIVANeO OS5BvahuR/jB797q8BdMIxq0/eYEV3OPZ1B8ihSYodUxRu0PYA/s+5gFb x+sYqakZb0DeigCgF748Id6gLkcsve2N89SgerIwEyoviUucLyyU1jY9N P9fBnNkH+Mm9zcrRmf23HnXz5x8gLE1sjVFJYa7TPTaCqkOsASTFaVjh0 polDHSCFc9oJlJc5PkaXyhzFKZwc4/tFHDnkBlfHyo6VczzwZU7V4y3+k 2jp+sNFCLEZlwyD8j11DG/OKL+9aBZU9ts1WQFZjzN0SGql8arO9hQlSk Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10901"; a="377057312" X-IronPort-AV: E=Sophos;i="6.04,218,1695711600"; d="scan'208";a="377057312" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 02:27:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10901"; a="910746321" X-IronPort-AV: E=Sophos;i="6.04,218,1695711600"; d="scan'208";a="910746321" Received: from johannes-ivm.ger.corp.intel.com ([10.249.47.139]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 02:27:01 -0800 Date: Wed, 22 Nov 2023 12:26:55 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Jiri Slaby cc: Greg Kroah-Hartman , linux-serial , LKML Subject: Re: [PATCH 04/17] tty: move locking docs out of Returns for functions in tty.h In-Reply-To: Message-ID: <46ef4b89-6a6b-ddb1-fec8-eb9749e9b0f3@linux.intel.com> References: <20231121092258.9334-1-jirislaby@kernel.org> <20231121092258.9334-5-jirislaby@kernel.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-719030075-1700648822=:1917" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 02:27:53 -0800 (PST) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-719030075-1700648822=:1917 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Wed, 22 Nov 2023, Jiri Slaby wrote: > On 22. 11. 23, 7:45, Jiri Slaby wrote: > > On 21. 11. 23, 10:48, Ilpo Järvinen wrote: > > > On Tue, 21 Nov 2023, Jiri Slaby (SUSE) wrote: > > > > > > > Both tty_kref_get() and tty_get_baud_rate() note about locking in their > > > > Return kernel-doc clause. Extract this info into a separate "Locking" > > > > paragraph -- the same as we do for other tty functions. > > > > > > > > Signed-off-by: Jiri Slaby (SUSE) > > > > Suggested-by: Ilpo Järvinen > > > > --- > > > >   include/linux/tty.h | 12 +++++++----- > > > >   1 file changed, 7 insertions(+), 5 deletions(-) > > > > > > > > diff --git a/include/linux/tty.h b/include/linux/tty.h > > > > index 4b6340ac2af2..7625fc98fef3 100644 > > > > --- a/include/linux/tty.h > > > > +++ b/include/linux/tty.h > > ... > > > > @@ -436,10 +438,10 @@ void tty_encode_baud_rate(struct tty_struct *tty, > > > > speed_t ibaud, > > > >    * tty_get_baud_rate - get tty bit rates > > > >    * @tty: tty to query > > > >    * > > > > - * Returns: the baud rate as an integer for this terminal. The termios > > > > lock > > > > - * must be held by the caller and the terminal bit flags may be > > > > updated. > > > > + * Returns: the baud rate as an integer for this terminal > > > >    * > > > > - * Locking: none > > > > + * Locking: The termios lock must be held by the caller and the > > > > terminal bit > > > > + * flags may be updated. > > > > > > I don't think the second part about the flags really belongs here, I'd > > > keep it the description. > > > > Any idea what does the part says in fact? I had not been thinking about the > > content and now I don't understand it. > > Maybe before: > commit 6865ff222ccab371c04afce17aec1f7d70b17dbc > Author: Jiri Slaby > Date: Thu Mar 7 13:12:27 2013 +0100 > > TTY: do not warn about setting speed via SPD_* > > > tty->warned was "the terminal bit". > > Let's drop that part. And we can make tty const there too. Good point. The commit you point to is probably unrelated though but thanks anyway because it gave me this idea which I think is the correct reference: I removed the ->c_cflag alteringin 87888fb9ac0c ("tty: Remove baudrate dead code & make ktermios params const"). It had become deadcode anyway long since (I never went through the arch headers to find how long ago). So yes, dropping the second part seems the correct way to go. -- i. --8323329-719030075-1700648822=:1917--