mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yanjun Zhang <zhang.yanjuna@h3c.com>
To: <gregkh@linuxfoundation.org>, <jirislaby@kernel.org>,
	<viro@zeniv.linux.org.uk>, <torvalds@linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>, Yanjun Zhang <zhang.yanjuna@h3c.com>
Subject: [PATCH] devpts: update the function comments about pty driver
Date: Wed, 9 Dec 2020 17:34:05 +0800	[thread overview]
Message-ID: <20201209093405.28482-1-zhang.yanjuna@h3c.com> (raw)

Update the function comments to match the code modified by 
commit 8ead9dd54716 ("devpts: more pty driver interface cleanups")

Signed-off-by: Yanjun Zhang <zhang.yanjuna@h3c.com>
---
 drivers/tty/pty.c    |  2 ++
 drivers/tty/tty_io.c |  1 +
 fs/devpts/inode.c    | 15 +++++++--------
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 23368cec7..0facf8855 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -699,6 +699,7 @@ static long pty_unix98_compat_ioctl(struct tty_struct *tty,
 /**
  *	ptm_unix98_lookup	-	find a pty master
  *	@driver: ptm driver
+ *	@file: file pointer to tty
  *	@idx: tty index
  *
  *	Look up a pty master device. Called under the tty_mutex for now.
@@ -715,6 +716,7 @@ static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
 /**
  *	pts_unix98_lookup	-	find a pty slave
  *	@driver: pts driver
+ *	@file: file pointer to tty
  *	@idx: tty index
  *
  *	Look up a pty master device. Called under the tty_mutex for now.
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 56ade99ef..274186c86 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1145,6 +1145,7 @@ static ssize_t tty_line_name(struct tty_driver *driver, int index, char *p)
 /**
  *	tty_driver_lookup_tty() - find an existing tty, if any
  *	@driver: the driver for the tty
+ *	@file: file pointer to tty
  *	@idx:	 the minor number
  *
  *	Return the tty, if found. If not found, return NULL or ERR_PTR() if the
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 42e5a766d..2248f99d1 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -551,13 +551,12 @@ void devpts_kill_index(struct pts_fs_info *fsi, int idx)
 }
 
 /**
- * devpts_pty_new -- create a new inode in /dev/pts/
- * @ptmx_inode: inode of the master
- * @device: major+minor of the node to be created
+ * devpts_pty_new -- create a new dentry in /dev/pts/
+ * @fsi: devpts filesystem private info, sb->s_fs_info
  * @index: used as a name of the node
  * @priv: what's given back by devpts_get_priv
  *
- * The created inode is returned. Remove it from /dev/pts/ by devpts_pty_kill.
+ * The created dentry is returned. Remove it from /dev/pts/ by devpts_pty_kill.
  */
 struct dentry *devpts_pty_new(struct pts_fs_info *fsi, int index, void *priv)
 {
@@ -598,9 +597,9 @@ struct dentry *devpts_pty_new(struct pts_fs_info *fsi, int index, void *priv)
 
 /**
  * devpts_get_priv -- get private data for a slave
- * @pts_inode: inode of the slave
+ * @dentry: dentry of the slave
  *
- * Returns whatever was passed as priv in devpts_pty_new for a given inode.
+ * Returns whatever was passed as priv in devpts_pty_new for a given dentry.
  */
 void *devpts_get_priv(struct dentry *dentry)
 {
@@ -610,8 +609,8 @@ void *devpts_get_priv(struct dentry *dentry)
 }
 
 /**
- * devpts_pty_kill -- remove inode form /dev/pts/
- * @inode: inode of the slave to be removed
+ * devpts_pty_kill -- remove dentry form /dev/pts/
+ * @dentry: dentry of the slave to be removed
  *
  * This is an inverse operation of devpts_pty_new.
  */
-- 
2.17.1


             reply	other threads:[~2020-12-09 11:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  9:34 Yanjun Zhang [this message]
2020-12-10 15:27 ` Greg KH

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=20201209093405.28482-1-zhang.yanjuna@h3c.com \
    --to=zhang.yanjuna@h3c.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®