Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp262235rdf; Tue, 21 Nov 2023 01:49:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFzEztpUVdGYDEyjTF782RKBJ39eIPNX5/cLIKZO1R5kwt3GDmHs9xz/NtDVSmhGgQRnrrD X-Received: by 2002:a17:90b:4b02:b0:283:22f0:33a6 with SMTP id lx2-20020a17090b4b0200b0028322f033a6mr10413840pjb.42.1700560144443; Tue, 21 Nov 2023 01:49:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700560144; cv=none; d=google.com; s=arc-20160816; b=EdeIqLocB0esm2elCb3zPRjBGrCMrNLWBCmalgqCga65guAHRG61njBOTQRYtScUsj gQ4L3JPQeG/43qjav7jsSTYJO9ApOXo9JRjHD4MuUXhfu0N3h9nFwtpSHrgntOVXwNW6 V9hP/eAx/i110L0RH0/irRfcdTawHLG57jchKCc6DGbBp1b83zymLRCaPwSqO6lUfzE7 L3dOM4VATrqBAWeh7mPSaePTVnADJrkrbA3hnM1N53vL9deq7ozL2MeBjgVOH08136Qg NvxrxIamDbnuzNPnEWXXca5QFXXMMuJTP+CgW3iqqlgf0lVB0f00FYWU0dGhdnSO3ZDK MFZQ== 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=4n1w3T4IIGAYU4Gh84FkyvckROwZyPZmL656zncIM/E=; fh=PxjcL/ZdiHiVcm76ua20Djv7HwMfZdoMlXIc51BfpOg=; b=tPqKVIV4uCO23baXzDe/E1Jlrg5j9vZ35i4fQfybjM3rt1x7QFe3U84E8bhnox1MYC 59pL+VDQEvxdUzUliqpI/RRYvQj5DxzuQR8XLojQSqhprD7oTjzYdTYyLcgpV7PX+1Fz K0OwzajFEjxpSLXOwoSAcpk6appu2sXvAJ4FORhq/qIgCwSajbHeWby6KRSM5grr+tm6 1IhehqNz3OXFqe3F0eV6sC1wT2cVWy4VBuuaMGbdo0WU3sIy5tYcZvvX3FZ6bs9WxGdW Mdo1Yl6T44VemJnRgJIXTvFnq0/gzvEB7harfWzz1msBWdxNV3kylhyuoz3esYonJAlf UZHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z3Qqb8vX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id bt6-20020a17090af00600b0028525c8810esi3888237pjb.129.2023.11.21.01.49.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 01:49:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z3Qqb8vX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id A18A1809F38A; Tue, 21 Nov 2023 01:49:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233540AbjKUJsw (ORCPT + 99 others); Tue, 21 Nov 2023 04:48:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231876AbjKUJsv (ORCPT ); Tue, 21 Nov 2023 04:48:51 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E7CBCB; Tue, 21 Nov 2023 01:48:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700560128; x=1732096128; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=cH0R5P0WbTeznkzXyw0TAlPVaLM1ksbhnHCkyuwy1wo=; b=Z3Qqb8vXr3YC01HmV0Vse91yRNx6LaPHhEKsxD4S5btuOJ9TFFiEjILV JcUU3HtCfnqBlG18kf2nELzKALMBB1Ct/pX2V8DA3H37tcUB0EPH3W91o EtFlPagXNM8CoM/JPawYPPXkgGpIGo+tZan9WCv32WPG8SzMJ7InpKJdG KKekiVdh5vhCmEYk4IgJfqo7J0qZGMGaRmJdYusKX04RW7ZPcDEUmkfzr VREuki1iNepLVTd47cyjMVCEG4Zm4Zq7oq4Oc23W/ZjTxhbRHU97Np4vS WQ1t7JutVk2HysjbrwbWbxyqy/4gU6aJj0u5j69CzngW0Jf0LOx8bodYT Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="395731701" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="395731701" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2023 01:48:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="795741498" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="795741498" Received: from sbouradx-mobl.ger.corp.intel.com ([10.252.58.80]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2023 01:48:46 -0800 Date: Tue, 21 Nov 2023 11:48:44 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: "Jiri Slaby (SUSE)" 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: <20231121092258.9334-5-jirislaby@kernel.org> Message-ID: References: <20231121092258.9334-1-jirislaby@kernel.org> <20231121092258.9334-5-jirislaby@kernel.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-803243020-1700560127=:1688" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 01:49:02 -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-803243020-1700560127=:1688 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT 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 > @@ -393,8 +393,10 @@ extern const struct class tty_class; > * tty_kref_get - get a tty reference > * @tty: tty device > * > - * Returns: a new reference to a tty object. The caller must hold sufficient > - * locks/counts to ensure that their existing reference cannot go away > + * Returns: a new reference to a tty object > + * > + * Locking: The caller must hold sufficient locks/counts to ensure that their > + * existing reference cannot go away. Just noting this is a bit vaguely worded (but so is the original). > */ > static inline struct tty_struct *tty_kref_get(struct tty_struct *tty) > { > @@ -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. Other than that, Reviewed-by: Ilpo Järvinen -- i. --8323329-803243020-1700560127=:1688--