Skip to content

Commit fe3c03b

Browse files
rddunlappcmoore
authored andcommitted
cred: fix kernel-doc warnings in cred.h
Use the correct function parameter names, function names, or kernel-doc format, and add function return comment sections to avoid kernel-doc warnings: Warning: include/linux/cred.h:43 function parameter 'gi' not described in 'get_group_info' Warning: include/linux/cred.h:43 No description found for return value of 'get_group_info' Warning: include/linux/cred.h:213 No description found for return value of 'get_cred_many' Warning: include/linux/cred.h:260 function parameter '_cred' not described in 'put_cred_many' Warning: include/linux/cred.h:260 expecting prototype for put_cred(). Prototype was for put_cred_many() instead Signed-off-by: Randy Dunlap <rdunlap@infradead.org> [PM: subject tweak] Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent 6de23f8 commit fe3c03b

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

include/linux/cred.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ struct group_info {
3333

3434
/**
3535
* get_group_info - Get a reference to a group info structure
36-
* @group_info: The group info to reference
36+
* @gi: The group info to reference
3737
*
3838
* This gets a reference to a set of supplementary groups.
3939
*
4040
* If the caller is accessing a task's credentials, they must hold the RCU read
4141
* lock when reading.
42+
*
43+
* Returns: @gi
4244
*/
4345
static inline struct group_info *get_group_info(struct group_info *gi)
4446
{
@@ -209,6 +211,8 @@ DEFINE_CLASS(override_creds,
209211
* usage count. The purpose of this is to attempt to catch at compile time the
210212
* accidental alteration of a set of credentials that should be considered
211213
* immutable.
214+
*
215+
* Returns: @cred when the references are acquired, NULL otherwise.
212216
*/
213217
static inline const struct cred *get_cred_many(const struct cred *cred, int nr)
214218
{
@@ -246,8 +250,8 @@ static inline const struct cred *get_cred_rcu(const struct cred *cred)
246250
}
247251

248252
/**
249-
* put_cred - Release a reference to a set of credentials
250-
* @cred: The credentials to release
253+
* put_cred_many - Release a reference to a set of credentials
254+
* @_cred: The credentials to release
251255
* @nr: Number of references to release
252256
*
253257
* Release a reference to a set of credentials, deleting them when the last ref

0 commit comments

Comments
 (0)