Skip to content

Commit

Permalink
ext4: Fix whitespace checkpatch warnings/errors
Browse files Browse the repository at this point in the history
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Theodore Ts'o committed Sep 9, 2008
1 parent e5f8eab commit af5bc92
Show file tree
Hide file tree
Showing 18 changed files with 350 additions and 350 deletions.
6 changes: 3 additions & 3 deletions fs/ext4/acl.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ static inline int ext4_acl_count(size_t size)
#define EXT4_ACL_NOT_CACHED ((void *)-1)

/* acl.c */
extern int ext4_permission (struct inode *, int);
extern int ext4_acl_chmod (struct inode *);
extern int ext4_init_acl (handle_t *, struct inode *, struct inode *);
extern int ext4_permission(struct inode *, int);
extern int ext4_acl_chmod(struct inode *);
extern int ext4_init_acl(handle_t *, struct inode *, struct inode *);

#else /* CONFIG_EXT4DEV_FS_POSIX_ACL */
#include <linux/sched.h>
Expand Down
70 changes: 35 additions & 35 deletions fs/ext4/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
*/
group_blocks = ext4_blocks_count(sbi->s_es) -
le32_to_cpu(sbi->s_es->s_first_data_block) -
(EXT4_BLOCKS_PER_GROUP(sb) * (sbi->s_groups_count -1));
(EXT4_BLOCKS_PER_GROUP(sb) * (sbi->s_groups_count - 1));
} else {
group_blocks = EXT4_BLOCKS_PER_GROUP(sb);
}
Expand Down Expand Up @@ -200,20 +200,20 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
* @bh: pointer to the buffer head to store the block
* group descriptor
*/
struct ext4_group_desc * ext4_get_group_desc(struct super_block * sb,
struct ext4_group_desc * ext4_get_group_desc(struct super_block *sb,
ext4_group_t block_group,
struct buffer_head ** bh)
struct buffer_head **bh)
{
unsigned long group_desc;
unsigned long offset;
struct ext4_group_desc * desc;
struct ext4_group_desc *desc;
struct ext4_sb_info *sbi = EXT4_SB(sb);

if (block_group >= sbi->s_groups_count) {
ext4_error (sb, "ext4_get_group_desc",
"block_group >= groups_count - "
"block_group = %lu, groups_count = %lu",
block_group, sbi->s_groups_count);
ext4_error(sb, "ext4_get_group_desc",
"block_group >= groups_count - "
"block_group = %lu, groups_count = %lu",
block_group, sbi->s_groups_count);

return NULL;
}
Expand All @@ -222,10 +222,10 @@ struct ext4_group_desc * ext4_get_group_desc(struct super_block * sb,
group_desc = block_group >> EXT4_DESC_PER_BLOCK_BITS(sb);
offset = block_group & (EXT4_DESC_PER_BLOCK(sb) - 1);
if (!sbi->s_group_desc[group_desc]) {
ext4_error (sb, "ext4_get_group_desc",
"Group descriptor not loaded - "
"block_group = %lu, group_desc = %lu, desc = %lu",
block_group, group_desc, offset);
ext4_error(sb, "ext4_get_group_desc",
"Group descriptor not loaded - "
"block_group = %lu, group_desc = %lu, desc = %lu",
block_group, group_desc, offset);
return NULL;
}

Expand Down Expand Up @@ -302,8 +302,8 @@ static int ext4_valid_block_bitmap(struct super_block *sb,
struct buffer_head *
ext4_read_block_bitmap(struct super_block *sb, ext4_group_t block_group)
{
struct ext4_group_desc * desc;
struct buffer_head * bh = NULL;
struct ext4_group_desc *desc;
struct buffer_head *bh = NULL;
ext4_fsblk_t bitmap_blk;

desc = ext4_get_group_desc(sb, block_group, NULL);
Expand Down Expand Up @@ -506,8 +506,8 @@ void ext4_rsv_window_add(struct super_block *sb,
struct rb_node *node = &rsv->rsv_node;
ext4_fsblk_t start = rsv->rsv_start;

struct rb_node ** p = &root->rb_node;
struct rb_node * parent = NULL;
struct rb_node **p = &root->rb_node;
struct rb_node *parent = NULL;
struct ext4_reserve_window_node *this;

while (*p)
Expand Down Expand Up @@ -661,8 +661,8 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
ext4_grpblk_t bit;
unsigned long i;
unsigned long overflow;
struct ext4_group_desc * desc;
struct ext4_super_block * es;
struct ext4_group_desc *desc;
struct ext4_super_block *es;
struct ext4_sb_info *sbi;
int err = 0, ret;
ext4_grpblk_t group_freed;
Expand All @@ -673,13 +673,13 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
if (block < le32_to_cpu(es->s_first_data_block) ||
block + count < block ||
block + count > ext4_blocks_count(es)) {
ext4_error (sb, "ext4_free_blocks",
"Freeing blocks not in datazone - "
"block = %llu, count = %lu", block, count);
ext4_error(sb, "ext4_free_blocks",
"Freeing blocks not in datazone - "
"block = %llu, count = %lu", block, count);
goto error_return;
}

ext4_debug ("freeing block(s) %llu-%llu\n", block, block + count - 1);
ext4_debug("freeing block(s) %llu-%llu\n", block, block + count - 1);

do_more:
overflow = 0;
Expand All @@ -696,7 +696,7 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
bitmap_bh = ext4_read_block_bitmap(sb, block_group);
if (!bitmap_bh)
goto error_return;
desc = ext4_get_group_desc (sb, block_group, &gd_bh);
desc = ext4_get_group_desc(sb, block_group, &gd_bh);
if (!desc)
goto error_return;

Expand All @@ -705,10 +705,10 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
in_range(block, ext4_inode_table(sb, desc), sbi->s_itb_per_group) ||
in_range(block + count - 1, ext4_inode_table(sb, desc),
sbi->s_itb_per_group)) {
ext4_error (sb, "ext4_free_blocks",
"Freeing blocks in system zones - "
"Block = %llu, count = %lu",
block, count);
ext4_error(sb, "ext4_free_blocks",
"Freeing blocks in system zones - "
"Block = %llu, count = %lu",
block, count);
goto error_return;
}

Expand Down Expand Up @@ -850,7 +850,7 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
ext4_fsblk_t block, unsigned long count,
int metadata)
{
struct super_block * sb;
struct super_block *sb;
unsigned long dquot_freed_blocks;

/* this isn't the right place to decide whether block is metadata
Expand Down Expand Up @@ -1019,7 +1019,7 @@ claim_block(spinlock_t *lock, ext4_grpblk_t block, struct buffer_head *bh)
if (ext4_set_bit_atomic(lock, block, bh->b_data))
return 0;
jbd_lock_bh_state(bh);
if (jh->b_committed_data && ext4_test_bit(block,jh->b_committed_data)) {
if (jh->b_committed_data && ext4_test_bit(block, jh->b_committed_data)) {
ext4_clear_bit_atomic(lock, block, bh->b_data);
ret = 0;
} else {
Expand Down Expand Up @@ -1170,7 +1170,7 @@ ext4_try_to_allocate(struct super_block *sb, handle_t *handle,
static int find_next_reservable_window(
struct ext4_reserve_window_node *search_head,
struct ext4_reserve_window_node *my_rsv,
struct super_block * sb,
struct super_block *sb,
ext4_fsblk_t start_block,
ext4_fsblk_t last_block)
{
Expand Down Expand Up @@ -1204,7 +1204,7 @@ static int find_next_reservable_window(

prev = rsv;
next = rb_next(&rsv->rsv_node);
rsv = rb_entry(next,struct ext4_reserve_window_node,rsv_node);
rsv = rb_entry(next, struct ext4_reserve_window_node, rsv_node);

/*
* Reached the last reservation, we can just append to the
Expand Down Expand Up @@ -1342,7 +1342,7 @@ static int alloc_new_reservation(struct ext4_reserve_window_node *my_rsv,
size = size * 2;
if (size > EXT4_MAX_RESERVE_BLOCKS)
size = EXT4_MAX_RESERVE_BLOCKS;
my_rsv->rsv_goal_size= size;
my_rsv->rsv_goal_size = size;
}
}

Expand Down Expand Up @@ -1491,7 +1491,7 @@ static ext4_grpblk_t
ext4_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle,
ext4_group_t group, struct buffer_head *bitmap_bh,
ext4_grpblk_t grp_goal,
struct ext4_reserve_window_node * my_rsv,
struct ext4_reserve_window_node *my_rsv,
unsigned long *count, int *errp)
{
ext4_fsblk_t group_first_block, group_last_block;
Expand Down Expand Up @@ -1519,7 +1519,7 @@ ext4_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle,
* or the file is not a regular file
* or last attempt to allocate a block with reservation turned on failed
*/
if (my_rsv == NULL ) {
if (my_rsv == NULL) {
ret = ext4_try_to_allocate(sb, handle, group, bitmap_bh,
grp_goal, count, NULL);
goto out;
Expand Down Expand Up @@ -2184,7 +2184,7 @@ unsigned long ext4_bg_num_gdb(struct super_block *sb, ext4_group_t group)

if (!EXT4_HAS_INCOMPAT_FEATURE(sb,EXT4_FEATURE_INCOMPAT_META_BG) ||
metagroup < first_meta_bg)
return ext4_bg_num_gdb_nometa(sb,group);
return ext4_bg_num_gdb_nometa(sb, group);

return ext4_bg_num_gdb_meta(sb,group);

Expand Down
6 changes: 3 additions & 3 deletions fs/ext4/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@

static const int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};

unsigned long ext4_count_free (struct buffer_head * map, unsigned int numchars)
unsigned long ext4_count_free(struct buffer_head *map, unsigned int numchars)
{
unsigned int i;
unsigned long sum = 0;

if (!map)
return (0);
return 0;
for (i = 0; i < numchars; i++)
sum += nibblemap[map->b_data[i] & 0xf] +
nibblemap[(map->b_data[i] >> 4) & 0xf];
return (sum);
return sum;
}

#endif /* EXT4FS_DEBUG */
Expand Down
52 changes: 26 additions & 26 deletions fs/ext4/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ static unsigned char ext4_filetype_table[] = {
};

static int ext4_readdir(struct file *, void *, filldir_t);
static int ext4_dx_readdir(struct file * filp,
void * dirent, filldir_t filldir);
static int ext4_release_dir (struct inode * inode,
struct file * filp);
static int ext4_dx_readdir(struct file *filp,
void *dirent, filldir_t filldir);
static int ext4_release_dir(struct inode *inode,
struct file *filp);

const struct file_operations ext4_dir_operations = {
.llseek = generic_file_llseek,
Expand All @@ -61,12 +61,12 @@ static unsigned char get_dtype(struct super_block *sb, int filetype)
}


int ext4_check_dir_entry (const char * function, struct inode * dir,
struct ext4_dir_entry_2 * de,
struct buffer_head * bh,
unsigned long offset)
int ext4_check_dir_entry(const char *function, struct inode *dir,
struct ext4_dir_entry_2 *de,
struct buffer_head *bh,
unsigned long offset)
{
const char * error_msg = NULL;
const char *error_msg = NULL;
const int rlen = ext4_rec_len_from_disk(de->rec_len);

if (rlen < EXT4_DIR_REC_LEN(1))
Expand All @@ -82,7 +82,7 @@ int ext4_check_dir_entry (const char * function, struct inode * dir,
error_msg = "inode out of bounds";

if (error_msg != NULL)
ext4_error (dir->i_sb, function,
ext4_error(dir->i_sb, function,
"bad entry in directory #%lu: %s - "
"offset=%lu, inode=%lu, rec_len=%d, name_len=%d",
dir->i_ino, error_msg, offset,
Expand All @@ -91,8 +91,8 @@ int ext4_check_dir_entry (const char * function, struct inode * dir,
return error_msg == NULL ? 1 : 0;
}

static int ext4_readdir(struct file * filp,
void * dirent, filldir_t filldir)
static int ext4_readdir(struct file *filp,
void *dirent, filldir_t filldir)
{
int error = 0;
unsigned long offset;
Expand Down Expand Up @@ -148,7 +148,7 @@ static int ext4_readdir(struct file * filp,
* of recovering data when there's a bad sector
*/
if (!bh) {
ext4_error (sb, "ext4_readdir",
ext4_error(sb, "ext4_readdir",
"directory #%lu contains a hole at offset %lu",
inode->i_ino, (unsigned long)filp->f_pos);
/* corrupt size? Maybe no more blocks to read */
Expand Down Expand Up @@ -187,14 +187,14 @@ static int ext4_readdir(struct file * filp,
while (!error && filp->f_pos < inode->i_size
&& offset < sb->s_blocksize) {
de = (struct ext4_dir_entry_2 *) (bh->b_data + offset);
if (!ext4_check_dir_entry ("ext4_readdir", inode, de,
bh, offset)) {
if (!ext4_check_dir_entry("ext4_readdir", inode, de,
bh, offset)) {
/*
* On error, skip the f_pos to the next block
*/
filp->f_pos = (filp->f_pos |
(sb->s_blocksize - 1)) + 1;
brelse (bh);
brelse(bh);
ret = stored;
goto out;
}
Expand All @@ -218,12 +218,12 @@ static int ext4_readdir(struct file * filp,
break;
if (version != filp->f_version)
goto revalidate;
stored ++;
stored++;
}
filp->f_pos += ext4_rec_len_from_disk(de->rec_len);
}
offset = 0;
brelse (bh);
brelse(bh);
}
out:
return ret;
Expand Down Expand Up @@ -290,9 +290,9 @@ static void free_rb_tree_fname(struct rb_root *root)
parent = rb_parent(n);
fname = rb_entry(n, struct fname, rb_hash);
while (fname) {
struct fname * old = fname;
struct fname *old = fname;
fname = fname->next;
kfree (old);
kfree(old);
}
if (!parent)
root->rb_node = NULL;
Expand Down Expand Up @@ -331,7 +331,7 @@ int ext4_htree_store_dirent(struct file *dir_file, __u32 hash,
struct ext4_dir_entry_2 *dirent)
{
struct rb_node **p, *parent = NULL;
struct fname * fname, *new_fn;
struct fname *fname, *new_fn;
struct dir_private_info *info;
int len;

Expand Down Expand Up @@ -388,13 +388,13 @@ int ext4_htree_store_dirent(struct file *dir_file, __u32 hash,
* for all entres on the fname linked list. (Normally there is only
* one entry on the linked list, unless there are 62 bit hash collisions.)
*/
static int call_filldir(struct file * filp, void * dirent,
static int call_filldir(struct file *filp, void *dirent,
filldir_t filldir, struct fname *fname)
{
struct dir_private_info *info = filp->private_data;
loff_t curr_pos;
struct inode *inode = filp->f_path.dentry->d_inode;
struct super_block * sb;
struct super_block *sb;
int error;

sb = inode->i_sb;
Expand All @@ -420,8 +420,8 @@ static int call_filldir(struct file * filp, void * dirent,
return 0;
}

static int ext4_dx_readdir(struct file * filp,
void * dirent, filldir_t filldir)
static int ext4_dx_readdir(struct file *filp,
void *dirent, filldir_t filldir)
{
struct dir_private_info *info = filp->private_data;
struct inode *inode = filp->f_path.dentry->d_inode;
Expand Down Expand Up @@ -512,7 +512,7 @@ static int ext4_dx_readdir(struct file * filp,
return 0;
}

static int ext4_release_dir (struct inode * inode, struct file * filp)
static int ext4_release_dir(struct inode *inode, struct file *filp)
{
if (filp->private_data)
ext4_htree_free_dir_info(filp->private_data);
Expand Down
Loading

0 comments on commit af5bc92

Please sign in to comment.