# \[RFC PATCH\] sysfs: \_\_sysfs\_add\_file\_to\_group() can be static

- From: kernel test robot \<hidden\>
- Date: 2021-12-20 20:17:39 
- List: linux-doc
- Page: https://ratatoskr.run/linux-doc/2021/12/8527324
- Thread: https://ratatoskr.run/linux-doc/2021/12/1613624/t.md

```text
fs/sysfs/file.c:379:5: warning: symbol '__sysfs_add_file_to_group' was not declared. Should it be static?

Reported-by: kernel test robot <redacted>
Signed-off-by: kernel test robot <redacted>
---
 file.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 30c798c38d89d..fe58c4fd4c60d 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -376,10 +376,10 @@ EXPORT_SYMBOL_GPL(sysfs_create_files);
  * @attr: attribute descriptor.
  * @group: group name.
  */
-int __sysfs_add_file_to_group(struct kobject *kobj,
-			      const struct attribute *attr,
-			      const struct bin_attribute *battr,
-			      const char *group)
+static int __sysfs_add_file_to_group(struct kobject *kobj,
+				     const struct attribute *attr,
+				     const struct bin_attribute *battr,
+				     const char *group)
 {
 	struct kernfs_node *parent;
 	kuid_t uid;
```
