diff mbox series

[RFC,linux-next] mm/secretmem: secretmem_iops can be static

Message ID YkXc0RjJYQoGZZ8A@57de4820519d (mailing list archive)
State New
Headers show
Series [RFC,linux-next] mm/secretmem: secretmem_iops can be static | expand

Commit Message

kernel test robot March 31, 2022, 4:54 p.m. UTC
mm/secretmem.c:173:31: warning: symbol 'secretmem_iops' was not declared. Should it be static?

Fixes: 24209f2f4d62 ("mm/secretmem: fix panic when growing a memfd_secret")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
 mm/secretmem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Axel Rasmussen March 31, 2022, 5:40 p.m. UTC | #1
Thanks kernel test robot, it should indeed be static. I'll send a v2
with this fix.

On Thu, Mar 31, 2022 at 9:55 AM kernel test robot <lkp@intel.com> wrote:
>
> mm/secretmem.c:173:31: warning: symbol 'secretmem_iops' was not declared. Should it be static?
>
> Fixes: 24209f2f4d62 ("mm/secretmem: fix panic when growing a memfd_secret")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> ---
>  mm/secretmem.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/secretmem.c b/mm/secretmem.c
> index a83e98aa3a7b3..ddf45c0435be7 100644
> --- a/mm/secretmem.c
> +++ b/mm/secretmem.c
> @@ -170,7 +170,7 @@ static int secretmem_setattr(struct user_namespace *mnt_userns,
>         return simple_setattr(mnt_userns, dentry, iattr);
>  }
>
> -const struct inode_operations secretmem_iops = {
> +static const struct inode_operations secretmem_iops = {
>         .setattr = secretmem_setattr,
>  };
>
diff mbox series

Patch

diff --git a/mm/secretmem.c b/mm/secretmem.c
index a83e98aa3a7b3..ddf45c0435be7 100644
--- a/mm/secretmem.c
+++ b/mm/secretmem.c
@@ -170,7 +170,7 @@  static int secretmem_setattr(struct user_namespace *mnt_userns,
 	return simple_setattr(mnt_userns, dentry, iattr);
 }
 
-const struct inode_operations secretmem_iops = {
+static const struct inode_operations secretmem_iops = {
 	.setattr = secretmem_setattr,
 };