All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: hide unused procfs helpers
@ 2018-07-13  3:53 ` YueHaibing
  0 siblings, 0 replies; 6+ messages in thread
From: YueHaibing @ 2018-07-13  3:53 UTC (permalink / raw)
  To: jaegeuk, yuchao0; +Cc: linux-kernel, linux-f2fs-devel, YueHaibing

When CONFIG_PROC_FS isn't set, gcc warning this:

fs/f2fs/sysfs.c:519:12: warning: ‘segment_info_seq_show’ defined but not used [-Wunused-function]
 static int segment_info_seq_show(struct seq_file *seq, void *offset)
            ^
fs/f2fs/sysfs.c:546:12: warning: ‘segment_bits_seq_show’ defined but not used [-Wunused-function]
 static int segment_bits_seq_show(struct seq_file *seq, void *offset)
            ^
fs/f2fs/sysfs.c:570:12: warning: ‘iostat_info_seq_show’ defined but not used [-Wunused-function]
 static int iostat_info_seq_show(struct seq_file *seq, void *offset)

We can fix the warning by adding the same #ifdef around them.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/f2fs/sysfs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 2e7e611..7d45e65 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -516,6 +516,7 @@ static struct kobject f2fs_feat = {
 	.kset	= &f2fs_kset,
 };
 
+#ifdef CONFIG_PROC_FS
 static int segment_info_seq_show(struct seq_file *seq, void *offset)
 {
 	struct super_block *sb = seq->private;
@@ -608,6 +609,7 @@ static int iostat_info_seq_show(struct seq_file *seq, void *offset)
 
 	return 0;
 }
+#endif
 
 int __init f2fs_init_sysfs(void)
 {
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] f2fs: hide unused procfs helpers
@ 2018-07-13  3:53 ` YueHaibing
  0 siblings, 0 replies; 6+ messages in thread
From: YueHaibing @ 2018-07-13  3:53 UTC (permalink / raw)
  To: jaegeuk, yuchao0; +Cc: YueHaibing, linux-kernel, linux-f2fs-devel

When CONFIG_PROC_FS isn't set, gcc warning this:

fs/f2fs/sysfs.c:519:12: warning: ‘segment_info_seq_show’ defined but not used [-Wunused-function]
 static int segment_info_seq_show(struct seq_file *seq, void *offset)
            ^
fs/f2fs/sysfs.c:546:12: warning: ‘segment_bits_seq_show’ defined but not used [-Wunused-function]
 static int segment_bits_seq_show(struct seq_file *seq, void *offset)
            ^
fs/f2fs/sysfs.c:570:12: warning: ‘iostat_info_seq_show’ defined but not used [-Wunused-function]
 static int iostat_info_seq_show(struct seq_file *seq, void *offset)

We can fix the warning by adding the same #ifdef around them.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/f2fs/sysfs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 2e7e611..7d45e65 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -516,6 +516,7 @@ static struct kobject f2fs_feat = {
 	.kset	= &f2fs_kset,
 };
 
+#ifdef CONFIG_PROC_FS
 static int segment_info_seq_show(struct seq_file *seq, void *offset)
 {
 	struct super_block *sb = seq->private;
@@ -608,6 +609,7 @@ static int iostat_info_seq_show(struct seq_file *seq, void *offset)
 
 	return 0;
 }
+#endif
 
 int __init f2fs_init_sysfs(void)
 {
-- 
2.7.0



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] f2fs: hide unused procfs helpers
  2018-07-13  3:53 ` YueHaibing
@ 2018-07-13  9:02   ` Chao Yu
  -1 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2018-07-13  9:02 UTC (permalink / raw)
  To: YueHaibing, jaegeuk; +Cc: linux-kernel, linux-f2fs-devel

Hello,

On 2018/7/13 11:53, YueHaibing wrote:
> When CONFIG_PROC_FS isn't set, gcc warning this:
> 
> fs/f2fs/sysfs.c:519:12: warning: ‘segment_info_seq_show’ defined but not used [-Wunused-function]
>  static int segment_info_seq_show(struct seq_file *seq, void *offset)
>             ^
> fs/f2fs/sysfs.c:546:12: warning: ‘segment_bits_seq_show’ defined but not used [-Wunused-function]
>  static int segment_bits_seq_show(struct seq_file *seq, void *offset)
>             ^
> fs/f2fs/sysfs.c:570:12: warning: ‘iostat_info_seq_show’ defined but not used [-Wunused-function]
>  static int iostat_info_seq_show(struct seq_file *seq, void *offset)
> 
> We can fix the warning by adding the same #ifdef around them.

Could you check below patch sent from Randy Dunlap? It has already fixed this
issue, anyway, thanks for your patch. :)

[PATCH] f2fs: fix defined but not used build warnings

Thanks,

> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  fs/f2fs/sysfs.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
> index 2e7e611..7d45e65 100644
> --- a/fs/f2fs/sysfs.c
> +++ b/fs/f2fs/sysfs.c
> @@ -516,6 +516,7 @@ static struct kobject f2fs_feat = {
>  	.kset	= &f2fs_kset,
>  };
>  
> +#ifdef CONFIG_PROC_FS
>  static int segment_info_seq_show(struct seq_file *seq, void *offset)
>  {
>  	struct super_block *sb = seq->private;
> @@ -608,6 +609,7 @@ static int iostat_info_seq_show(struct seq_file *seq, void *offset)
>  
>  	return 0;
>  }
> +#endif
>  
>  int __init f2fs_init_sysfs(void)
>  {
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] f2fs: hide unused procfs helpers
@ 2018-07-13  9:02   ` Chao Yu
  0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2018-07-13  9:02 UTC (permalink / raw)
  To: YueHaibing, jaegeuk; +Cc: linux-kernel, linux-f2fs-devel

Hello,

On 2018/7/13 11:53, YueHaibing wrote:
> When CONFIG_PROC_FS isn't set, gcc warning this:
> 
> fs/f2fs/sysfs.c:519:12: warning: ‘segment_info_seq_show’ defined but not used [-Wunused-function]
>  static int segment_info_seq_show(struct seq_file *seq, void *offset)
>             ^
> fs/f2fs/sysfs.c:546:12: warning: ‘segment_bits_seq_show’ defined but not used [-Wunused-function]
>  static int segment_bits_seq_show(struct seq_file *seq, void *offset)
>             ^
> fs/f2fs/sysfs.c:570:12: warning: ‘iostat_info_seq_show’ defined but not used [-Wunused-function]
>  static int iostat_info_seq_show(struct seq_file *seq, void *offset)
> 
> We can fix the warning by adding the same #ifdef around them.

Could you check below patch sent from Randy Dunlap? It has already fixed this
issue, anyway, thanks for your patch. :)

[PATCH] f2fs: fix defined but not used build warnings

Thanks,

> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  fs/f2fs/sysfs.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
> index 2e7e611..7d45e65 100644
> --- a/fs/f2fs/sysfs.c
> +++ b/fs/f2fs/sysfs.c
> @@ -516,6 +516,7 @@ static struct kobject f2fs_feat = {
>  	.kset	= &f2fs_kset,
>  };
>  
> +#ifdef CONFIG_PROC_FS
>  static int segment_info_seq_show(struct seq_file *seq, void *offset)
>  {
>  	struct super_block *sb = seq->private;
> @@ -608,6 +609,7 @@ static int iostat_info_seq_show(struct seq_file *seq, void *offset)
>  
>  	return 0;
>  }
> +#endif
>  
>  int __init f2fs_init_sysfs(void)
>  {
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] f2fs: hide unused procfs helpers
  2018-07-13  9:02   ` Chao Yu
@ 2018-07-13  9:17     ` YueHaibing
  -1 siblings, 0 replies; 6+ messages in thread
From: YueHaibing @ 2018-07-13  9:17 UTC (permalink / raw)
  To: Chao Yu, jaegeuk; +Cc: linux-kernel, linux-f2fs-devel



On 2018/7/13 17:02, Chao Yu wrote:
> Hello,
> 
> On 2018/7/13 11:53, YueHaibing wrote:
>> When CONFIG_PROC_FS isn't set, gcc warning this:
>>
>> fs/f2fs/sysfs.c:519:12: warning: ‘segment_info_seq_show’ defined but not used [-Wunused-function]
>>  static int segment_info_seq_show(struct seq_file *seq, void *offset)
>>             ^
>> fs/f2fs/sysfs.c:546:12: warning: ‘segment_bits_seq_show’ defined but not used [-Wunused-function]
>>  static int segment_bits_seq_show(struct seq_file *seq, void *offset)
>>             ^
>> fs/f2fs/sysfs.c:570:12: warning: ‘iostat_info_seq_show’ defined but not used [-Wunused-function]
>>  static int iostat_info_seq_show(struct seq_file *seq, void *offset)
>>
>> We can fix the warning by adding the same #ifdef around them.
> 
> Could you check below patch sent from Randy Dunlap? It has already fixed this
> issue, anyway, thanks for your patch. :)
> 
> [PATCH] f2fs: fix defined but not used build warnings

thank you for your information.
> 
> Thanks,
> 
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  fs/f2fs/sysfs.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
>> index 2e7e611..7d45e65 100644
>> --- a/fs/f2fs/sysfs.c
>> +++ b/fs/f2fs/sysfs.c
>> @@ -516,6 +516,7 @@ static struct kobject f2fs_feat = {
>>  	.kset	= &f2fs_kset,
>>  };
>>  
>> +#ifdef CONFIG_PROC_FS
>>  static int segment_info_seq_show(struct seq_file *seq, void *offset)
>>  {
>>  	struct super_block *sb = seq->private;
>> @@ -608,6 +609,7 @@ static int iostat_info_seq_show(struct seq_file *seq, void *offset)
>>  
>>  	return 0;
>>  }
>> +#endif
>>  
>>  int __init f2fs_init_sysfs(void)
>>  {
>>
> 
> 
> .
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] f2fs: hide unused procfs helpers
@ 2018-07-13  9:17     ` YueHaibing
  0 siblings, 0 replies; 6+ messages in thread
From: YueHaibing @ 2018-07-13  9:17 UTC (permalink / raw)
  To: Chao Yu, jaegeuk; +Cc: linux-kernel, linux-f2fs-devel



On 2018/7/13 17:02, Chao Yu wrote:
> Hello,
> 
> On 2018/7/13 11:53, YueHaibing wrote:
>> When CONFIG_PROC_FS isn't set, gcc warning this:
>>
>> fs/f2fs/sysfs.c:519:12: warning: ‘segment_info_seq_show’ defined but not used [-Wunused-function]
>>  static int segment_info_seq_show(struct seq_file *seq, void *offset)
>>             ^
>> fs/f2fs/sysfs.c:546:12: warning: ‘segment_bits_seq_show’ defined but not used [-Wunused-function]
>>  static int segment_bits_seq_show(struct seq_file *seq, void *offset)
>>             ^
>> fs/f2fs/sysfs.c:570:12: warning: ‘iostat_info_seq_show’ defined but not used [-Wunused-function]
>>  static int iostat_info_seq_show(struct seq_file *seq, void *offset)
>>
>> We can fix the warning by adding the same #ifdef around them.
> 
> Could you check below patch sent from Randy Dunlap? It has already fixed this
> issue, anyway, thanks for your patch. :)
> 
> [PATCH] f2fs: fix defined but not used build warnings

thank you for your information.
> 
> Thanks,
> 
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  fs/f2fs/sysfs.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
>> index 2e7e611..7d45e65 100644
>> --- a/fs/f2fs/sysfs.c
>> +++ b/fs/f2fs/sysfs.c
>> @@ -516,6 +516,7 @@ static struct kobject f2fs_feat = {
>>  	.kset	= &f2fs_kset,
>>  };
>>  
>> +#ifdef CONFIG_PROC_FS
>>  static int segment_info_seq_show(struct seq_file *seq, void *offset)
>>  {
>>  	struct super_block *sb = seq->private;
>> @@ -608,6 +609,7 @@ static int iostat_info_seq_show(struct seq_file *seq, void *offset)
>>  
>>  	return 0;
>>  }
>> +#endif
>>  
>>  int __init f2fs_init_sysfs(void)
>>  {
>>
> 
> 
> .
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-13  9:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13  3:53 [PATCH] f2fs: hide unused procfs helpers YueHaibing
2018-07-13  3:53 ` YueHaibing
2018-07-13  9:02 ` Chao Yu
2018-07-13  9:02   ` Chao Yu
2018-07-13  9:17   ` YueHaibing
2018-07-13  9:17     ` YueHaibing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.