Commit 68a12d61 authored by Andries E. Brouwer's avatar Andries E. Brouwer Committed by Linus Torvalds

[PATCH] add static in udf

udf_filead_read() and udf_get_fileextent() are unused.
Here they are put inside #if 0 .. #endif
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1351f6b2
......@@ -23,8 +23,11 @@
#include <linux/string.h>
#include <linux/buffer_head.h>
uint8_t * udf_filead_read(struct inode *dir, uint8_t *tmpad, uint8_t ad_size,
lb_addr fe_loc, int *pos, int *offset, struct buffer_head **bh, int *error)
#if 0
static uint8_t *
udf_filead_read(struct inode *dir, uint8_t *tmpad, uint8_t ad_size,
lb_addr fe_loc, int *pos, int *offset,
struct buffer_head **bh, int *error)
{
int loffset = *offset;
int block;
......@@ -71,6 +74,7 @@ uint8_t * udf_filead_read(struct inode *dir, uint8_t *tmpad, uint8_t ad_size,
}
return ad;
}
#endif
struct fileIdentDesc *
udf_fileident_read(struct inode *dir, loff_t *nf_pos,
......@@ -259,7 +263,8 @@ udf_get_fileident(void * buffer, int bufsize, int * offset)
return fi;
}
extent_ad *
#if 0
static extent_ad *
udf_get_fileextent(void * buffer, int bufsize, int * offset)
{
extent_ad * ext;
......@@ -293,6 +298,7 @@ udf_get_fileextent(void * buffer, int bufsize, int * offset)
*offset = *offset + sizeof(extent_ad);
return ext;
}
#endif
short_ad *
udf_get_fileshortad(uint8_t *ptr, int maxoffset, int *offset, int inc)
......
......@@ -28,6 +28,8 @@
#include <linux/fs.h>
#include <linux/smp_lock.h>
static int udf_fsync_inode(struct inode *, int);
/*
* File may be NULL when we are called. Perhaps we shouldn't
* even pass file to fsync ?
......@@ -39,7 +41,7 @@ int udf_fsync_file(struct file * file, struct dentry *dentry, int datasync)
return udf_fsync_inode(inode, datasync);
}
int udf_fsync_inode(struct inode *inode, int datasync)
static int udf_fsync_inode(struct inode *inode, int datasync)
{
int err;
......
......@@ -54,7 +54,10 @@ MODULE_LICENSE("GPL");
static mode_t udf_convert_permissions(struct fileEntry *);
static int udf_update_inode(struct inode *, int);
static void udf_fill_inode(struct inode *, struct buffer_head *);
static struct buffer_head *inode_getblk(struct inode *, long, int *, long *, int *);
static struct buffer_head *inode_getblk(struct inode *, long, int *,
long *, int *);
static int8_t udf_insert_aext(struct inode *, lb_addr, int,
lb_addr, uint32_t, struct buffer_head *);
static void udf_split_extents(struct inode *, int *, int, int,
long_ad [EXTENT_MERGE_SIZE], int *);
static void udf_prealloc_extents(struct inode *, int, int,
......@@ -349,8 +352,8 @@ static int udf_get_block(struct inode *inode, sector_t block, struct buffer_head
goto abort;
}
struct buffer_head * udf_getblk(struct inode * inode, long block,
int create, int * err)
static struct buffer_head *
udf_getblk(struct inode *inode, long block, int create, int *err)
{
struct buffer_head dummy;
......@@ -941,7 +944,7 @@ udf_read_inode(struct inode *inode)
memset(&UDF_I_LOCATION(inode), 0xFF, sizeof(lb_addr));
}
void
static void
__udf_read_inode(struct inode *inode)
{
struct buffer_head *bh = NULL;
......@@ -1901,7 +1904,8 @@ int8_t udf_current_aext(struct inode *inode, lb_addr *bloc, int *extoffset,
return etype;
}
int8_t udf_insert_aext(struct inode *inode, lb_addr bloc, int extoffset,
static int8_t
udf_insert_aext(struct inode *inode, lb_addr bloc, int extoffset,
lb_addr neloc, uint32_t nelen, struct buffer_head *bh)
{
lb_addr oeloc;
......
......@@ -93,7 +93,6 @@ extern struct inode *udf_iget(struct super_block *, lb_addr);
extern int udf_sync_inode(struct inode *);
extern void udf_expand_file_adinicb(struct inode *, int, int *);
extern struct buffer_head * udf_expand_dir_adinicb(struct inode *, int *, int *);
extern struct buffer_head * udf_getblk(struct inode *, long, int, int *);
extern struct buffer_head * udf_bread(struct inode *, int, int, int *);
extern void udf_truncate(struct inode *);
extern void udf_read_inode(struct inode *);
......@@ -105,7 +104,6 @@ extern long udf_block_map(struct inode *, long);
extern int8_t inode_bmap(struct inode *, int, lb_addr *, uint32_t *, lb_addr *, uint32_t *, uint32_t *, struct buffer_head **);
extern int8_t udf_add_aext(struct inode *, lb_addr *, int *, lb_addr, uint32_t, struct buffer_head **, int);
extern int8_t udf_write_aext(struct inode *, lb_addr, int *, lb_addr, uint32_t, struct buffer_head *, int);
extern int8_t udf_insert_aext(struct inode *, lb_addr, int, lb_addr, uint32_t, struct buffer_head *);
extern int8_t udf_delete_aext(struct inode *, lb_addr, int, lb_addr, uint32_t, struct buffer_head *);
extern int8_t udf_next_aext(struct inode *, lb_addr *, int *, lb_addr *, uint32_t *, struct buffer_head **, int);
extern int8_t udf_current_aext(struct inode *, lb_addr *, int *, lb_addr *, uint32_t *, struct buffer_head **, int);
......@@ -153,13 +151,10 @@ extern int udf_new_block(struct super_block *, struct inode *, uint16_t, uint32_
/* fsync.c */
extern int udf_fsync_file(struct file *, struct dentry *, int);
extern int udf_fsync_inode(struct inode *, int);
/* directory.c */
extern uint8_t * udf_filead_read(struct inode *, uint8_t *, uint8_t, lb_addr, int *, int *, struct buffer_head **, int *);
extern struct fileIdentDesc * udf_fileident_read(struct inode *, loff_t *, struct udf_fileident_bh *, struct fileIdentDesc *, lb_addr *, uint32_t *, lb_addr *, uint32_t *, uint32_t *, struct buffer_head **);
extern struct fileIdentDesc * udf_get_fileident(void * buffer, int bufsize, int * offset);
extern extent_ad * udf_get_fileextent(void * buffer, int bufsize, int * offset);
extern long_ad * udf_get_filelongad(uint8_t *, int, int *, int);
extern short_ad * udf_get_fileshortad(uint8_t *, int, int *, int);
......
......@@ -58,7 +58,7 @@ const unsigned short int __mon_yday[2][13] =
#define SPD 0x15180 /*3600*24*/
#define SPY(y,l,s) (SPD * (365*y+l)+s)
time_t year_seconds[MAX_YEAR_SECONDS]= {
static time_t year_seconds[MAX_YEAR_SECONDS]= {
/*1970*/ SPY( 0, 0,0), SPY( 1, 0,0), SPY( 2, 0,0), SPY( 3, 1,0),
/*1974*/ SPY( 4, 1,0), SPY( 5, 1,0), SPY( 6, 1,0), SPY( 7, 2,0),
/*1978*/ SPY( 8, 2,0), SPY( 9, 2,0), SPY(10, 2,0), SPY(11, 3,0),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment