Skip to content

Commit b4a0b4f

Browse files
akpm00sfrothwell
authored andcommitted
mpage-add-argument-structure-for-do_mpage_readpage-checkpatch-fixes
WARNING: Prefer 'unsigned int' to bare use of 'unsigned' torvalds#49: FILE: fs/mpage.c:139: + unsigned nr_pages; WARNING: line over 80 characters torvalds#96: FILE: fs/mpage.c:190: + if (buffer_mapped(map_bh) && block_in_file > args->first_logical_block && WARNING: Prefer 'unsigned int' to bare use of 'unsigned' torvalds#98: FILE: fs/mpage.c:192: + unsigned map_offset = block_in_file - args->first_logical_block; WARNING: line over 80 characters torvalds#135: FILE: fs/mpage.c:296: + min_t(int, args->nr_pages, BIO_MAX_PAGES), args->gfp); ERROR: code indent should use tabs where possible torvalds#169: FILE: fs/mpage.c:321: +^I block_read_full_page(page, args->get_block);$ total: 1 errors, 4 warnings, 196 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile ./patches/mpage-add-argument-structure-for-do_mpage_readpage.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Stephen Rothwell <[email protected]>
1 parent f96975e commit b4a0b4f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

fs/mpage.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ map_buffer_to_page(struct page *page, struct buffer_head *bh, int page_block)
136136
struct mpage_readpage_args {
137137
struct bio *bio;
138138
struct page *page;
139-
unsigned nr_pages;
139+
unsigned int nr_pages;
140140
sector_t last_block_in_bio;
141141
struct buffer_head map_bh;
142142
unsigned long first_logical_block;
@@ -187,7 +187,8 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args)
187187
* Map blocks using the result from the previous get_blocks call first.
188188
*/
189189
nblocks = map_bh->b_size >> blkbits;
190-
if (buffer_mapped(map_bh) && block_in_file > args->first_logical_block &&
190+
if (buffer_mapped(map_bh) &&
191+
block_in_file > args->first_logical_block &&
191192
block_in_file < (args->first_logical_block + nblocks)) {
192193
unsigned map_offset = block_in_file - args->first_logical_block;
193194
unsigned last = nblocks - map_offset;
@@ -293,7 +294,9 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args)
293294
goto out;
294295
}
295296
args->bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9),
296-
min_t(int, args->nr_pages, BIO_MAX_PAGES), args->gfp);
297+
min_t(int, args->nr_pages,
298+
BIO_MAX_PAGES),
299+
args->gfp);
297300
if (args->bio == NULL)
298301
goto confused;
299302
}
@@ -318,7 +321,7 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args)
318321
if (args->bio)
319322
args->bio = mpage_bio_submit(REQ_OP_READ, 0, args->bio);
320323
if (!PageUptodate(page))
321-
block_read_full_page(page, args->get_block);
324+
block_read_full_page(page, args->get_block);
322325
else
323326
unlock_page(page);
324327
goto out;

0 commit comments

Comments
 (0)