Skip to content

Commit 12ecb38

Browse files
committed
befs: fix style issues in header files
Fixing checkpatch.pl issues in befs header files: WARNING: Missing a blank line after declarations + befs_inode_addr iaddr; + iaddr.allocation_group = blockno >> BEFS_SB(sb)->ag_shift; WARNING: space prohibited between function name and open parenthesis '(' + return BEFS_SB(sb)->block_size / sizeof (befs_disk_inode_addr); ERROR: "foo * bar" should be "foo *bar" + const char *key, befs_off_t * value); ERROR: Macros with complex values should be enclosed in parentheses +#define PACKED __attribute__ ((__packed__)) Signed-off-by: Luis de Bethencourt <[email protected]>
1 parent 62b8071 commit 12ecb38

File tree

6 files changed

+12
-17
lines changed

6 files changed

+12
-17
lines changed

fs/befs/befs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ static inline befs_inode_addr
129129
blockno2iaddr(struct super_block *sb, befs_blocknr_t blockno)
130130
{
131131
befs_inode_addr iaddr;
132+
132133
iaddr.allocation_group = blockno >> BEFS_SB(sb)->ag_shift;
133134
iaddr.start =
134135
blockno - (iaddr.allocation_group << BEFS_SB(sb)->ag_shift);
@@ -140,7 +141,7 @@ blockno2iaddr(struct super_block *sb, befs_blocknr_t blockno)
140141
static inline unsigned int
141142
befs_iaddrs_per_block(struct super_block *sb)
142143
{
143-
return BEFS_SB(sb)->block_size / sizeof (befs_disk_inode_addr);
144+
return BEFS_SB(sb)->block_size / sizeof(befs_disk_inode_addr);
144145
}
145146

146147
#include "endian.h"

fs/befs/befs_fs_types.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ enum super_flags {
5555
};
5656

5757
#define BEFS_BYTEORDER_NATIVE 0x42494745
58-
#define BEFS_BYTEORDER_NATIVE_LE (__force fs32)cpu_to_le32(BEFS_BYTEORDER_NATIVE)
59-
#define BEFS_BYTEORDER_NATIVE_BE (__force fs32)cpu_to_be32(BEFS_BYTEORDER_NATIVE)
58+
#define BEFS_BYTEORDER_NATIVE_LE ((__force fs32)cpu_to_le32(BEFS_BYTEORDER_NATIVE))
59+
#define BEFS_BYTEORDER_NATIVE_BE ((__force fs32)cpu_to_be32(BEFS_BYTEORDER_NATIVE))
6060

6161
#define BEFS_SUPER_MAGIC BEFS_SUPER_MAGIC1
62-
#define BEFS_SUPER_MAGIC1_LE (__force fs32)cpu_to_le32(BEFS_SUPER_MAGIC1)
63-
#define BEFS_SUPER_MAGIC1_BE (__force fs32)cpu_to_be32(BEFS_SUPER_MAGIC1)
62+
#define BEFS_SUPER_MAGIC1_LE ((__force fs32)cpu_to_le32(BEFS_SUPER_MAGIC1))
63+
#define BEFS_SUPER_MAGIC1_BE ((__force fs32)cpu_to_be32(BEFS_SUPER_MAGIC1))
6464

6565
/*
6666
* Flags of inode

fs/befs/btree.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
*
44
*/
55

6-
76
int befs_btree_find(struct super_block *sb, const befs_data_stream *ds,
8-
const char *key, befs_off_t * value);
7+
const char *key, befs_off_t *value);
98

109
int befs_btree_read(struct super_block *sb, const befs_data_stream *ds,
1110
loff_t key_no, size_t bufsize, char *keybuf,
12-
size_t * keysize, befs_off_t * value);
13-
11+
size_t *keysize, befs_off_t *value);

fs/befs/datastream.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
struct buffer_head *befs_read_datastream(struct super_block *sb,
77
const befs_data_stream *ds,
8-
befs_off_t pos, uint * off);
8+
befs_off_t pos, uint *off);
99

1010
int befs_fblock2brun(struct super_block *sb, const befs_data_stream *data,
11-
befs_blocknr_t fblock, befs_block_run * run);
11+
befs_blocknr_t fblock, befs_block_run *run);
1212

1313
size_t befs_read_lsymlink(struct super_block *sb, const befs_data_stream *data,
1414
void *buff, befs_off_t len);
@@ -17,4 +17,3 @@ befs_blocknr_t befs_count_blocks(struct super_block *sb,
1717
const befs_data_stream *ds);
1818

1919
extern const befs_inode_addr BAD_IADDR;
20-

fs/befs/inode.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
*
44
*/
55

6-
int befs_check_inode(struct super_block *sb, befs_inode * raw_inode,
6+
int befs_check_inode(struct super_block *sb, befs_inode *raw_inode,
77
befs_blocknr_t inode);
8-

fs/befs/super.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
* super.h
33
*/
44

5-
int befs_load_sb(struct super_block *sb, befs_super_block * disk_sb);
6-
5+
int befs_load_sb(struct super_block *sb, befs_super_block *disk_sb);
76
int befs_check_sb(struct super_block *sb);
8-

0 commit comments

Comments
 (0)