2011-05-05 08:52:14

by Robin Dong

[permalink] [raw]
Subject: [PATCH 1/3] ext4: remove incorrect 'extern' keyword for function-definition

Signed-off-by: Robin Dong <[email protected]>
---
fs/ext4/ialloc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 1ce240a..d4929ae 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -1229,7 +1229,7 @@ unsigned long ext4_count_dirs(struct super_block * sb)
* inode allocation from the current group, so we take alloc_sem lock, to
* block ext4_claim_inode until we are finished.
*/
-extern int ext4_init_inode_table(struct super_block *sb, ext4_group_t group,
+int ext4_init_inode_table(struct super_block *sb, ext4_group_t group,
int barrier)
{
struct ext4_group_info *grp = ext4_get_group_info(sb, group);
--
1.7.1


2011-05-05 08:52:20

by Robin Dong

[permalink] [raw]
Subject: [PATCH 2/3] ocfs2: change incorrect 'extern' keyword to 'static'

Change function param_set_dlmfs_capabilities from 'extern' to 'static' since
function param_get_dlmfs_capabilities is also 'static'.

Signed-off-by: Robin Dong <[email protected]>
---
fs/ocfs2/dlmfs/dlmfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
index b2df490..dd2675e 100644
--- a/fs/ocfs2/dlmfs/dlmfs.c
+++ b/fs/ocfs2/dlmfs/dlmfs.c
@@ -88,7 +88,7 @@ struct workqueue_struct *user_dlm_worker;
* signifies a bast fired on the lock.
*/
#define DLMFS_CAPABILITIES "bast stackglue"
-extern int param_set_dlmfs_capabilities(const char *val,
+static int param_set_dlmfs_capabilities(const char *val,
struct kernel_param *kp)
{
printk(KERN_ERR "%s: readonly parameter\n", kp->name);
--
1.7.1

2011-05-05 08:52:24

by Robin Dong

[permalink] [raw]
Subject: [PATCH 3/3] mm: change incorrect 'extern' keyword to 'static'

Change function memblock_memory_can_coalesce from 'extern' to 'static' to
match the memblock_* series function.

Signed-off-by: Robin Dong <[email protected]>
---
mm/memblock.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/memblock.c b/mm/memblock.c
index 400dc62..9570c43 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -292,7 +292,7 @@ static int __init_memblock memblock_double_array(struct memblock_type *type)
return 0;
}

-extern int __init_memblock __weak memblock_memory_can_coalesce(phys_addr_t addr1, phys_addr_t size1,
+static int __init_memblock __weak memblock_memory_can_coalesce(phys_addr_t addr1, phys_addr_t size1,
phys_addr_t addr2, phys_addr_t size2)
{
return 1;
--
1.7.1

2011-05-05 09:25:29

by Yong Zhang

[permalink] [raw]
Subject: Re: [PATCH 1/3] ext4: remove incorrect 'extern' keyword for function-definition

On Thu, May 5, 2011 at 4:51 PM, Robin Dong <[email protected]> wrote:
> Signed-off-by: Robin Dong <[email protected]>
> ---
>  fs/ext4/ialloc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
> index 1ce240a..d4929ae 100644
> --- a/fs/ext4/ialloc.c
> +++ b/fs/ext4/ialloc.c
> @@ -1229,7 +1229,7 @@ unsigned long ext4_count_dirs(struct super_block * sb)
>  * inode allocation from the current group, so we take alloc_sem lock, to
>  * block ext4_claim_inode until we are finished.
>  */
> -extern int ext4_init_inode_table(struct super_block *sb, ext4_group_t group,
> +int ext4_init_inode_table(struct super_block *sb, ext4_group_t group,

Is there any difference with your modification?

Thanks,
Yong

>                                 int barrier)
>  {
>        struct ext4_group_info *grp = ext4_get_group_info(sb, group);
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



--
Only stand for myself

2011-05-05 09:27:32

by Yong Zhang

[permalink] [raw]
Subject: Re: [PATCH 3/3] mm: change incorrect 'extern' keyword to 'static'

On Thu, May 5, 2011 at 4:51 PM, Robin Dong <[email protected]> wrote:
> Change function memblock_memory_can_coalesce from 'extern' to 'static' to
> match the memblock_* series function.
>
> Signed-off-by: Robin Dong <[email protected]>
> ---
>  mm/memblock.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/mm/memblock.c b/mm/memblock.c
> index 400dc62..9570c43 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -292,7 +292,7 @@ static int __init_memblock memblock_double_array(struct memblock_type *type)
>        return 0;
>  }
>
> -extern int __init_memblock __weak memblock_memory_can_coalesce(phys_addr_t addr1, phys_addr_t size1,
> +static int __init_memblock __weak memblock_memory_can_coalesce(phys_addr_t addr1, phys_addr_t size1,

I guess you will get build error as
"error: static declaration of ‘***’ follows non-static declaration".

No?

Thanks,
Yong

>                                          phys_addr_t addr2, phys_addr_t size2)
>  {
>        return 1;
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



--
Only stand for myself