Skip to content

Commit a17e7d2

Browse files
committed
befs: befs: fix style issues in datastream.c
Fixing the following checkpatch.pl errors: ERROR: "foo * bar" should be "foo *bar" + befs_blocknr_t blockno, befs_block_run * run); WARNING: Missing a blank line after declarations + struct buffer_head *bh; + befs_debug(sb, "---> %s length: %llu", __func__, len); WARNING: Block comments use * on subsequent lines + /* + Double indir block, plus all the indirect blocks it maps. (and other instances of these) Signed-off-by: Luis de Bethencourt <[email protected]> Signed-off-by: Salah Triki <[email protected]>
1 parent a20af5f commit a17e7d2

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

fs/befs/datastream.c

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ const befs_inode_addr BAD_IADDR = { 0, 0, 0 };
2222

2323
static int befs_find_brun_direct(struct super_block *sb,
2424
const befs_data_stream *data,
25-
befs_blocknr_t blockno, befs_block_run * run);
25+
befs_blocknr_t blockno, befs_block_run *run);
2626

2727
static int befs_find_brun_indirect(struct super_block *sb,
2828
const befs_data_stream *data,
2929
befs_blocknr_t blockno,
30-
befs_block_run * run);
30+
befs_block_run *run);
3131

3232
static int befs_find_brun_dblindirect(struct super_block *sb,
3333
const befs_data_stream *data,
3434
befs_blocknr_t blockno,
35-
befs_block_run * run);
35+
befs_block_run *run);
3636

3737
/**
3838
* befs_read_datastream - get buffer_head containing data, starting from pos.
@@ -46,7 +46,7 @@ static int befs_find_brun_dblindirect(struct super_block *sb,
4646
*/
4747
struct buffer_head *
4848
befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
49-
befs_off_t pos, uint * off)
49+
befs_off_t pos, uint *off)
5050
{
5151
struct buffer_head *bh;
5252
befs_block_run run;
@@ -94,7 +94,7 @@ befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
9494
*/
9595
int
9696
befs_fblock2brun(struct super_block *sb, const befs_data_stream *data,
97-
befs_blocknr_t fblock, befs_block_run * run)
97+
befs_blocknr_t fblock, befs_block_run *run)
9898
{
9999
int err;
100100
befs_off_t pos = fblock << BEFS_SB(sb)->block_shift;
@@ -134,6 +134,7 @@ befs_read_lsymlink(struct super_block *sb, const befs_data_stream *ds,
134134
befs_off_t bytes_read = 0; /* bytes readed */
135135
u16 plen;
136136
struct buffer_head *bh;
137+
137138
befs_debug(sb, "---> %s length: %llu", __func__, len);
138139

139140
while (bytes_read < len) {
@@ -189,13 +190,13 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
189190
metablocks += ds->indirect.len;
190191

191192
/*
192-
Double indir block, plus all the indirect blocks it maps.
193-
In the double-indirect range, all block runs of data are
194-
BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
195-
how many data block runs are in the double-indirect region,
196-
and from that we know how many indirect blocks it takes to
197-
map them. We assume that the indirect blocks are also
198-
BEFS_DBLINDIR_BRUN_LEN blocks long.
193+
* Double indir block, plus all the indirect blocks it maps.
194+
* In the double-indirect range, all block runs of data are
195+
* BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
196+
* how many data block runs are in the double-indirect region,
197+
* and from that we know how many indirect blocks it takes to
198+
* map them. We assume that the indirect blocks are also
199+
* BEFS_DBLINDIR_BRUN_LEN blocks long.
199200
*/
200201
if (ds->size > ds->max_indirect_range && ds->max_indirect_range != 0) {
201202
uint dbl_bytes;
@@ -249,7 +250,7 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
249250
*/
250251
static int
251252
befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
252-
befs_blocknr_t blockno, befs_block_run * run)
253+
befs_blocknr_t blockno, befs_block_run *run)
253254
{
254255
int i;
255256
const befs_block_run *array = data->direct;
@@ -261,6 +262,7 @@ befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
261262
sum += array[i].len, i++) {
262263
if (blockno >= sum && blockno < sum + (array[i].len)) {
263264
int offset = blockno - sum;
265+
264266
run->allocation_group = array[i].allocation_group;
265267
run->start = array[i].start + offset;
266268
run->len = array[i].len - offset;
@@ -304,7 +306,7 @@ static int
304306
befs_find_brun_indirect(struct super_block *sb,
305307
const befs_data_stream *data,
306308
befs_blocknr_t blockno,
307-
befs_block_run * run)
309+
befs_block_run *run)
308310
{
309311
int i, j;
310312
befs_blocknr_t sum = 0;
@@ -413,7 +415,7 @@ static int
413415
befs_find_brun_dblindirect(struct super_block *sb,
414416
const befs_data_stream *data,
415417
befs_blocknr_t blockno,
416-
befs_block_run * run)
418+
befs_block_run *run)
417419
{
418420
int dblindir_indx;
419421
int indir_indx;

0 commit comments

Comments
 (0)