Message ID | 20250111063318.911062-1-rdunlap@infradead.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | ipe: policy_fs: fix kernel-doc warnings | expand |
Thanks. This looks good to me. I will pull this into the ipe tree. -Fan -Fan On Fri, Jan 10, 2025 at 10:33 PM Randy Dunlap <rdunlap@infradead.org> wrote: > > Use the "struct" keyword in kernel-doc when describing struct > ipefs_file. Add kernel-doc for the struct members also. > > Don't use kernel-doc notation for 'policy_subdir'. kernel-doc does > not support documentation comments for data definitions. > > This eliminates multiple kernel-doc warnings: > > security/ipe/policy_fs.c:21: warning: cannot understand function prototype: 'struct ipefs_file ' > security/ipe/policy_fs.c:407: warning: cannot understand function prototype: 'const struct ipefs_file policy_subdir[] = ' > > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Cc: Fan Wu <wufan@kernel.org> > Cc: Paul Moore <paul@paul-moore.com> > Cc: James Morris <jmorris@namei.org> > Cc: "Serge E. Hallyn" <serge@hallyn.com> > Cc: linux-security-module@vger.kernel.org > --- > security/ipe/policy_fs.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > --- linux-next-20250108.orig/security/ipe/policy_fs.c > +++ linux-next-20250108/security/ipe/policy_fs.c > @@ -16,7 +16,11 @@ > #define MAX_VERSION_SIZE ARRAY_SIZE("65535.65535.65535") > > /** > - * ipefs_file - defines a file in securityfs. > + * struct ipefs_file - defines a file in securityfs. > + * > + * @name: file name inside the policy subdirectory > + * @access: file permissions > + * @fops: &file_operations specific to this file > */ > struct ipefs_file { > const char *name; > @@ -401,7 +405,7 @@ static const struct file_operations dele > .write = delete_policy, > }; > > -/** > +/* > * policy_subdir - files under a policy subdirectory > */ > static const struct ipefs_file policy_subdir[] = {
--- linux-next-20250108.orig/security/ipe/policy_fs.c +++ linux-next-20250108/security/ipe/policy_fs.c @@ -16,7 +16,11 @@ #define MAX_VERSION_SIZE ARRAY_SIZE("65535.65535.65535") /** - * ipefs_file - defines a file in securityfs. + * struct ipefs_file - defines a file in securityfs. + * + * @name: file name inside the policy subdirectory + * @access: file permissions + * @fops: &file_operations specific to this file */ struct ipefs_file { const char *name; @@ -401,7 +405,7 @@ static const struct file_operations dele .write = delete_policy, }; -/** +/* * policy_subdir - files under a policy subdirectory */ static const struct ipefs_file policy_subdir[] = {
Use the "struct" keyword in kernel-doc when describing struct ipefs_file. Add kernel-doc for the struct members also. Don't use kernel-doc notation for 'policy_subdir'. kernel-doc does not support documentation comments for data definitions. This eliminates multiple kernel-doc warnings: security/ipe/policy_fs.c:21: warning: cannot understand function prototype: 'struct ipefs_file ' security/ipe/policy_fs.c:407: warning: cannot understand function prototype: 'const struct ipefs_file policy_subdir[] = ' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Fan Wu <wufan@kernel.org> Cc: Paul Moore <paul@paul-moore.com> Cc: James Morris <jmorris@namei.org> Cc: "Serge E. Hallyn" <serge@hallyn.com> Cc: linux-security-module@vger.kernel.org --- security/ipe/policy_fs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)