mm: Fix some coding styles on mm/ tree
Subsystems (4)
PATCH 1/1 mm: Fix some coding styles on mm/ tree
Fix some coding styles on mm/ tree.
--- mm/filemap.c | 10 ++++------ mm/filemap_xip.c | 3 +-- mm/slab.c | 8 ++++---- mm/vmscan.c | 4 ++-- 4 files changed, 11 insertions(+), 14 deletions(-)
mm/filemap.c +4 -6
@@ -2001,9 +2001,8 @@ inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, isend_sig (SIGXFSZ , current,0 );return -EFBIG ; } -if (*count > limit - (typeof (limit))*pos) { +if (*count > limit - (typeof (limit))*pos) *count = limit - (typeof (limit))*pos; - } } }
@@ -2012,12 +2011,11 @@ inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, i*/ if (unlikely (*pos + *count >MAX_NON_LFS && !(file->f_flags &O_LARGEFILE ))) { -if (*pos >=MAX_NON_LFS ) { +if (*pos >=MAX_NON_LFS )return -EFBIG ; - } -if (*count >MAX_NON_LFS - (unsigned long )*pos) { + +if (*count >MAX_NON_LFS - (unsigned long )*pos) *count =MAX_NON_LFS - (unsigned long )*pos; - } }/*
mm/filemap_xip.c +1 -2
@@ -84,9 +84,8 @@ do_xip_mapping_read(struct address_space *mapping,if (index > end_index) goto out; nr = ((isize -1 ) & ~PAGE_CACHE_MASK ) +1 ; -if (nr <= offset) { +if (nr <= offset) goto out; - } } nr = nr - offset;if (nr > len - copied)
mm/slab.c +4 -4
@@ -2216,13 +2216,13 @@ kmem_cache_create (const char *name, size_t size, size_t align, }/* 2) arch mandated alignment */ -if (ralign <ARCH_SLAB_MINALIGN ) { +if (ralign <ARCH_SLAB_MINALIGN ) ralign =ARCH_SLAB_MINALIGN ; - } +/* 3) caller mandated alignment */ -if (ralign < align) { +if (ralign < align) ralign = align; - } +/* disable debug if necessary */ if (ralign > __alignof__(unsigned long long )) flags &= ~(SLAB_RED_ZONE |SLAB_STORE_USER );
mm/vmscan.c +2 -2
@@ -1327,9 +1327,9 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,* zone->pages_scanned is used for detect zone's oom * mem_cgroup remembers nr_scan by itself. */ -if (scanning_global_lru (sc)) { +if (scanning_global_lru (sc)) zone->pages_scanned += pgscanned; - } + reclaim_stat->recent_scanned[file] += nr_taken;__count_zone_vm_events (PGREFILL , zone, pgscanned);
Signature · 7 lines
1.6.5.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 6 lines
mm/vmscan.c +0
-0@@ -1327,9 +1327,9 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,* zone->pages_scanned is used for detect zone's oom
mm/vmscan.c static void shrink_active_list(unsigned long nr_pages, struct zone *zone, · line 1335
Quoted 10 lines
mm/vmscan.c +2
-2* mem_cgroup remembers nr_scan by itself. */ -if (scanning_global_lru (sc)) { +if (scanning_global_lru (sc)) zone->pages_scanned += pgscanned; - } + reclaim_stat->recent_scanned[file] += nr_taken;__count_zone_vm_events (PGREFILL , zone, pgscanned);
Probably this part is my fault.
Thanks! Zhitong.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Andrew Morton
maintainerQuoted 10 lines · On Thu, 4 Mar 2010 19:09:16 +0800 [email protected] wrote:
Fix some coding styles on
mm/tree.Signed-off-by Zhitong Wang <[email protected]>--- mm/filemap.c | 10 ++++------ mm/filemap_xip.c | 3 +-- mm/slab.c | 8 ++++---- mm/vmscan.c | 4 ++-- 4 files changed, 11 insertions(+), 14 deletions(-)
I don't mind fixing coding-style issues in there, but I would prefer that it be more comprehensive than this - someone sits down and does a series of large, more complete subystem-wide cleanups then sure, in the long term it's worth the pain of merging them.
But I don't think it's good to do this as a slow, random ad-hoc pitter-patter of changes like this one.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>