Skip to contentSkip to conversation

ext4: mark objects for local use as static

PATCH In review Lukas Czerner 2 participants 2 messages Feb 15, 2011 – Feb 23, 2011 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: mark objects for local use as static

Certain object in ext4 code are supposed to be used only locally, but are not defined as static. Fix it by adding static into definition.

---
 fs/ext4/mballoc.c |    3 ++-
 fs/ext4/super.c   |    6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)
fs/ext4/mballoc.c +2 -1
index d1fe09a..ae4d7f5 100644
@@ -4753,7 +4753,8 @@ static int ext4_trim_extent(struct super_block *sb, int start, int count,
  * bitmap. Then issue a TRIM command on this extent and free the extent in
  * the group buddy bitmap. This is done until whole group is scanned.
  */
-ext4_grpblk_t ext4_trim_all_free(struct super_block *sb, struct ext4_buddy *e4b,
+static ext4_grpblk_t
+ext4_trim_all_free(struct super_block *sb, struct ext4_buddy *e4b,
 		ext4_grpblk_t start, ext4_grpblk_t max, ext4_grpblk_t minblocks)
 {
 	void *bitmap;
fs/ext4/super.c +3 -3
index f6a318f..5fe6d1b 100644
@@ -54,9 +54,9 @@
 
 static struct proc_dir_entry *ext4_proc_root;
 static struct kset *ext4_kset;
-struct ext4_lazy_init *ext4_li_info;
-struct mutex ext4_li_mtx;
-struct ext4_features *ext4_feat;
+static struct ext4_lazy_init *ext4_li_info;
+static struct mutex ext4_li_mtx;
+static struct ext4_features *ext4_feat;
 
 static int ext4_load_journal(struct super_block *, struct ext4_super_block *,
 			     unsigned long journal_devnum);
Signature · 1 line
1.7.4
maintainer
#1 lore raw
Quoted 4 lines · Lukas Czerner

Certain object in ext4 code are supposed to be used only locally, but are not defined as static. Fix it by adding static into definition.

Thanks, added to the ext4 patch queue with the one-line summary:

ext4: mark file-local functions and variables as static

- Ted