Skip to contentSkip to conversation

fs/jffs2/: make 2 functions static

PATCH Applied Adrian Bunk 2 participants 2 messages Jun 28, 2006 – Jun 29, 2006 Journalling flash file system V2 (JFFS2)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/jffs2/: make 2 functions static

This patch makes two needlessly global functions static.

---

This patch was already sent on:
- 22 Jun 2006

 fs/jffs2/malloc.c   |    2 +-
 fs/jffs2/nodelist.h |    2 --
 fs/jffs2/scan.c     |    4 ++--
 3 files changed, 3 insertions(+), 5 deletions(-)
fs/jffs2/malloc.c renamed from fs/jffs2/malloc.c.old +1 -1
@@ -190,7 +190,7 @@
 	kmem_cache_free(tmp_dnode_info_slab, x);
 }
 
-struct jffs2_raw_node_ref *jffs2_alloc_refblock(void)
+static struct jffs2_raw_node_ref *jffs2_alloc_refblock(void)
 {
 	struct jffs2_raw_node_ref *ret;
 
fs/jffs2/nodelist.h renamed from fs/jffs2/nodelist.h.old +0 -2
@@ -427,8 +427,6 @@
 /* scan.c */
 int jffs2_scan_medium(struct jffs2_sb_info *c);
 void jffs2_rotate_lists(struct jffs2_sb_info *c);
-int jffs2_fill_scan_buf(struct jffs2_sb_info *c, void *buf,
-				uint32_t ofs, uint32_t len);
 struct jffs2_inode_cache *jffs2_scan_make_ino_cache(struct jffs2_sb_info *c, uint32_t ino);
 int jffs2_scan_classify_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
 int jffs2_scan_dirty_space(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t size);
fs/jffs2/scan.c renamed from fs/jffs2/scan.c.old +2 -2
@@ -274,8 +274,8 @@
 	return ret;
 }
 
-int jffs2_fill_scan_buf (struct jffs2_sb_info *c, void *buf,
-				uint32_t ofs, uint32_t len)
+static int jffs2_fill_scan_buf(struct jffs2_sb_info *c, void *buf,
+			       uint32_t ofs, uint32_t len)
 {
 	int ret;
 	size_t retlen;
maintainer Applied
#1 lore raw
Quoted 1 line · Adrian Bunk

This patch makes two needlessly global functions static.

Applied; thanks.

To be honest though, I'd _much_ rather get GCC bugs 27898 and 27899 fixed and start building stuff like file systems with -fwhole-program --combine. It gives about a 4% reduction in code size.

Signature · 1 line
dwmw2