Skip to content

Commit af5bc92

Browse files
committed
ext4: Fix whitespace checkpatch warnings/errors
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
1 parent e5f8eab commit af5bc92

18 files changed

Lines changed: 350 additions & 350 deletions

File tree

‎fs/ext4/acl.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ static inline int ext4_acl_count(size_t size)
5858
#define EXT4_ACL_NOT_CACHED ((void *)-1)
5959

6060
/* acl.c */
61-
extern int ext4_permission (struct inode *, int);
62-
extern int ext4_acl_chmod (struct inode *);
63-
extern int ext4_init_acl (handle_t *, struct inode *, struct inode *);
61+
extern int ext4_permission(struct inode *, int);
62+
extern int ext4_acl_chmod(struct inode *);
63+
extern int ext4_init_acl(handle_t *, struct inode *, struct inode *);
6464

6565
#else /* CONFIG_EXT4DEV_FS_POSIX_ACL */
6666
#include <linux/sched.h>

‎fs/ext4/balloc.c‎

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
132132
*/
133133
group_blocks = ext4_blocks_count(sbi->s_es) -
134134
le32_to_cpu(sbi->s_es->s_first_data_block) -
135-
(EXT4_BLOCKS_PER_GROUP(sb) * (sbi->s_groups_count -1));
135+
(EXT4_BLOCKS_PER_GROUP(sb) * (sbi->s_groups_count - 1));
136136
} else {
137137
group_blocks = EXT4_BLOCKS_PER_GROUP(sb);
138138
}
@@ -200,20 +200,20 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
200200
* @bh: pointer to the buffer head to store the block
201201
* group descriptor
202202
*/
203-
struct ext4_group_desc * ext4_get_group_desc(struct super_block * sb,
203+
struct ext4_group_desc * ext4_get_group_desc(struct super_block *sb,
204204
ext4_group_t block_group,
205-
struct buffer_head ** bh)
205+
struct buffer_head **bh)
206206
{
207207
unsigned long group_desc;
208208
unsigned long offset;
209-
struct ext4_group_desc * desc;
209+
struct ext4_group_desc *desc;
210210
struct ext4_sb_info *sbi = EXT4_SB(sb);
211211

212212
if (block_group >= sbi->s_groups_count) {
213-
ext4_error (sb, "ext4_get_group_desc",
214-
"block_group >= groups_count - "
215-
"block_group = %lu, groups_count = %lu",
216-
block_group, sbi->s_groups_count);
213+
ext4_error(sb, "ext4_get_group_desc",
214+
"block_group >= groups_count - "
215+
"block_group = %lu, groups_count = %lu",
216+
block_group, sbi->s_groups_count);
217217

218218
return NULL;
219219
}
@@ -222,10 +222,10 @@ struct ext4_group_desc * ext4_get_group_desc(struct super_block * sb,
222222
group_desc = block_group >> EXT4_DESC_PER_BLOCK_BITS(sb);
223223
offset = block_group & (EXT4_DESC_PER_BLOCK(sb) - 1);
224224
if (!sbi->s_group_desc[group_desc]) {
225-
ext4_error (sb, "ext4_get_group_desc",
226-
"Group descriptor not loaded - "
227-
"block_group = %lu, group_desc = %lu, desc = %lu",
228-
block_group, group_desc, offset);
225+
ext4_error(sb, "ext4_get_group_desc",
226+
"Group descriptor not loaded - "
227+
"block_group = %lu, group_desc = %lu, desc = %lu",
228+
block_group, group_desc, offset);
229229
return NULL;
230230
}
231231

@@ -302,8 +302,8 @@ static int ext4_valid_block_bitmap(struct super_block *sb,
302302
struct buffer_head *
303303
ext4_read_block_bitmap(struct super_block *sb, ext4_group_t block_group)
304304
{
305-
struct ext4_group_desc * desc;
306-
struct buffer_head * bh = NULL;
305+
struct ext4_group_desc *desc;
306+
struct buffer_head *bh = NULL;
307307
ext4_fsblk_t bitmap_blk;
308308

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

509-
struct rb_node ** p = &root->rb_node;
510-
struct rb_node * parent = NULL;
509+
struct rb_node **p = &root->rb_node;
510+
struct rb_node *parent = NULL;
511511
struct ext4_reserve_window_node *this;
512512

513513
while (*p)
@@ -661,8 +661,8 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
661661
ext4_grpblk_t bit;
662662
unsigned long i;
663663
unsigned long overflow;
664-
struct ext4_group_desc * desc;
665-
struct ext4_super_block * es;
664+
struct ext4_group_desc *desc;
665+
struct ext4_super_block *es;
666666
struct ext4_sb_info *sbi;
667667
int err = 0, ret;
668668
ext4_grpblk_t group_freed;
@@ -673,13 +673,13 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
673673
if (block < le32_to_cpu(es->s_first_data_block) ||
674674
block + count < block ||
675675
block + count > ext4_blocks_count(es)) {
676-
ext4_error (sb, "ext4_free_blocks",
677-
"Freeing blocks not in datazone - "
678-
"block = %llu, count = %lu", block, count);
676+
ext4_error(sb, "ext4_free_blocks",
677+
"Freeing blocks not in datazone - "
678+
"block = %llu, count = %lu", block, count);
679679
goto error_return;
680680
}
681681

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

684684
do_more:
685685
overflow = 0;
@@ -696,7 +696,7 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
696696
bitmap_bh = ext4_read_block_bitmap(sb, block_group);
697697
if (!bitmap_bh)
698698
goto error_return;
699-
desc = ext4_get_group_desc (sb, block_group, &gd_bh);
699+
desc = ext4_get_group_desc(sb, block_group, &gd_bh);
700700
if (!desc)
701701
goto error_return;
702702

@@ -705,10 +705,10 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
705705
in_range(block, ext4_inode_table(sb, desc), sbi->s_itb_per_group) ||
706706
in_range(block + count - 1, ext4_inode_table(sb, desc),
707707
sbi->s_itb_per_group)) {
708-
ext4_error (sb, "ext4_free_blocks",
709-
"Freeing blocks in system zones - "
710-
"Block = %llu, count = %lu",
711-
block, count);
708+
ext4_error(sb, "ext4_free_blocks",
709+
"Freeing blocks in system zones - "
710+
"Block = %llu, count = %lu",
711+
block, count);
712712
goto error_return;
713713
}
714714

@@ -850,7 +850,7 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
850850
ext4_fsblk_t block, unsigned long count,
851851
int metadata)
852852
{
853-
struct super_block * sb;
853+
struct super_block *sb;
854854
unsigned long dquot_freed_blocks;
855855

856856
/* this isn't the right place to decide whether block is metadata
@@ -1019,7 +1019,7 @@ claim_block(spinlock_t *lock, ext4_grpblk_t block, struct buffer_head *bh)
10191019
if (ext4_set_bit_atomic(lock, block, bh->b_data))
10201020
return 0;
10211021
jbd_lock_bh_state(bh);
1022-
if (jh->b_committed_data && ext4_test_bit(block,jh->b_committed_data)) {
1022+
if (jh->b_committed_data && ext4_test_bit(block, jh->b_committed_data)) {
10231023
ext4_clear_bit_atomic(lock, block, bh->b_data);
10241024
ret = 0;
10251025
} else {
@@ -1170,7 +1170,7 @@ ext4_try_to_allocate(struct super_block *sb, handle_t *handle,
11701170
static int find_next_reservable_window(
11711171
struct ext4_reserve_window_node *search_head,
11721172
struct ext4_reserve_window_node *my_rsv,
1173-
struct super_block * sb,
1173+
struct super_block *sb,
11741174
ext4_fsblk_t start_block,
11751175
ext4_fsblk_t last_block)
11761176
{
@@ -1204,7 +1204,7 @@ static int find_next_reservable_window(
12041204

12051205
prev = rsv;
12061206
next = rb_next(&rsv->rsv_node);
1207-
rsv = rb_entry(next,struct ext4_reserve_window_node,rsv_node);
1207+
rsv = rb_entry(next, struct ext4_reserve_window_node, rsv_node);
12081208

12091209
/*
12101210
* Reached the last reservation, we can just append to the
@@ -1342,7 +1342,7 @@ static int alloc_new_reservation(struct ext4_reserve_window_node *my_rsv,
13421342
size = size * 2;
13431343
if (size > EXT4_MAX_RESERVE_BLOCKS)
13441344
size = EXT4_MAX_RESERVE_BLOCKS;
1345-
my_rsv->rsv_goal_size= size;
1345+
my_rsv->rsv_goal_size = size;
13461346
}
13471347
}
13481348

@@ -1491,7 +1491,7 @@ static ext4_grpblk_t
14911491
ext4_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle,
14921492
ext4_group_t group, struct buffer_head *bitmap_bh,
14931493
ext4_grpblk_t grp_goal,
1494-
struct ext4_reserve_window_node * my_rsv,
1494+
struct ext4_reserve_window_node *my_rsv,
14951495
unsigned long *count, int *errp)
14961496
{
14971497
ext4_fsblk_t group_first_block, group_last_block;
@@ -1519,7 +1519,7 @@ ext4_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle,
15191519
* or the file is not a regular file
15201520
* or last attempt to allocate a block with reservation turned on failed
15211521
*/
1522-
if (my_rsv == NULL ) {
1522+
if (my_rsv == NULL) {
15231523
ret = ext4_try_to_allocate(sb, handle, group, bitmap_bh,
15241524
grp_goal, count, NULL);
15251525
goto out;
@@ -2184,7 +2184,7 @@ unsigned long ext4_bg_num_gdb(struct super_block *sb, ext4_group_t group)
21842184

21852185
if (!EXT4_HAS_INCOMPAT_FEATURE(sb,EXT4_FEATURE_INCOMPAT_META_BG) ||
21862186
metagroup < first_meta_bg)
2187-
return ext4_bg_num_gdb_nometa(sb,group);
2187+
return ext4_bg_num_gdb_nometa(sb, group);
21882188

21892189
return ext4_bg_num_gdb_meta(sb,group);
21902190

‎fs/ext4/bitmap.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515

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

18-
unsigned long ext4_count_free (struct buffer_head * map, unsigned int numchars)
18+
unsigned long ext4_count_free(struct buffer_head *map, unsigned int numchars)
1919
{
2020
unsigned int i;
2121
unsigned long sum = 0;
2222

2323
if (!map)
24-
return (0);
24+
return 0;
2525
for (i = 0; i < numchars; i++)
2626
sum += nibblemap[map->b_data[i] & 0xf] +
2727
nibblemap[(map->b_data[i] >> 4) & 0xf];
28-
return (sum);
28+
return sum;
2929
}
3030

3131
#endif /* EXT4FS_DEBUG */

‎fs/ext4/dir.c‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ static unsigned char ext4_filetype_table[] = {
3333
};
3434

3535
static int ext4_readdir(struct file *, void *, filldir_t);
36-
static int ext4_dx_readdir(struct file * filp,
37-
void * dirent, filldir_t filldir);
38-
static int ext4_release_dir (struct inode * inode,
39-
struct file * filp);
36+
static int ext4_dx_readdir(struct file *filp,
37+
void *dirent, filldir_t filldir);
38+
static int ext4_release_dir(struct inode *inode,
39+
struct file *filp);
4040

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

6363

64-
int ext4_check_dir_entry (const char * function, struct inode * dir,
65-
struct ext4_dir_entry_2 * de,
66-
struct buffer_head * bh,
67-
unsigned long offset)
64+
int ext4_check_dir_entry(const char *function, struct inode *dir,
65+
struct ext4_dir_entry_2 *de,
66+
struct buffer_head *bh,
67+
unsigned long offset)
6868
{
69-
const char * error_msg = NULL;
69+
const char *error_msg = NULL;
7070
const int rlen = ext4_rec_len_from_disk(de->rec_len);
7171

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

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

94-
static int ext4_readdir(struct file * filp,
95-
void * dirent, filldir_t filldir)
94+
static int ext4_readdir(struct file *filp,
95+
void *dirent, filldir_t filldir)
9696
{
9797
int error = 0;
9898
unsigned long offset;
@@ -148,7 +148,7 @@ static int ext4_readdir(struct file * filp,
148148
* of recovering data when there's a bad sector
149149
*/
150150
if (!bh) {
151-
ext4_error (sb, "ext4_readdir",
151+
ext4_error(sb, "ext4_readdir",
152152
"directory #%lu contains a hole at offset %lu",
153153
inode->i_ino, (unsigned long)filp->f_pos);
154154
/* corrupt size? Maybe no more blocks to read */
@@ -187,14 +187,14 @@ static int ext4_readdir(struct file * filp,
187187
while (!error && filp->f_pos < inode->i_size
188188
&& offset < sb->s_blocksize) {
189189
de = (struct ext4_dir_entry_2 *) (bh->b_data + offset);
190-
if (!ext4_check_dir_entry ("ext4_readdir", inode, de,
191-
bh, offset)) {
190+
if (!ext4_check_dir_entry("ext4_readdir", inode, de,
191+
bh, offset)) {
192192
/*
193193
* On error, skip the f_pos to the next block
194194
*/
195195
filp->f_pos = (filp->f_pos |
196196
(sb->s_blocksize - 1)) + 1;
197-
brelse (bh);
197+
brelse(bh);
198198
ret = stored;
199199
goto out;
200200
}
@@ -218,12 +218,12 @@ static int ext4_readdir(struct file * filp,
218218
break;
219219
if (version != filp->f_version)
220220
goto revalidate;
221-
stored ++;
221+
stored++;
222222
}
223223
filp->f_pos += ext4_rec_len_from_disk(de->rec_len);
224224
}
225225
offset = 0;
226-
brelse (bh);
226+
brelse(bh);
227227
}
228228
out:
229229
return ret;
@@ -290,9 +290,9 @@ static void free_rb_tree_fname(struct rb_root *root)
290290
parent = rb_parent(n);
291291
fname = rb_entry(n, struct fname, rb_hash);
292292
while (fname) {
293-
struct fname * old = fname;
293+
struct fname *old = fname;
294294
fname = fname->next;
295-
kfree (old);
295+
kfree(old);
296296
}
297297
if (!parent)
298298
root->rb_node = NULL;
@@ -331,7 +331,7 @@ int ext4_htree_store_dirent(struct file *dir_file, __u32 hash,
331331
struct ext4_dir_entry_2 *dirent)
332332
{
333333
struct rb_node **p, *parent = NULL;
334-
struct fname * fname, *new_fn;
334+
struct fname *fname, *new_fn;
335335
struct dir_private_info *info;
336336
int len;
337337

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

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

423-
static int ext4_dx_readdir(struct file * filp,
424-
void * dirent, filldir_t filldir)
423+
static int ext4_dx_readdir(struct file *filp,
424+
void *dirent, filldir_t filldir)
425425
{
426426
struct dir_private_info *info = filp->private_data;
427427
struct inode *inode = filp->f_path.dentry->d_inode;
@@ -512,7 +512,7 @@ static int ext4_dx_readdir(struct file * filp,
512512
return 0;
513513
}
514514

515-
static int ext4_release_dir (struct inode * inode, struct file * filp)
515+
static int ext4_release_dir(struct inode *inode, struct file *filp)
516516
{
517517
if (filp->private_data)
518518
ext4_htree_free_dir_info(filp->private_data);

0 commit comments

Comments
 (0)