Skip to content

Commit 471c447

Browse files
akpm00sfrothwell
authored andcommitted
mm-memcg-use-consistent-gfp-flags-during-readahead-checkpatch-fixes
WARNING: Prefer 'unsigned int' to bare use of 'unsigned' torvalds#155: FILE: mm/readahead.c:111: + struct list_head *pages, unsigned nr_pages, gfp_t gfp_mask) WARNING: line over 80 characters torvalds#165: FILE: mm/readahead.c:129: + if (!add_to_page_cache_lru(page, mapping, page->index, gfp_mask)) { WARNING: braces {} are not necessary for single statement blocks torvalds#165: FILE: mm/readahead.c:129: + if (!add_to_page_cache_lru(page, mapping, page->index, gfp_mask)) { mapping->a_ops->readpage(filp, page); } total: 0 errors, 3 warnings, 111 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. ./patches/mm-memcg-use-consistent-gfp-flags-during-readahead.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 Cc: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 327ca46 commit 471c447

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mm/readahead.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ int read_cache_pages(struct address_space *mapping, struct list_head *pages,
108108
EXPORT_SYMBOL(read_cache_pages);
109109

110110
static int read_pages(struct address_space *mapping, struct file *filp,
111-
struct list_head *pages, unsigned nr_pages, gfp_t gfp_mask)
111+
struct list_head *pages, unsigned int nr_pages, gfp_t gfp)
112112
{
113113
struct blk_plug plug;
114114
unsigned page_idx;
@@ -126,9 +126,8 @@ static int read_pages(struct address_space *mapping, struct file *filp,
126126
for (page_idx = 0; page_idx < nr_pages; page_idx++) {
127127
struct page *page = lru_to_page(pages);
128128
list_del(&page->lru);
129-
if (!add_to_page_cache_lru(page, mapping, page->index, gfp_mask)) {
129+
if (!add_to_page_cache_lru(page, mapping, page->index, gfp))
130130
mapping->a_ops->readpage(filp, page);
131-
}
132131
put_page(page);
133132
}
134133
ret = 0;

0 commit comments

Comments
 (0)