Fix some statics and remove unused function
authorCharles Manning <cdhmanning@gmail.com>
Thu, 7 Jun 2012 02:54:30 +0000 (14:54 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Thu, 7 Jun 2012 02:54:30 +0000 (14:54 +1200)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/yaffsfs.c
yaffs_attribs.c
yaffs_guts.c
yaffs_tagscompat.c

index 9f1397b578d365a0281dcb147ef0ce95a305745f..62fb79388d0a6b1d4a36762fde914a2976cbd3e1 100644 (file)
@@ -394,19 +394,19 @@ static int yaffs_toupper(YCHAR a)
                return a;
 }
 
-int yaffsfs_Match(YCHAR a, YCHAR b)
+static int yaffsfs_Match(YCHAR a, YCHAR b)
 {
        return (yaffs_toupper(a) == yaffs_toupper(b));
 }
 #else
-int yaffsfs_Match(YCHAR a, YCHAR b)
+static int yaffsfs_Match(YCHAR a, YCHAR b)
 {
        /* case sensitive */
        return (a == b);
 }
 #endif
 
-int yaffsfs_IsPathDivider(YCHAR ch)
+static int yaffsfs_IsPathDivider(YCHAR ch)
 {
        const YCHAR *str = YAFFS_PATH_DIVIDERS;
 
@@ -419,7 +419,7 @@ int yaffsfs_IsPathDivider(YCHAR ch)
        return 0;
 }
 
-int yaffsfs_CheckNameLength(const char *name)
+static int yaffsfs_CheckNameLength(const char *name)
 {
        int retVal = 0;
 
@@ -1000,7 +1000,7 @@ int yaffs_open(const YCHAR *path, int oflag, int mode)
                                  YAFFS_SHARE_READ | YAFFS_SHARE_WRITE);
 }
 
-int yaffs_Dofsync(int handle, int datasync)
+static int yaffs_Dofsync(int handle, int datasync)
 {
        int retVal = -1;
        struct yaffs_obj *obj;
@@ -1063,7 +1063,7 @@ int yaffs_close(int handle)
        return retVal;
 }
 
-int yaffsfs_do_read(int handle, void *vbuf, unsigned int nbyte,
+static int yaffsfs_do_read(int handle, void *vbuf, unsigned int nbyte,
                    int isPread, loff_t offset)
 {
        struct yaffsfs_FileDes *fd = NULL;
@@ -1185,7 +1185,7 @@ int yaffs_pread(int handle, void *buf, unsigned int nbyte, loff_t offset)
        return yaffsfs_do_read(handle, buf, nbyte, 1, offset);
 }
 
-int yaffsfs_do_write(int handle, const void *vbuf, unsigned int nbyte,
+static int yaffsfs_do_write(int handle, const void *vbuf, unsigned int nbyte,
                     int isPwrite, loff_t offset)
 {
        struct yaffsfs_FileDes *fd = NULL;
@@ -1416,7 +1416,7 @@ loff_t yaffs_lseek(int handle, loff_t offset, int whence)
        return pos;
 }
 
-int yaffsfs_DoUnlink(const YCHAR *path, int isDirectory)
+static int yaffsfs_DoUnlink(const YCHAR *path, int isDirectory)
 {
        struct yaffs_obj *dir = NULL;
        struct yaffs_obj *obj = NULL;
index fe914e558b64cba94ef599e8b463cde40bf8117b..3d778f2266248d47658eacc0882ef13ef720a668 100644 (file)
@@ -52,7 +52,7 @@ void yaffs_attribs_init(struct yaffs_obj *obj, u32 gid, u32 uid, u32 rdev)
        obj->yst_gid = gid;
 }
 
-loff_t yaffs_get_file_size(struct yaffs_obj *obj)
+static loff_t yaffs_get_file_size(struct yaffs_obj *obj)
 {
        YCHAR *alias = NULL;
        obj = yaffs_get_equivalent_obj(obj);
index df6cb001995f0cdc1d7364c9d5b51221dd274008..6d9f608601f48d0e12fe35a1db630805a08d950d 100644 (file)
@@ -185,31 +185,6 @@ void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 *buffer)
 
 }
 
-/*
- * Determine if we have a managed buffer.
- */
-int yaffs_is_managed_tmp_buffer(struct yaffs_dev *dev, const u8 *buffer)
-{
-       int i;
-
-       for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) {
-               if (dev->temp_buffer[i].buffer == buffer)
-                       return 1;
-       }
-
-       for (i = 0; i < dev->param.n_caches; i++) {
-               if (dev->cache[i].data == buffer)
-                       return 1;
-       }
-
-       if (buffer == dev->checkpt_buffer)
-               return 1;
-
-       yaffs_trace(YAFFS_TRACE_ALWAYS,
-         "yaffs: unmaged buffer detected.");
-       return 0;
-}
-
 /*
  * Functions for robustisizing TODO
  *
@@ -739,7 +714,7 @@ static void yaffs_deinit_tnodes_and_objs(struct yaffs_dev *dev)
        dev->n_tnodes = 0;
 }
 
-void yaffs_load_tnode_0(struct yaffs_dev *dev, struct yaffs_tnode *tn,
+static void yaffs_load_tnode_0(struct yaffs_dev *dev, struct yaffs_tnode *tn,
                        unsigned pos, unsigned val)
 {
        u32 *map = (u32 *) tn;
@@ -1926,7 +1901,7 @@ struct yaffs_obj *yaffs_find_by_number(struct yaffs_dev *dev, u32 number)
        return NULL;
 }
 
-struct yaffs_obj *yaffs_new_obj(struct yaffs_dev *dev, int number,
+static struct yaffs_obj *yaffs_new_obj(struct yaffs_dev *dev, int number,
                                enum yaffs_obj_type type)
 {
        struct yaffs_obj *the_obj = NULL;
@@ -3860,7 +3835,7 @@ static int yaffs_unlink_file_if_needed(struct yaffs_obj *in)
        return ret_val;
 }
 
-int yaffs_del_file(struct yaffs_obj *in)
+static int yaffs_del_file(struct yaffs_obj *in)
 {
        int ret_val = YAFFS_OK;
        int deleted;    /* Need to cache value on stack if in is freed */
index 9ac5896da37713d51875c8f9bd23b6d4e434fa88..32ba11fa9d5ce8e2ed0aab3fc8988fef0b2908f5 100644 (file)
@@ -22,7 +22,7 @@ static void yaffs_handle_rd_data_error(struct yaffs_dev *dev, int nand_chunk);
 
 /********** Tags ECC calculations  *********/
 
-void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare)
+static void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare)
 {
        yaffs_ecc_calc(data, spare->ecc1);
        yaffs_ecc_calc(&data[256], spare->ecc2);