diff mbox series

[net-next] sysfs: fix static inline declaration of sysfs_groups_change_owner()

Message ID 20200319144741.3864191-1-christian.brauner@ubuntu.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [net-next] sysfs: fix static inline declaration of sysfs_groups_change_owner() | expand

Commit Message

Christian Brauner March 19, 2020, 2:47 p.m. UTC
The CONFIG_SYSFS declaration of sysfs_group_change_owner() is different
from the !CONFIG_SYSFS version and thus causes build failurs when
!CONFIG_SYSFS is set.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 303a42769c4c ("sysfs: add sysfs_group{s}_change_owner()")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
---
 include/linux/sysfs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: 79e28519ac78dde6d38fe6ea22286af574f5c7db

Comments

Randy Dunlap March 19, 2020, 4:19 p.m. UTC | #1
On 3/19/20 7:47 AM, Christian Brauner wrote:
> The CONFIG_SYSFS declaration of sysfs_group_change_owner() is different
> from the !CONFIG_SYSFS version and thus causes build failurs when
> !CONFIG_SYSFS is set.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

> Fixes: 303a42769c4c ("sysfs: add sysfs_group{s}_change_owner()")
> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

Thanks.

> ---
>  include/linux/sysfs.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
> index 9e531ec76274..4beb51009b62 100644
> --- a/include/linux/sysfs.h
> +++ b/include/linux/sysfs.h
> @@ -562,8 +562,8 @@ static inline int sysfs_groups_change_owner(struct kobject *kobj,
>  }
>  
>  static inline int sysfs_group_change_owner(struct kobject *kobj,
> -			 const struct attribute_group **groups,
> -			 kuid_t kuid, kgid_t kgid)
> +					   const struct attribute_group *groups,
> +					   kuid_t kuid, kgid_t kgid)
>  {
>  	return 0;
>  }
> 
> base-commit: 79e28519ac78dde6d38fe6ea22286af574f5c7db
>
David Miller March 20, 2020, 4:17 a.m. UTC | #2
From: Christian Brauner <christian.brauner@ubuntu.com>
Date: Thu, 19 Mar 2020 15:47:41 +0100

> The CONFIG_SYSFS declaration of sysfs_group_change_owner() is different
> from the !CONFIG_SYSFS version and thus causes build failurs when
> !CONFIG_SYSFS is set.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Fixes: 303a42769c4c ("sysfs: add sysfs_group{s}_change_owner()")
> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

Applied, thank you.
diff mbox series

Patch

diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 9e531ec76274..4beb51009b62 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -562,8 +562,8 @@  static inline int sysfs_groups_change_owner(struct kobject *kobj,
 }
 
 static inline int sysfs_group_change_owner(struct kobject *kobj,
-			 const struct attribute_group **groups,
-			 kuid_t kuid, kgid_t kgid)
+					   const struct attribute_group *groups,
+					   kuid_t kuid, kgid_t kgid)
 {
 	return 0;
 }