diff mbox series

[-next] btrfs: Make btrfs_sysfs_add_fs_devices static

Message ID 20200916142604.37744-1-yuehaibing@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] btrfs: Make btrfs_sysfs_add_fs_devices static | expand

Commit Message

Yue Haibing Sept. 16, 2020, 2:26 p.m. UTC
Fix sparse warning:

fs/btrfs/sysfs.c:1386:5: warning:
 symbol 'btrfs_sysfs_add_fs_devices' was not declared. Should it be static?

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

Comments

Anand Jain Sept. 17, 2020, 1:47 a.m. UTC | #1
On 16/9/20 10:26 pm, YueHaibing wrote:
> Fix sparse warning:
> 
> fs/btrfs/sysfs.c:1386:5: warning:
>   symbol 'btrfs_sysfs_add_fs_devices' was not declared. Should it be static?


  misc-next branch has it declared static. It was fixed later.

Thanks, Anand


> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>   fs/btrfs/sysfs.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
> index e7b0e10685d9..279d9262b676 100644
> --- a/fs/btrfs/sysfs.c
> +++ b/fs/btrfs/sysfs.c
> @@ -1383,7 +1383,7 @@ int btrfs_sysfs_add_device(struct btrfs_device *device)
>   	return ret;
>   }
>   
> -int btrfs_sysfs_add_fs_devices(struct btrfs_fs_devices *fs_devices)
> +static int btrfs_sysfs_add_fs_devices(struct btrfs_fs_devices *fs_devices)
>   {
>   	int ret;
>   	struct btrfs_device *device;
>
David Sterba Sept. 17, 2020, 12:53 p.m. UTC | #2
On Thu, Sep 17, 2020 at 09:47:24AM +0800, Anand Jain wrote:
> 
> 
> 
> On 16/9/20 10:26 pm, YueHaibing wrote:
> > Fix sparse warning:
> > 
> > fs/btrfs/sysfs.c:1386:5: warning:
> >   symbol 'btrfs_sysfs_add_fs_devices' was not declared. Should it be static?
> 
> 
>   misc-next branch has it declared static. It was fixed later.

Yeah it's fixed, the k.org for-next got a bit behind the snapshot
branches, I'll do an update today.
diff mbox series

Patch

diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index e7b0e10685d9..279d9262b676 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -1383,7 +1383,7 @@  int btrfs_sysfs_add_device(struct btrfs_device *device)
 	return ret;
 }
 
-int btrfs_sysfs_add_fs_devices(struct btrfs_fs_devices *fs_devices)
+static int btrfs_sysfs_add_fs_devices(struct btrfs_fs_devices *fs_devices)
 {
 	int ret;
 	struct btrfs_device *device;