linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix coding style of mm/mmap.c
@ 2008-12-09  7:56 Helight.Xu
  2008-12-09 19:06 ` Hugh Dickins
  0 siblings, 1 reply; 3+ messages in thread
From: Helight.Xu @ 2008-12-09  7:56 UTC (permalink / raw)
  To: hugh; +Cc: linux-kernel, linux-mm

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

fix some coding style of mm/mmap.c 
-- 
---------------------------------
Zhenwen Xu - Open and Free
Home Page:	http://zhwen.org
My Studio:	http://dim4.cn

[-- Attachment #2: 0002-code-style.patch --]
[-- Type: text/x-diff, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix coding style of mm/mmap.c
  2008-12-09  7:56 [PATCH] fix coding style of mm/mmap.c Helight.Xu
@ 2008-12-09 19:06 ` Hugh Dickins
  2008-12-09 19:15   ` Frédéric Weisbecker
  0 siblings, 1 reply; 3+ messages in thread
From: Hugh Dickins @ 2008-12-09 19:06 UTC (permalink / raw)
  To: Helight.Xu; +Cc: Andrew Morton, ZhenwenXu, linux-kernel, linux-mm

Okay, thanks for this.

Though, to be honest, we're not all that keen on random cleanups of
this kind: they can cause more trouble than they're worth, when real
development is going on in the area - better leave them to those who
are working on bigger changes nearby.

But mm/mmap.c is currently the same in mmotm as in Linus's git
(though slightly different from the 2.6.27 version in your patch -
I've rediffed it below), so it shouldn't cause anyone much trouble:
Andrew, please add to mmotm.  (scripts/checkpatch.pl does warn on
the long acct_stack_growth line, but Zhenwen has made it a little
shorter, and people disagree about long function declaration lines.)

Please inline your patches in future, so all can see them at a glance:
ah, you're using gmail, yes, that does mess them up - I believe there's
advice on how to configure it for sending Linux patches somewhere in
the archives, but I didn't find it in Documentation/SubmittingPatches
just now, sorry.

Hugh


[PATCH] fix coding style of mm/mmap.c

From: ZhenwenXu <helight.xu@gmail.com>

Fix a little of the coding style in mm/mmap.c 

Signed-off-by: ZhenwenXu <helight.xu@gmail.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---

 mm/mmap.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -413,7 +413,7 @@ void __vma_link_rb(struct mm_struct *mm,
 
 static void __vma_link_file(struct vm_area_struct *vma)
 {
-	struct file * file;
+	struct file *file;
 
 	file = vma->vm_file;
 	if (file) {
@@ -475,10 +475,10 @@ static void vma_link(struct mm_struct *m
  * but it has already been inserted into prio_tree earlier.
  */
 static void
-__insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
+__insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
 {
-	struct vm_area_struct * __vma, * prev;
-	struct rb_node ** rb_link, * rb_parent;
+	struct vm_area_struct *__vma, *prev;
+	struct rb_node **rb_link, *rb_parent;
 
 	__vma = find_vma_prepare(mm, vma->vm_start,&prev, &rb_link, &rb_parent);
 	BUG_ON(__vma && __vma->vm_start < vma->vm_end);
@@ -908,7 +908,7 @@ void vm_stat_account(struct mm_struct *m
  * The caller must hold down_write(current->mm->mmap_sem).
  */
 
-unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
+unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
 			unsigned long len, unsigned long prot,
 			unsigned long flags, unsigned long pgoff)
 {
@@ -1464,7 +1464,7 @@ get_unmapped_area(struct file *file, uns
 EXPORT_SYMBOL(get_unmapped_area);
 
 /* Look up the first VMA which satisfies  addr < vm_end,  NULL if none. */
-struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr)
+struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
 {
 	struct vm_area_struct *vma = NULL;
 
@@ -1507,7 +1507,7 @@ find_vma_prev(struct mm_struct *mm, unsi
 			struct vm_area_struct **pprev)
 {
 	struct vm_area_struct *vma = NULL, *prev = NULL;
-	struct rb_node * rb_node;
+	struct rb_node *rb_node;
 	if (!mm)
 		goto out;
 
@@ -1541,7 +1541,7 @@ out:
  * update accounting. This is shared with both the
  * grow-up and grow-down cases.
  */
-static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, unsigned long grow)
+static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, unsigned long grow)
 {
 	struct mm_struct *mm = vma->vm_mm;
 	struct rlimit *rlim = current->signal->rlim;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix coding style of mm/mmap.c
  2008-12-09 19:06 ` Hugh Dickins
@ 2008-12-09 19:15   ` Frédéric Weisbecker
  0 siblings, 0 replies; 3+ messages in thread
From: Frédéric Weisbecker @ 2008-12-09 19:15 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: Helight.Xu, Andrew Morton, ZhenwenXu, linux-kernel, linux-mm

2008/12/9 Hugh Dickins <hugh@veritas.com>:
> Please inline your patches in future, so all can see them at a glance:
> ah, you're using gmail, yes, that does mess them up - I believe there's
> advice on how to configure it for sending Linux patches somewhere in
> the archives, but I didn't find it in Documentation/SubmittingPatches
> just now, sorry.


It's on Documentation/email-clients.txt

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-09 19:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-09  7:56 [PATCH] fix coding style of mm/mmap.c Helight.Xu
2008-12-09 19:06 ` Hugh Dickins
2008-12-09 19:15   ` Frédéric Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox