Skip to contentSkip to conversation

sysfs: mark a locally-only used function static

PATCH Superseded Stefan Richter 3 participants 6 messages Oct 11, 2009 – Oct 14, 2009 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sysfs: mark a locally-only used function static

---

fs/sysfs/inode.c +2 -1
index e28cecf..e144351 100644
@@ -46,7 +46,7 @@ int __init sysfs_inode_init(void)
 	return bdi_init(&sysfs_backing_dev_info);
 }
 
-struct sysfs_inode_attrs *sysfs_init_inode_attrs(struct sysfs_dirent *sd)
+static struct sysfs_inode_attrs *sysfs_init_inode_attrs(struct sysfs_dirent *sd)
 {
 	struct sysfs_inode_attrs *attrs;
 	struct iattr *iattrs;
@@ -64,6 +64,7 @@ struct sysfs_inode_attrs *sysfs_init_inode_attrs(struct sysfs_dirent *sd)
 
 	return attrs;
 }
+
 int sysfs_setattr(struct dentry * dentry, struct iattr * iattr)
 {
 	struct inode * inode = dentry->d_inode;
Signature · 3 lines
Stefan Richter
-=====-==--= =-=- -=-==
http://arcgraph.de/sr/
#2 lore raw
Quoted 6 lines · Greg KH
Quoted 1 line · Stefan Richter

Odd you didn't cc: the sysfs maintainer on this patch. Any reason?

scripts/get_maintainer.pl is your friend...

Sheer laziness. I trusted that those who introduced this function would handle it for me.

Signature · 3 lines
Stefan Richter
-=====-==--= =-=- -=-==
http://arcgraph.de/sr/
#3 lore raw
Quoted 10 lines · Stefan Richter
Quoted 6 lines · Greg KH
Quoted 1 line · Stefan Richter

Odd you didn't cc: the sysfs maintainer on this patch. Any reason?

scripts/get_maintainer.pl is your friend...

Sheer laziness. I trusted that those who introduced this function would handle it for me.

Cool, I'll be lazy and not apply it as it was not addressed to me :)

greg k-h

#4 lore raw
In reply to Stefan Richter
Quoted 17 lines · Stefan Richter

---

fs/sysfs/inode.c +1 -1
index e28cecf..e144351 100644
@@ -46,7 +46,7 @@ int __init sysfs_inode_init(void)
 	return bdi_init(&sysfs_backing_dev_info);
 }
 
-struct sysfs_inode_attrs *sysfs_init_inode_attrs(struct sysfs_dirent *sd)
+static struct sysfs_inode_attrs *sysfs_init_inode_attrs(struct sysfs_dirent *sd)
 {
 	struct sysfs_inode_attrs *attrs;
 	struct iattr *iattrs;

fs/sysfs/inode.c struct sysfs_inode_attrs *sysfs_init_inode_attrs(struct sysfs_dirent *sd) · line 70

Quoted 7 lines
fs/sysfs/inode.c +1 -0
@@ -64,6 +64,7 @@ struct sysfs_inode_attrs *sysfs_init_inode_attrs(struct sysfs_dirent *sd)
 
 	return attrs;
 }
+
 int sysfs_setattr(struct dentry * dentry, struct iattr * iattr)
 {
 	struct inode * inode = dentry->d_inode;

I don't see why this shouldn't or can't be made static. I'll ACK it and then you guys can deal with it however you like.

-Dave

#5 lore raw

PATCH RESEND 1/1 sysfs: mark a locally-only used function static

---

fs/sysfs/inode.c +2 -1
index e28cecf..e144351 100644
@@ -46,7 +46,7 @@ int __init sysfs_inode_init(void)
 	return bdi_init(&sysfs_backing_dev_info);
 }
 
-struct sysfs_inode_attrs *sysfs_init_inode_attrs(struct sysfs_dirent *sd)
+static struct sysfs_inode_attrs *sysfs_init_inode_attrs(struct sysfs_dirent *sd)
 {
 	struct sysfs_inode_attrs *attrs;
 	struct iattr *iattrs;
@@ -64,6 +64,7 @@ struct sysfs_inode_attrs *sysfs_init_inode_attrs(struct sysfs_dirent *sd)
 
 	return attrs;
 }
+
 int sysfs_setattr(struct dentry * dentry, struct iattr * iattr)
 {
 	struct inode * inode = dentry->d_inode;
Signature · 3 lines
Stefan Richter
-=====-==--= =-=- -===-
http://arcgraph.de/sr/