Skip to contentSkip to conversation

ksmbd: Fix buffer_check_err() kernel-doc comment

PATCH In review Yang Li 2 participants 5 messages Dec 21, 2021

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/4 ksmbd: Fix buffer_check_err() kernel-doc comment

Add the description of @rsp_org in buffer_check_err() kernel-doc comment to remove a warning found by running scripts/kernel-doc, which is caused by using 'make W=1'.
fs/ksmbd/smb2pdu.c:4028: warning: Function parameter or member 'rsp_org' not described in 'buffer_check_err'

Fixes cb4517201b8a ("ksmbd: remove smb2_buf_length in smb2_hdr")
---
 fs/ksmbd/smb2pdu.c | 1 +
 1 file changed, 1 insertion(+)
fs/ksmbd/smb2pdu.c +1 -0
index b8b3a4c28b74..ee2bcd02d0d7 100644
@@ -4018,6 +4018,7 @@ int smb2_query_dir(struct ksmbd_work *work)
  * buffer_check_err() - helper function to check buffer errors
  * @reqOutputBufferLength:	max buffer length expected in command response
  * @rsp:		query info response buffer contains output buffer length
+ * @rsp_org:    	base response buffer pointer in case of chained response
  * @infoclass_size:	query info class response buffer size
  *
  * Return:	0 on success, otherwise error
Signature · 1 line
2.20.1.7.g153144c
author
#1 lore raw

PATCH 2/4 ksmbd: Fix smb2_set_info_file() kernel-doc comment

Fix argument list that the kdoc format and script verified in smb2_set_info_file().

The warnings were found by running scripts/kernel-doc, which is caused by using 'make W=1'.
fs/ksmbd/smb2pdu.c:5862: warning: Function parameter or member 'req' not described in 'smb2_set_info_file'
fs/ksmbd/smb2pdu.c:5862: warning: Excess function parameter 'info_class' description in 'smb2_set_info_file'

Fixes 9496e268e3af ("ksmbd: add request buffer validation in smb2_set_info")
---
 fs/ksmbd/smb2pdu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ksmbd/smb2pdu.c +1 -1
index ee2bcd02d0d7..2d55a186b825 100644
@@ -5850,7 +5850,7 @@ static int set_file_mode_info(struct ksmbd_file *fp,
  * smb2_set_info_file() - handler for smb2 set info command
  * @work:	smb work containing set info command buffer
  * @fp:		ksmbd_file pointer
- * @info_class:	smb2 set info class
+ * @req:        request buffer validation
  * @share:	ksmbd_share_config pointer
  *
  * Return:	0 on success, otherwise error
Signature · 1 line
2.20.1.7.g153144c
maintainer
#2 lore raw

Re: [PATCH -next 2/4] ksmbd: Fix smb2_set_info_file() kernel-doc comment

2021-12-21 18:07 GMT+09:00, Yang Li <[email protected]>:

Quoted 23 lines

Fix argument list that the kdoc format and script verified in smb2_set_info_file().

The warnings were found by running scripts/kernel-doc, which is caused by using 'make W=1'.
fs/ksmbd/smb2pdu.c:5862: warning: Function parameter or member 'req' not described in 'smb2_set_info_file'
fs/ksmbd/smb2pdu.c:5862: warning: Excess function parameter 'info_class' description in 'smb2_set_info_file'

Fixes 9496e268e3af ("ksmbd: add request buffer validation in

smb2_set_info")

---
 fs/ksmbd/smb2pdu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ksmbd/smb2pdu.c +0 -0
index ee2bcd02d0d7..2d55a186b825 100644

fs/ksmbd/smb2pdu.c static int set_file_mode_info(struct ksmbd_file *fp, · line 5853

Quoted 5 lines
fs/ksmbd/smb2pdu.c +1 -1
@@ -5850,7 +5850,7 @@ static int set_file_mode_info(struct ksmbd_file *fp,
  * smb2_set_info_file() - handler for smb2 set info command
  * @work:	smb work containing set info command buffer
  * @fp:		ksmbd_file pointer
- * @info_class:	smb2 set info class
+ * @req:        request buffer validation

I will directly update it to "request buffer pointer".

About your 4 patches, Acked-by: Namjae Jeon <[email protected]>

Thanks!

Quoted 7 lines
fs/ksmbd/smb2pdu.c +0 -1
  * @share:	ksmbd_share_config pointer
  *
  * Return:	0 on success, otherwise error
--

2.20.1.7.g153144c

author
#3 lore raw

PATCH 3/4 ksmbd: Delete an invalid arguement description in smb2_populate_readdir_entry()

In reply to Yang Li

A warning is reported because an invalid arguement description, it is found by running scripts/kernel-doc, which is caused by using 'make W=1'. fs/ksmbd/smb2pdu.c:3406: warning: Excess function parameter 'user_ns' description in 'smb2_populate_readdir_entry'

Fixes 475d6f98804c ("ksmbd: fix translation in smb2_populate_readdir_entry()")
---
 fs/ksmbd/smb2pdu.c | 1 -
 1 file changed, 1 deletion(-)
fs/ksmbd/smb2pdu.c +0 -1
index 2d55a186b825..1bb413537239 100644
@@ -3392,7 +3392,6 @@ static int dentry_name(struct ksmbd_dir_info *d_info, int info_level)
  * @conn:	connection instance
  * @info_level:	smb information level
  * @d_info:	structure included variables for query dir
- * @user_ns:	user namespace
  * @ksmbd_kstat:	ksmbd wrapper of dirent stat information
  *
  * if directory has many entries, find first can't read it fully.
Signature · 1 line
2.20.1.7.g153144c
author
#4 lore raw

PATCH 4/4 ksmbd: Fix smb2_get_name() kernel-doc comment

In reply to Yang Li

Remove some warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. fs/ksmbd/smb2pdu.c:623: warning: Function parameter or member 'local_nls' not described in 'smb2_get_name' fs/ksmbd/smb2pdu.c:623: warning: Excess function parameter 'nls_table' description in 'smb2_get_name'

---
 fs/ksmbd/smb2pdu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ksmbd/smb2pdu.c +1 -1
index 1bb413537239..005668b75876 100644
@@ -613,7 +613,7 @@ static void destroy_previous_session(struct ksmbd_user *user, u64 id)
  * @share:	ksmbd_share_config pointer
  * @src:	source buffer
  * @maxlen:	maxlen of source string
- * @nls_table:	nls_table pointer
+ * @local_nls:	nls_table pointer
  *
  * Return:      matching converted filename on success, otherwise error ptr
  */
Signature · 1 line
2.20.1.7.g153144c