2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-18 07:35:12 +08:00

[PATCH] make some things static

This patch makes some needlessly global identifiers static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Arjan van de Ven <arjanv@infradead.org>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Adrian Bunk 2005-05-05 16:16:09 -07:00 committed by Linus Torvalds
parent 5e198d94dd
commit 75c96f8584
38 changed files with 93 additions and 86 deletions

View File

@ -74,7 +74,7 @@ static struct request_queue *rd_queue[CONFIG_BLK_DEV_RAM_COUNT];
* architecture-specific setup routine (from the stored boot sector
* information).
*/
int rd_size = CONFIG_BLK_DEV_RAM_SIZE; /* Size of the RAM disks */
static int rd_size = CONFIG_BLK_DEV_RAM_SIZE; /* Size of the RAM disks */
/*
* It would be very desirable to have a soft-blocksize (that in the case
* of the ramdisk driver is also the hardblocksize ;) of PAGE_SIZE because

View File

@ -292,7 +292,7 @@ module_param(cdu31a_irq, int, 0);
/* The interrupt handler will wake this queue up when it gets an
interrupts. */
DECLARE_WAIT_QUEUE_HEAD(cdu31a_irq_wait);
static DECLARE_WAIT_QUEUE_HEAD(cdu31a_irq_wait);
static int irq_flag = 0;
static int curr_control_reg = 0; /* Current value of the control register */
@ -2947,7 +2947,7 @@ static int scd_block_media_changed(struct gendisk *disk)
return cdrom_media_changed(&scd_info);
}
struct block_device_operations scd_bdops =
static struct block_device_operations scd_bdops =
{
.owner = THIS_MODULE,
.open = scd_block_open,
@ -3216,7 +3216,7 @@ errout3:
}
void __exit cdu31a_exit(void)
static void __exit cdu31a_exit(void)
{
del_gendisk(scd_gendisk);
put_disk(scd_gendisk);

View File

@ -107,20 +107,20 @@ static const char *mcdx_c_version
The _direct_ size is the number of sectors we're allowed to skip
directly (performing a read instead of requesting the new sector
needed */
const int REQUEST_SIZE = 800; /* should be less then 255 * 4 */
const int DIRECT_SIZE = 400; /* should be less then REQUEST_SIZE */
static const int REQUEST_SIZE = 800; /* should be less then 255 * 4 */
static const int DIRECT_SIZE = 400; /* should be less then REQUEST_SIZE */
enum drivemodes { TOC, DATA, RAW, COOKED };
enum datamodes { MODE0, MODE1, MODE2 };
enum resetmodes { SOFT, HARD };
const int SINGLE = 0x01; /* single speed drive (FX001S, LU) */
const int DOUBLE = 0x02; /* double speed drive (FX001D, ..? */
const int DOOR = 0x04; /* door locking capability */
const int MULTI = 0x08; /* multi session capability */
static const int SINGLE = 0x01; /* single speed drive (FX001S, LU) */
static const int DOUBLE = 0x02; /* double speed drive (FX001D, ..? */
static const int DOOR = 0x04; /* door locking capability */
static const int MULTI = 0x08; /* multi session capability */
const unsigned char READ1X = 0xc0;
const unsigned char READ2X = 0xc1;
static const unsigned char READ1X = 0xc0;
static const unsigned char READ2X = 0xc1;
/* DECLARATIONS ****************************************************/
@ -210,9 +210,7 @@ struct s_drive_stuff {
repeated here to show what's going on. And to sense, if they're
changed elsewhere. */
/* declared in blk.h */
int mcdx_init(void);
void do_mcdx_request(request_queue_t * q);
static int mcdx_init(void);
static int mcdx_block_open(struct inode *inode, struct file *file)
{
@ -569,7 +567,7 @@ static int mcdx_audio_ioctl(struct cdrom_device_info *cdi,
}
}
void do_mcdx_request(request_queue_t * q)
static void do_mcdx_request(request_queue_t * q)
{
struct s_drive_stuff *stuffp;
struct request *req;
@ -1028,7 +1026,7 @@ int __mcdx_init(void)
return 0;
}
void __exit mcdx_exit(void)
static void __exit mcdx_exit(void)
{
int i;
@ -1075,7 +1073,7 @@ module_exit(mcdx_exit);
/* Support functions ************************************************/
int __init mcdx_init_drive(int drive)
static int __init mcdx_init_drive(int drive)
{
struct s_version version;
struct gendisk *disk;
@ -1261,7 +1259,7 @@ int __init mcdx_init_drive(int drive)
return 0;
}
int __init mcdx_init(void)
static int __init mcdx_init(void)
{
int drive;
xwarn("Version 2.14(hs) \n");

View File

@ -5895,7 +5895,7 @@ int __init sbpcd_init(void)
}
/*==========================================================================*/
#ifdef MODULE
void sbpcd_exit(void)
static void sbpcd_exit(void)
{
int j;

View File

@ -1026,7 +1026,8 @@ static void kbd_rawcode(unsigned char data)
put_queue(vc, data);
}
void kbd_keycode(unsigned int keycode, int down, int hw_raw, struct pt_regs *regs)
static void kbd_keycode(unsigned int keycode, int down,
int hw_raw, struct pt_regs *regs)
{
struct vc_data *vc = vc_cons[fg_console].d;
unsigned short keysym, *key_map;

View File

@ -957,7 +957,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
}
struct super_type super_types[] = {
static struct super_type super_types[] = {
[0] = {
.name = "0.90.0",
.owner = THIS_MODULE,
@ -2740,7 +2740,7 @@ static struct block_device_operations md_fops =
.revalidate_disk= md_revalidate,
};
int md_thread(void * arg)
static int md_thread(void * arg)
{
mdk_thread_t *thread = arg;
@ -3232,7 +3232,7 @@ void md_handle_safemode(mddev_t *mddev)
}
DECLARE_WAIT_QUEUE_HEAD(resync_wait);
static DECLARE_WAIT_QUEUE_HEAD(resync_wait);
#define SYNC_MARKS 10
#define SYNC_MARK_STEP (3*HZ)
@ -3575,8 +3575,8 @@ void md_check_recovery(mddev_t *mddev)
}
}
int md_notify_reboot(struct notifier_block *this,
unsigned long code, void *x)
static int md_notify_reboot(struct notifier_block *this,
unsigned long code, void *x)
{
struct list_head *tmp;
mddev_t *mddev;
@ -3599,7 +3599,7 @@ int md_notify_reboot(struct notifier_block *this,
return NOTIFY_DONE;
}
struct notifier_block md_notifier = {
static struct notifier_block md_notifier = {
.notifier_call = md_notify_reboot,
.next = NULL,
.priority = INT_MAX, /* before any real devices */
@ -3616,7 +3616,7 @@ static void md_geninit(void)
p->proc_fops = &md_seq_fops;
}
int __init md_init(void)
static int __init md_init(void)
{
int minor;

View File

@ -103,7 +103,8 @@ static void multipath_end_bh_io (struct multipath_bh *mp_bh, int err)
mempool_free(mp_bh, conf->pool);
}
int multipath_end_request(struct bio *bio, unsigned int bytes_done, int error)
static int multipath_end_request(struct bio *bio, unsigned int bytes_done,
int error)
{
int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
struct multipath_bh * mp_bh = (struct multipath_bh *)(bio->bi_private);

View File

@ -28,7 +28,7 @@
#ifdef CONFIG_COPS_DAYNA
unsigned char ffdrv_code[] = {
static const unsigned char ffdrv_code[] = {
58,3,0,50,228,149,33,255,255,34,226,149,
249,17,40,152,33,202,154,183,237,82,77,68,
11,107,98,19,54,0,237,176,175,50,80,0,

View File

@ -27,7 +27,7 @@
#ifdef CONFIG_COPS_TANGENT
unsigned char ltdrv_code[] = {
static const unsigned char ltdrv_code[] = {
58,3,0,50,148,10,33,143,15,62,85,119,
190,32,9,62,170,119,190,32,3,35,24,241,
34,146,10,249,17,150,10,33,143,15,183,237,

View File

@ -48,7 +48,7 @@ static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
static int ack_tx(struct net_device *dev, int acked);
struct ArcProto capmode_proto =
static struct ArcProto capmode_proto =
{
'r',
XMTU,

View File

@ -1312,7 +1312,7 @@ int fb_get_options(char *name, char **option)
* Returns zero.
*
*/
int __init video_setup(char *options)
static int __init video_setup(char *options)
{
int i, global = 0;

View File

@ -354,7 +354,7 @@ static ssize_t show_pan(struct class_device *class_device, char *buf)
fb_info->var.xoffset);
}
struct class_device_attribute class_device_attrs[] = {
static struct class_device_attribute class_device_attrs[] = {
__ATTR(bits_per_pixel, S_IRUGO|S_IWUSR, show_bpp, store_bpp),
__ATTR(blank, S_IRUGO|S_IWUSR, show_blank, store_blank),
__ATTR(color_map, S_IRUGO|S_IWUSR, show_cmap, store_cmap),

View File

@ -1384,7 +1384,7 @@ SiSInitPCIetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
/* HELPER: SetLVDSetc */
/*********************************************/
void
static void
SiSSetLVDSetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
{
USHORT temp;
@ -1625,7 +1625,7 @@ SiS_ResetSegmentRegisters(SiS_Private *SiS_Pr,PSIS_HW_INFO HwInfo)
/* HELPER: GetVBType */
/*********************************************/
void
static void
SiS_GetVBType(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
{
USHORT flag=0, rev=0, nolcd=0, p4_0f, p4_25, p4_27;

View File

@ -2394,11 +2394,9 @@ void SiS_SetRegOR(SISIOADDRESS Port,USHORT Index, USHORT DataOR);
void SiS_DisplayOn(SiS_Private *SiS_Pr);
void SiS_DisplayOff(SiS_Private *SiS_Pr);
void SiSRegInit(SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
void SiSSetLVDSetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
BOOLEAN SiSDetermineROMLayout661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
void SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable);
void SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable);
void SiS_GetVBType(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
BOOLEAN SiS_SearchModeID(SiS_Private *SiS_Pr, USHORT *ModeNo, USHORT *ModeIdIndex);
UCHAR SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
USHORT SiS_GetColorDepth(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
@ -2444,7 +2442,6 @@ extern void SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT Mod
extern void SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
extern void SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
extern void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
extern void SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
extern void SiS_DisableBridge(SiS_Private *, PSIS_HW_INFO);
extern BOOLEAN SiS_SetCRT2Group(SiS_Private *, PSIS_HW_INFO, USHORT);
extern USHORT SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,

View File

@ -86,6 +86,7 @@
#define SiS_I2CDELAYSHORT 150
static USHORT SiS_GetBIOSLCDResInfo(SiS_Private *SiS_Pr);
static void SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx);
/*********************************************/
/* HELPER: Lock/Unlock CRT2 */
@ -100,7 +101,7 @@ SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x24,0x01);
}
void
static void
SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
{
if(HwInfo->jChipType >= SIS_315H)
@ -4236,7 +4237,7 @@ SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
* from outside the context of a mode switch!
* MUST call getVBType before calling this
*/
void
static void
SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
{
USHORT temp=0,tempah;
@ -9219,7 +9220,7 @@ SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempbx)
SiS_SetChReg(SiS_Pr, tempbx, 0);
}
void
static void
SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx)
{
if(SiS_Pr->SiS_IF_DEF_CH70xx == 1)
@ -9323,7 +9324,7 @@ SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempbx)
/* Read from Chrontel 70xx */
/* Parameter is [Register no (S7-S0)] */
USHORT
static USHORT
SiS_GetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx)
{
if(SiS_Pr->SiS_IF_DEF_CH70xx == 1)

View File

@ -293,7 +293,6 @@ static UCHAR SiS300_TrumpionData[7][80] = {
#endif
void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
void SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
void SiS_EnableCRT2(SiS_Private *SiS_Pr);
USHORT SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
void SiS_WaitRetrace1(SiS_Private *SiS_Pr);
@ -310,7 +309,6 @@ USHORT SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
USHORT SiS_GetResInfo(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex);
void SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
void SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
BOOLEAN SiS_SetCRT2Group(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo);
void SiS_SiS30xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
void SiS_SiS30xBLOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
@ -319,8 +317,6 @@ void SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
void SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempax);
USHORT SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempax);
void SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempax);
USHORT SiS_GetCH70xx(SiS_Private *SiS_Pr, USHORT tempax);
void SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax,USHORT tempbh);
#ifdef SIS315H
static void SiS_Chrontel701xOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);

View File

@ -4762,7 +4762,8 @@ static void __devinit sisfb_post_sis315330(struct pci_dev *pdev)
#endif
int __devinit sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
static int __devinit sisfb_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
struct sisfb_chip_info *chipinfo = &sisfb_chip_info[ent->driver_data];
struct sis_video_info *ivideo = NULL;
@ -5940,7 +5941,7 @@ MODULE_PARM_DESC(videoram,
#endif
#endif
int __devinit sisfb_init_module(void)
static int __devinit sisfb_init_module(void)
{
sisfb_setdefaultparms();

View File

@ -47,7 +47,7 @@ static struct file_operations bad_file_ops =
.get_unmapped_area = EIO_ERROR,
};
struct inode_operations bad_inode_ops =
static struct inode_operations bad_inode_ops =
{
.create = EIO_ERROR,
.lookup = EIO_ERROR,

View File

@ -1210,7 +1210,7 @@ grow_buffers(struct block_device *bdev, sector_t block, int size)
return 1;
}
struct buffer_head *
static struct buffer_head *
__getblk_slow(struct block_device *bdev, sector_t block, int size)
{
/* Size must be multiple of hard sectorsize */

View File

@ -328,7 +328,7 @@ void cd_forget(struct inode *inode)
spin_unlock(&cdev_lock);
}
void cdev_purge(struct cdev *cdev)
static void cdev_purge(struct cdev *cdev)
{
spin_lock(&cdev_lock);
while (!list_empty(&cdev->list)) {

View File

@ -39,7 +39,7 @@ int sysctl_vfs_cache_pressure = 100;
EXPORT_SYMBOL_GPL(sysctl_vfs_cache_pressure);
__cacheline_aligned_in_smp DEFINE_SPINLOCK(dcache_lock);
seqlock_t rename_lock __cacheline_aligned_in_smp = SEQLOCK_UNLOCKED;
static seqlock_t rename_lock __cacheline_aligned_in_smp = SEQLOCK_UNLOCKED;
EXPORT_SYMBOL(dcache_lock);

View File

@ -320,7 +320,7 @@ static struct super_block *eventpollfs_get_sb(struct file_system_type *fs_type,
/*
* This semaphore is used to serialize ep_free() and eventpoll_release_file().
*/
struct semaphore epsem;
static struct semaphore epsem;
/* Safe wake up implementation */
static struct poll_safewake psw;

View File

@ -197,7 +197,8 @@ static int count(char __user * __user * argv, int max)
* memory to free pages in kernel mem. These are in a format ready
* to be put directly into the top of new user memory.
*/
int copy_strings(int argc,char __user * __user * argv, struct linux_binprm *bprm)
static int copy_strings(int argc, char __user * __user * argv,
struct linux_binprm *bprm)
{
struct page *kmapped_page = NULL;
char *kaddr = NULL;

View File

@ -228,8 +228,10 @@ int jffs2_rubinmips_compress(unsigned char *data_in, unsigned char *cpage_out,
return rubin_do_compress(BIT_DIVIDER_MIPS, bits_mips, data_in, cpage_out, sourcelen, dstlen);
}
#endif
int jffs2_dynrubin_compress(unsigned char *data_in, unsigned char *cpage_out,
uint32_t *sourcelen, uint32_t *dstlen, void *model)
static int jffs2_dynrubin_compress(unsigned char *data_in,
unsigned char *cpage_out,
uint32_t *sourcelen, uint32_t *dstlen,
void *model)
{
int bits[8];
unsigned char histo[256];
@ -306,15 +308,19 @@ static void rubin_do_decompress(int bit_divider, int *bits, unsigned char *cdata
}
int jffs2_rubinmips_decompress(unsigned char *data_in, unsigned char *cpage_out,
uint32_t sourcelen, uint32_t dstlen, void *model)
static int jffs2_rubinmips_decompress(unsigned char *data_in,
unsigned char *cpage_out,
uint32_t sourcelen, uint32_t dstlen,
void *model)
{
rubin_do_decompress(BIT_DIVIDER_MIPS, bits_mips, data_in, cpage_out, sourcelen, dstlen);
return 0;
}
int jffs2_dynrubin_decompress(unsigned char *data_in, unsigned char *cpage_out,
uint32_t sourcelen, uint32_t dstlen, void *model)
static int jffs2_dynrubin_decompress(unsigned char *data_in,
unsigned char *cpage_out,
uint32_t sourcelen, uint32_t dstlen,
void *model)
{
int bits[8];
int c;

View File

@ -69,8 +69,10 @@ static void free_workspaces(void)
#define free_workspaces() do { } while(0)
#endif /* __KERNEL__ */
int jffs2_zlib_compress(unsigned char *data_in, unsigned char *cpage_out,
uint32_t *sourcelen, uint32_t *dstlen, void *model)
static int jffs2_zlib_compress(unsigned char *data_in,
unsigned char *cpage_out,
uint32_t *sourcelen, uint32_t *dstlen,
void *model)
{
int ret;
@ -135,8 +137,10 @@ int jffs2_zlib_compress(unsigned char *data_in, unsigned char *cpage_out,
return ret;
}
int jffs2_zlib_decompress(unsigned char *data_in, unsigned char *cpage_out,
uint32_t srclen, uint32_t destlen, void *model)
static int jffs2_zlib_decompress(unsigned char *data_in,
unsigned char *cpage_out,
uint32_t srclen, uint32_t destlen,
void *model)
{
int ret;
int wbits = MAX_WBITS;

View File

@ -406,12 +406,12 @@ static void lease_release_private_callback(struct file_lock *fl)
fl->fl_file->f_owner.signum = 0;
}
int lease_mylease_callback(struct file_lock *fl, struct file_lock *try)
static int lease_mylease_callback(struct file_lock *fl, struct file_lock *try)
{
return fl->fl_file == try->fl_file;
}
struct lock_manager_operations lease_manager_ops = {
static struct lock_manager_operations lease_manager_ops = {
.fl_break = lease_break_callback,
.fl_release_private = lease_release_private_callback,
.fl_mylease = lease_mylease_callback,
@ -1274,7 +1274,7 @@ int fcntl_getlease(struct file *filp)
*
* Called with kernel lock held.
*/
int __setlease(struct file *filp, long arg, struct file_lock **flp)
static int __setlease(struct file *filp, long arg, struct file_lock **flp)
{
struct file_lock *fl, **before, **my_before = NULL, *lease = *flp;
struct dentry *dentry = filp->f_dentry;

View File

@ -57,7 +57,7 @@
#define MB_CACHE_WRITER ((unsigned short)~0U >> 1)
DECLARE_WAIT_QUEUE_HEAD(mb_cache_queue);
static DECLARE_WAIT_QUEUE_HEAD(mb_cache_queue);
MODULE_AUTHOR("Andreas Gruenbacher <a.gruenbacher@computer.org>");
MODULE_DESCRIPTION("Meta block cache (for extended attributes)");

View File

@ -87,7 +87,7 @@ static int mpage_end_io_write(struct bio *bio, unsigned int bytes_done, int err)
return 0;
}
struct bio *mpage_bio_submit(int rw, struct bio *bio)
static struct bio *mpage_bio_submit(int rw, struct bio *bio)
{
bio->bi_end_io = mpage_end_io_read;
if (rw == WRITE)

View File

@ -2071,8 +2071,8 @@ exit:
* ->i_sem on parents, which works but leads to some truely excessive
* locking].
*/
int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
{
int error = 0;
struct inode *target;
@ -2116,8 +2116,8 @@ int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
return error;
}
int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
{
struct inode *target;
int error;

View File

@ -79,7 +79,7 @@ static ssize_t idmap_pipe_upcall(struct file *, struct rpc_pipe_msg *,
char __user *, size_t);
static ssize_t idmap_pipe_downcall(struct file *, const char __user *,
size_t);
void idmap_pipe_destroy_msg(struct rpc_pipe_msg *);
static void idmap_pipe_destroy_msg(struct rpc_pipe_msg *);
static unsigned int fnvhash32(const void *, size_t);
@ -434,7 +434,7 @@ out:
return ret;
}
void
static void
idmap_pipe_destroy_msg(struct rpc_pipe_msg *msg)
{
struct idmap_msg *im = msg->data;

View File

@ -1904,7 +1904,7 @@ static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
}
}
int nfs_init_inodecache(void)
static int nfs_init_inodecache(void)
{
nfs_inode_cachep = kmem_cache_create("nfs_inode_cache",
sizeof(struct nfs_inode),
@ -1916,7 +1916,7 @@ int nfs_init_inodecache(void)
return 0;
}
void nfs_destroy_inodecache(void)
static void nfs_destroy_inodecache(void)
{
if (kmem_cache_destroy(nfs_inode_cachep))
printk(KERN_INFO "nfs_inode_cache: not all structures were freed\n");

View File

@ -243,7 +243,7 @@ void unload_nls(struct nls_table *nls)
module_put(nls->owner);
}
wchar_t charset2uni[256] = {
static wchar_t charset2uni[256] = {
/* 0x00*/
0x0000, 0x0001, 0x0002, 0x0003,
0x0004, 0x0005, 0x0006, 0x0007,

View File

@ -55,7 +55,8 @@ struct poll_table_page {
* as all select/poll functions have to call it to add an entry to the
* poll table.
*/
void __pollwait(struct file *filp, wait_queue_head_t *wait_address, poll_table *p);
static void __pollwait(struct file *filp, wait_queue_head_t *wait_address,
poll_table *p);
void poll_initwait(struct poll_wqueues *pwq)
{
@ -87,7 +88,8 @@ void poll_freewait(struct poll_wqueues *pwq)
EXPORT_SYMBOL(poll_freewait);
void __pollwait(struct file *filp, wait_queue_head_t *wait_address, poll_table *_p)
static void __pollwait(struct file *filp, wait_queue_head_t *wait_address,
poll_table *_p)
{
struct poll_wqueues *p = container_of(_p, struct poll_wqueues, pt);
struct poll_table_page *table = p->table;

View File

@ -257,7 +257,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
return 0;
}
struct fd_routine_l {
static struct fd_routine_l {
int (*_request_dma)(unsigned int dmanr, const char * device_id);
void (*_free_dma)(unsigned int dmanr);
int (*_get_dma_residue)(unsigned int dummy);

View File

@ -235,7 +235,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
return 0;
}
struct fd_routine_l {
static struct fd_routine_l {
int (*_request_dma)(unsigned int dmanr, const char * device_id);
void (*_free_dma)(unsigned int dmanr);
int (*_get_dma_residue)(unsigned int dummy);

View File

@ -227,7 +227,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
return 0;
}
struct fd_routine_l {
static struct fd_routine_l {
int (*_request_dma)(unsigned int dmanr, const char * device_id);
void (*_free_dma)(unsigned int dmanr);
int (*_get_dma_residue)(unsigned int dummy);

View File

@ -223,7 +223,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
return 0;
}
struct fd_routine_l {
static struct fd_routine_l {
int (*_request_dma)(unsigned int dmanr, const char * device_id);
void (*_free_dma)(unsigned int dmanr);
int (*_get_dma_residue)(unsigned int dummy);

View File

@ -77,7 +77,6 @@ extern int flush_old_exec(struct linux_binprm * bprm);
extern int setup_arg_pages(struct linux_binprm * bprm,
unsigned long stack_top,
int executable_stack);
extern int copy_strings(int argc,char __user * __user * argv,struct linux_binprm *bprm);
extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
extern void compute_creds(struct linux_binprm *binprm);
extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);