linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-serial <linux-serial@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 09/15] tty: fix kernel-doc for functions in tty.h
Date: Tue, 19 Sep 2023 13:51:32 +0300 (EEST)	[thread overview]
Message-ID: <576ae74-19dc-84b5-7e8c-563c9561be5d@linux.intel.com> (raw)
In-Reply-To: <6d06e531-6c69-47ca-9832-fac21ce6964c@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2550 bytes --]

On Tue, 19 Sep 2023, Jiri Slaby wrote:

> On 19. 09. 23, 12:45, Jiri Slaby wrote:
> > On 19. 09. 23, 12:07, Ilpo Järvinen wrote:
> > > On Tue, 19 Sep 2023, Jiri Slaby (SUSE) wrote:
> > > 
> > > > tty_kref_get() is already included in Documentation, but is not properly
> > > > formatted. Fix this.
> > > > 
> > > > tty_get_baud_rate() is neither properly formatted, nor is included. Fix
> > > > both.
> > > > 
> > > > Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> > > > ---
> > > >   Documentation/driver-api/tty/tty_ioctl.rst |  3 +++
> > > >   include/linux/tty.h                        | 21 +++++++++------------
> > > >   2 files changed, 12 insertions(+), 12 deletions(-)
> > > > 
> > > > diff --git a/Documentation/driver-api/tty/tty_ioctl.rst
> > > > b/Documentation/driver-api/tty/tty_ioctl.rst
> > > > index 9b0be79fc15e..3ff1ac5e07f1 100644
> > > > --- a/Documentation/driver-api/tty/tty_ioctl.rst
> > > > +++ b/Documentation/driver-api/tty/tty_ioctl.rst
> > > > @@ -5,3 +5,6 @@ TTY IOCTL Helpers
> > > >   =================
> > > >   .. kernel-doc:: drivers/tty/tty_ioctl.c
> > > > +
> > > > +.. kernel-doc:: include/linux/tty.h
> > > > +   :identifiers: tty_get_baud_rate
> > > > diff --git a/include/linux/tty.h b/include/linux/tty.h
> > > > index 59d675f345e9..4b6340ac2af2 100644
> > > > --- a/include/linux/tty.h
> > > > +++ b/include/linux/tty.h
> > > > @@ -390,14 +390,12 @@ int vcs_init(void);
> > > >   extern const struct class tty_class;
> > > >   /**
> > > > - *    tty_kref_get        -    get a tty reference
> > > > - *    @tty: tty device
> > > > + * tty_kref_get - get a tty reference
> > > > + * @tty: tty device
> > > >    *
> > > > - *    Return 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. The caller must hold
> > > > sufficient
> > > > + * locks/counts to ensure that their existing reference cannot go away
> > > 
> > > Shouldn't this have also Locking: entry instead of hiding the details into
> > > Return?
> > 
> > /me left to fix both in a separate patch.
> 
> Ah, no. The Locking Alan introduced means what _this_ function locks. I am not
> sure we want to extend the meaning to _expected_ locks?

There are plenty of examples with "Must be called with" or "Caller holds"
in Locking. This is for humans anyway so one reading should understand it.


-- 
 i.

  reply	other threads:[~2023-09-19 10:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19  8:51 [PATCH 00/15] random tty fixes Jiri Slaby (SUSE)
2023-09-19  8:51 ` [PATCH 01/15] tty: n_tty: use 'retval' instead of 'c' Jiri Slaby (SUSE)
2023-09-19  8:51 ` [PATCH 02/15] tty: n_tty: rename and retype 'retval' in n_tty_ioctl() Jiri Slaby (SUSE)
2023-09-19  8:51 ` [PATCH 03/15] tty: n_tty: use min3() in copy_from_read_buf() Jiri Slaby (SUSE)
2023-09-19  8:51 ` [PATCH 04/15] tty: n_tty: invert the condition " Jiri Slaby (SUSE)
2023-09-19  9:54   ` Ilpo Järvinen
2023-09-19 10:43     ` Jiri Slaby
2023-09-19  8:51 ` [PATCH 05/15] tty: n_tty: use do-while in n_tty_check_{,un}throttle() Jiri Slaby (SUSE)
2023-09-19  8:51 ` [PATCH 06/15] tty: switch tty_{,un}throttle_safe() to return a bool Jiri Slaby (SUSE)
2023-09-19  8:51 ` [PATCH 07/15] tty: invert return values of tty_{,un}throttle_safe() Jiri Slaby (SUSE)
2023-09-19  8:51 ` [PATCH 08/15] tty: fix up and plug in tty_ioctl kernel-doc Jiri Slaby (SUSE)
2023-09-19  8:51 ` [PATCH 09/15] tty: fix kernel-doc for functions in tty.h Jiri Slaby (SUSE)
2023-09-19 10:07   ` Ilpo Järvinen
2023-09-19 10:45     ` Jiri Slaby
2023-09-19 10:47       ` Jiri Slaby
2023-09-19 10:51         ` Ilpo Järvinen [this message]
2023-09-19  8:51 ` [PATCH 10/15] tty: stop using ndash in kernel-doc Jiri Slaby (SUSE)
2023-09-19  8:51 ` [PATCH 11/15] tty: tty_buffer: use bool for 'restart' in tty_buffer_unlock_exclusive() Jiri Slaby (SUSE)
2023-09-19  8:51 ` [PATCH 12/15] tty: convert THROTTLE constants into enum Jiri Slaby (SUSE)
2023-09-19 10:10   ` Ilpo Järvinen
2023-09-19 10:51     ` Jiri Slaby
2023-09-19  8:51 ` [PATCH 13/15] tty: early return from send_break() on TTY_DRIVER_HARDWARE_BREAK Jiri Slaby (SUSE)
2023-09-19  8:51 ` [PATCH 14/15] tty: don't check for signal_pending() in send_break() Jiri Slaby (SUSE)
2023-09-19 10:14   ` Ilpo Järvinen
2023-09-19  8:51 ` [PATCH 15/15] tty: use 'if' in send_break() instead of 'goto' Jiri Slaby (SUSE)
2023-09-19 10:17 ` [PATCH 00/15] random tty fixes Ilpo Järvinen
2023-09-19 10:21   ` Greg Kroah-Hartman
2023-09-19 10:53     ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=576ae74-19dc-84b5-7e8c-563c9561be5d@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).