Commit 9cf89014 authored by Randy Dunlap's avatar Randy Dunlap Committed by Greg Kroah-Hartman

[PATCH] don't init statics to 0 (fs/)

From: Leann Ogasawara <ogasawara@osdl.org>

Uninitialize static variables initialized to 0 so they are pushed to the
.bss instead of .data.
parent ae87487b
......@@ -43,7 +43,7 @@ static DECLARE_MUTEX(read_mutex);
static struct inode *get_cramfs_inode(struct super_block *sb, struct cramfs_inode * cramfs_inode)
{
struct inode * inode = new_inode(sb);
static struct timespec zerotime = { 0, 0 };
static struct timespec zerotime;
if (inode) {
inode->i_mode = cramfs_inode->mode;
......
......@@ -106,7 +106,7 @@ void ext2_discard_prealloc (struct inode * inode)
static int ext2_alloc_block (struct inode * inode, unsigned long goal, int *err)
{
#ifdef EXT2FS_DEBUG
static unsigned long alloc_hits = 0, alloc_attempts = 0;
static unsigned long alloc_hits, alloc_attempts;
#endif
unsigned long result;
......
......@@ -498,7 +498,7 @@ ext3_new_block(handle_t *handle, struct inode *inode, unsigned long goal,
struct ext3_super_block *es;
struct ext3_sb_info *sbi;
#ifdef EXT3FS_DEBUG
static int goal_hits = 0, goal_attempts = 0;
static int goal_hits, goal_attempts;
#endif
*errp = -ENOSPC;
sb = inode->i_sb;
......
......@@ -267,7 +267,7 @@ static int ext3_alloc_block (handle_t *handle,
#ifdef EXT3_PREALLOCATE
#ifdef EXT3FS_DEBUG
static unsigned long alloc_hits = 0, alloc_attempts = 0;
static unsigned long alloc_hits, alloc_attempts;
#endif
struct ext3_inode_info *ei = EXT3_I(inode);
/* Writer: ->i_prealloc* */
......
......@@ -61,7 +61,7 @@ static inline void file_free(struct file *f)
*/
struct file *get_empty_filp(void)
{
static int old_max = 0;
static int old_max;
struct file * f;
/*
......
......@@ -686,7 +686,7 @@ static inline unsigned long hash(struct super_block *sb, unsigned long hashval)
ino_t iunique(struct super_block *sb, ino_t max_reserved)
{
static ino_t counter = 0;
static ino_t counter;
struct inode *inode;
struct hlist_head * head;
ino_t res;
......
......@@ -82,7 +82,7 @@ static inline void presto_unlock(struct inode *dir)
* these are initialized in super.c
*/
extern int presto_permission(struct inode *inode, int mask, struct nameidata *nd);
static int izo_authorized_uid = 0;
static int izo_authorized_uid;
int izo_dentry_is_ilookup(struct dentry *dentry, ino_t *id,
unsigned int *generation)
......
......@@ -51,7 +51,7 @@ struct proc_dir_entry *jffs_proc_root;
* Linked list of 'jffs_partition_dirs' to help us track
* the mounted JFFS partitions in the system
*/
static struct jffs_partition_dir *jffs_part_dirs = 0;
static struct jffs_partition_dir *jffs_part_dirs;
/*
* Read functions for entries
......
......@@ -196,7 +196,7 @@ lockd(struct svc_rqst *rqstp)
int
lockd_up(void)
{
static int warned = 0;
static int warned;
struct svc_serv * serv;
int error = 0;
......@@ -267,7 +267,7 @@ lockd_up(void)
void
lockd_down(void)
{
static int warned = 0;
static int warned;
down(&nlmsvc_sema);
if (nlmsvc_users) {
......
......@@ -53,9 +53,9 @@
/* Globals */
time_t boot_time;
static u32 current_clientid = 1;
static u32 current_ownerid = 0;
static u32 current_fileid = 0;
static u32 nfs4_init = 0;
static u32 current_ownerid;
static u32 current_fileid;
static u32 nfs4_init;
stateid_t zerostateid; /* bits all 0 */
stateid_t onestateid; /* bits all 1 */
......
......@@ -761,7 +761,7 @@ nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
if (err >= 0 && stable) {
static ino_t last_ino;
static dev_t last_dev = 0;
static dev_t last_dev;
/*
* Gathered writes: If another process is currently
......
......@@ -33,7 +33,7 @@
#include "sysctl.h"
/* Number of mounted file systems which have compression enabled. */
static unsigned long ntfs_nr_compression_users = 0;
static unsigned long ntfs_nr_compression_users;
/* Error constants/strings used in inode.c::ntfs_show_options(). */
typedef enum {
......
......@@ -44,13 +44,13 @@ typedef struct {
char name[8];
} openprom_property;
static openpromfs_node *nodes = NULL;
static int alloced = 0;
static u16 last_node = 0;
static u16 first_prop = 0;
static openpromfs_node *nodes;
static int alloced;
static u16 last_node;
static u16 first_prop;
static u16 options = 0xffff;
static u16 aliases = 0xffff;
static int aliases_nodes = 0;
static int aliases_nodes;
static char *alias_names [ALIASES_NNODES];
#define OPENPROM_ROOT_INO 16
......
......@@ -64,7 +64,7 @@
/* the number of mounted filesystems. This is used to decide when to
** start and kill the commit workqueue
*/
static int reiserfs_mounted_fs_count = 0 ;
static int reiserfs_mounted_fs_count;
static struct workqueue_struct *commit_wq;
......@@ -113,7 +113,7 @@ static int reiserfs_clean_and_file_buffer(struct buffer_head *bh) {
static struct reiserfs_bitmap_node *
allocate_bitmap_node(struct super_block *p_s_sb) {
struct reiserfs_bitmap_node *bn ;
static int id = 0 ;
static int id;
bn = reiserfs_kmalloc(sizeof(struct reiserfs_bitmap_node), GFP_NOFS, p_s_sb) ;
if (!bn) {
......
......@@ -194,7 +194,7 @@ static int smb_setup_trans2request(struct smb_request *req)
{
struct smb_sb_info *server = req->rq_server;
int mparam, mdata;
static unsigned char padding[4] = { 0, };
static unsigned char padding[4];
/* I know the following is very ugly, but I want to build the
smb packet as efficiently as possible. */
......
......@@ -178,7 +178,7 @@ int umsdos_parse (
* So it serves both as a flag and as a translator.
*/
static char lkp[256];
static char is_init = 0;
static char is_init;
if (!is_init) {
/*
......
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