[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201209093405.28482-1-zhang.yanjuna@h3c.com>
Date: Wed, 9 Dec 2020 17:34:05 +0800
From: Yanjun Zhang <zhang.yanjuna@....com>
To: <gregkh@...uxfoundation.org>, <jirislaby@...nel.org>,
<viro@...iv.linux.org.uk>, <torvalds@...ux-foundation.org>
CC: <linux-kernel@...r.kernel.org>,
Yanjun Zhang <zhang.yanjuna@....com>
Subject: [PATCH] devpts: update the function comments about pty driver
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@....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
Powered by blists - more mailing lists