[2.6 patch] fs/hfs/: misc cleanups

2005-01-31 Thread Adrian Bunk
This patch contains the following cleanups:
- make needlessly global code static
- super.c: remove the unused global variable hfs_version

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

 fs/hfs/brec.c|   10 +++---
 fs/hfs/btree.h   |3 ---
 fs/hfs/catalog.c |2 +-
 fs/hfs/dir.c |   20 ++--
 fs/hfs/extent.c  |4 ++--
 fs/hfs/hfs_fs.h  |   10 --
 fs/hfs/inode.c   |   13 -
 fs/hfs/super.c   |4 +---
 8 files changed, 29 insertions(+), 37 deletions(-)

This patch was already sent on:
- 7 Jan 2005

--- linux-2.6.10-mm2-full/fs/hfs/btree.h.old2005-01-07 00:09:58.0 
+0100
+++ linux-2.6.10-mm2-full/fs/hfs/btree.h2005-01-07 00:11:29.0 
+0100
@@ -111,9 +111,6 @@
 extern u16 hfs_brec_keylen(struct hfs_bnode *, u16);
 extern int hfs_brec_insert(struct hfs_find_data *, void *, int);
 extern int hfs_brec_remove(struct hfs_find_data *);
-extern struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *);
-extern int hfs_brec_update_parent(struct hfs_find_data *);
-extern int hfs_btree_inc_height(struct hfs_btree *);
 
 /* bfind.c */
 extern int hfs_find_init(struct hfs_btree *, struct hfs_find_data *);
--- linux-2.6.10-mm2-full/fs/hfs/brec.c.old 2005-01-07 00:10:19.0 
+0100
+++ linux-2.6.10-mm2-full/fs/hfs/brec.c 2005-01-07 00:11:49.0 +0100
@@ -10,6 +10,10 @@
 
 #include "btree.h"
 
+static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd);
+static int hfs_brec_update_parent(struct hfs_find_data *fd);
+static int hfs_btree_inc_height(struct hfs_btree *tree);
+
 /* Get the length and offset of the given record in the given node */
 u16 hfs_brec_lenoff(struct hfs_bnode *node, u16 rec, u16 *off)
 {
@@ -211,7 +215,7 @@
return 0;
 }
 
-struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd)
+static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd)
 {
struct hfs_btree *tree;
struct hfs_bnode *node, *new_node;
@@ -320,7 +324,7 @@
return new_node;
 }
 
-int hfs_brec_update_parent(struct hfs_find_data *fd)
+static int hfs_brec_update_parent(struct hfs_find_data *fd)
 {
struct hfs_btree *tree;
struct hfs_bnode *node, *new_node, *parent;
@@ -418,7 +422,7 @@
return 0;
 }
 
-int hfs_btree_inc_height(struct hfs_btree *tree)
+static int hfs_btree_inc_height(struct hfs_btree *tree)
 {
struct hfs_bnode *node, *new_node;
struct hfs_bnode_desc node_desc;
--- linux-2.6.10-mm2-full/fs/hfs/catalog.c.old  2005-01-07 00:12:05.0 
+0100
+++ linux-2.6.10-mm2-full/fs/hfs/catalog.c  2005-01-07 00:12:13.0 
+0100
@@ -33,7 +33,7 @@
}
 }
 
-int hfs_cat_build_record(hfs_cat_rec *rec, u32 cnid, struct inode *inode)
+static int hfs_cat_build_record(hfs_cat_rec *rec, u32 cnid, struct inode 
*inode)
 {
__be32 mtime = hfs_mtime();
 
--- linux-2.6.10-mm2-full/fs/hfs/dir.c.old  2005-01-07 00:12:28.0 
+0100
+++ linux-2.6.10-mm2-full/fs/hfs/dir.c  2005-01-07 00:14:20.0 +0100
@@ -17,8 +17,8 @@
 /*
  * hfs_lookup()
  */
-struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry,
- struct nameidata *nd)
+static struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry,
+struct nameidata *nd)
 {
hfs_cat_rec rec;
struct hfs_find_data fd;
@@ -51,7 +51,7 @@
 /*
  * hfs_readdir
  */
-int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
+static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
 {
struct inode *inode = filp->f_dentry->d_inode;
struct super_block *sb = inode->i_sb;
@@ -177,8 +177,8 @@
  * a directory and return a corresponding inode, given the inode for
  * the directory and the name (and its length) of the new file.
  */
-int hfs_create(struct inode *dir, struct dentry *dentry, int mode,
-  struct nameidata *nd)
+static int hfs_create(struct inode *dir, struct dentry *dentry, int mode,
+ struct nameidata *nd)
 {
struct inode *inode;
int res;
@@ -207,7 +207,7 @@
  * in a directory, given the inode for the parent directory and the
  * name (and its length) of the new directory.
  */
-int hfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
+static int hfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
 {
struct inode *inode;
int res;
@@ -236,7 +236,7 @@
  * file, given the inode for the parent directory and the name
  * (and its length) of the existing file.
  */
-int hfs_unlink(struct inode *dir, struct dentry *dentry)
+static int hfs_unlink(struct inode *dir, struct dentry *dentry)
 {
struct inode *inode;
int res;
@@ -262,7 +262,7 @@
  * directory, given the inode for the parent directory and the name
  * (and its length) of the existing directory.
  */
-int hfs_rmdir(struct inode *dir, struct dentry *dentry)
+static int hfs_rmdir(struct inode *dir, struct 

[2.6 patch] fs/hfs/: misc cleanups

2005-01-31 Thread Adrian Bunk
This patch contains the following cleanups:
- make needlessly global code static
- super.c: remove the unused global variable hfs_version

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 fs/hfs/brec.c|   10 +++---
 fs/hfs/btree.h   |3 ---
 fs/hfs/catalog.c |2 +-
 fs/hfs/dir.c |   20 ++--
 fs/hfs/extent.c  |4 ++--
 fs/hfs/hfs_fs.h  |   10 --
 fs/hfs/inode.c   |   13 -
 fs/hfs/super.c   |4 +---
 8 files changed, 29 insertions(+), 37 deletions(-)

This patch was already sent on:
- 7 Jan 2005

--- linux-2.6.10-mm2-full/fs/hfs/btree.h.old2005-01-07 00:09:58.0 
+0100
+++ linux-2.6.10-mm2-full/fs/hfs/btree.h2005-01-07 00:11:29.0 
+0100
@@ -111,9 +111,6 @@
 extern u16 hfs_brec_keylen(struct hfs_bnode *, u16);
 extern int hfs_brec_insert(struct hfs_find_data *, void *, int);
 extern int hfs_brec_remove(struct hfs_find_data *);
-extern struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *);
-extern int hfs_brec_update_parent(struct hfs_find_data *);
-extern int hfs_btree_inc_height(struct hfs_btree *);
 
 /* bfind.c */
 extern int hfs_find_init(struct hfs_btree *, struct hfs_find_data *);
--- linux-2.6.10-mm2-full/fs/hfs/brec.c.old 2005-01-07 00:10:19.0 
+0100
+++ linux-2.6.10-mm2-full/fs/hfs/brec.c 2005-01-07 00:11:49.0 +0100
@@ -10,6 +10,10 @@
 
 #include btree.h
 
+static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd);
+static int hfs_brec_update_parent(struct hfs_find_data *fd);
+static int hfs_btree_inc_height(struct hfs_btree *tree);
+
 /* Get the length and offset of the given record in the given node */
 u16 hfs_brec_lenoff(struct hfs_bnode *node, u16 rec, u16 *off)
 {
@@ -211,7 +215,7 @@
return 0;
 }
 
-struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd)
+static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd)
 {
struct hfs_btree *tree;
struct hfs_bnode *node, *new_node;
@@ -320,7 +324,7 @@
return new_node;
 }
 
-int hfs_brec_update_parent(struct hfs_find_data *fd)
+static int hfs_brec_update_parent(struct hfs_find_data *fd)
 {
struct hfs_btree *tree;
struct hfs_bnode *node, *new_node, *parent;
@@ -418,7 +422,7 @@
return 0;
 }
 
-int hfs_btree_inc_height(struct hfs_btree *tree)
+static int hfs_btree_inc_height(struct hfs_btree *tree)
 {
struct hfs_bnode *node, *new_node;
struct hfs_bnode_desc node_desc;
--- linux-2.6.10-mm2-full/fs/hfs/catalog.c.old  2005-01-07 00:12:05.0 
+0100
+++ linux-2.6.10-mm2-full/fs/hfs/catalog.c  2005-01-07 00:12:13.0 
+0100
@@ -33,7 +33,7 @@
}
 }
 
-int hfs_cat_build_record(hfs_cat_rec *rec, u32 cnid, struct inode *inode)
+static int hfs_cat_build_record(hfs_cat_rec *rec, u32 cnid, struct inode 
*inode)
 {
__be32 mtime = hfs_mtime();
 
--- linux-2.6.10-mm2-full/fs/hfs/dir.c.old  2005-01-07 00:12:28.0 
+0100
+++ linux-2.6.10-mm2-full/fs/hfs/dir.c  2005-01-07 00:14:20.0 +0100
@@ -17,8 +17,8 @@
 /*
  * hfs_lookup()
  */
-struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry,
- struct nameidata *nd)
+static struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry,
+struct nameidata *nd)
 {
hfs_cat_rec rec;
struct hfs_find_data fd;
@@ -51,7 +51,7 @@
 /*
  * hfs_readdir
  */
-int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
+static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
 {
struct inode *inode = filp-f_dentry-d_inode;
struct super_block *sb = inode-i_sb;
@@ -177,8 +177,8 @@
  * a directory and return a corresponding inode, given the inode for
  * the directory and the name (and its length) of the new file.
  */
-int hfs_create(struct inode *dir, struct dentry *dentry, int mode,
-  struct nameidata *nd)
+static int hfs_create(struct inode *dir, struct dentry *dentry, int mode,
+ struct nameidata *nd)
 {
struct inode *inode;
int res;
@@ -207,7 +207,7 @@
  * in a directory, given the inode for the parent directory and the
  * name (and its length) of the new directory.
  */
-int hfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
+static int hfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
 {
struct inode *inode;
int res;
@@ -236,7 +236,7 @@
  * file, given the inode for the parent directory and the name
  * (and its length) of the existing file.
  */
-int hfs_unlink(struct inode *dir, struct dentry *dentry)
+static int hfs_unlink(struct inode *dir, struct dentry *dentry)
 {
struct inode *inode;
int res;
@@ -262,7 +262,7 @@
  * directory, given the inode for the parent directory and the name
  * (and its length) of the existing directory.
  */
-int hfs_rmdir(struct inode *dir, struct dentry *dentry)
+static int hfs_rmdir(struct inode *dir, struct dentry