2009-10-11 01:03:40

by Stefan Richter

[permalink] [raw]
Subject: [PATCH] sysfs: mark a locally-only used function static

Signed-off-by: Stefan Richter <[email protected]>
---
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index e28cecf..e144351 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -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;

--
Stefan Richter
-=====-==--= =-=- -=-==
http://arcgraph.de/sr/


2009-10-11 04:44:41

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] sysfs: mark a locally-only used function static

On Sun, Oct 11, 2009 at 03:02:46AM +0200, Stefan Richter wrote:
> Signed-off-by: Stefan Richter <[email protected]>

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

scripts/get_maintainer.pl is your friend...

thanks,

greg k-h

2009-10-11 07:53:23

by Stefan Richter

[permalink] [raw]
Subject: Re: [PATCH] sysfs: mark a locally-only used function static

Greg KH wrote:
> On Sun, Oct 11, 2009 at 03:02:46AM +0200, Stefan Richter wrote:
>> Signed-off-by: Stefan Richter <[email protected]>
>
> 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.
--
Stefan Richter
-=====-==--= =-=- -=-==
http://arcgraph.de/sr/

2009-10-12 22:18:06

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] sysfs: mark a locally-only used function static

On Sun, Oct 11, 2009 at 09:52:20AM +0200, Stefan Richter wrote:
> Greg KH wrote:
> > On Sun, Oct 11, 2009 at 03:02:46AM +0200, Stefan Richter wrote:
> >> Signed-off-by: Stefan Richter <[email protected]>
> >
> > 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

2009-10-13 15:39:08

by David P. Quigley

[permalink] [raw]
Subject: Re: [PATCH] sysfs: mark a locally-only used function static

On Sun, 2009-10-11 at 03:02 +0200, Stefan Richter wrote:
> Signed-off-by: Stefan Richter <[email protected]>
> ---
> diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
> index e28cecf..e144351 100644
> --- a/fs/sysfs/inode.c
> +++ b/fs/sysfs/inode.c
> @@ -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;
>

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


2009-10-14 18:48:52

by Stefan Richter

[permalink] [raw]
Subject: [PATCH resend] sysfs: mark a locally-only used function static

Signed-off-by: Stefan Richter <[email protected]>
Acked-by: David P. Quigley <[email protected]>
---
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index e28cecf..e144351 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -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;

--
Stefan Richter
-=====-==--= =-=- -===-
http://arcgraph.de/sr/