linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: highmem remove 3 errors
@ 2014-10-02 15:44 Paul McQuade
  2014-10-02 15:54 ` Max Filippov
  0 siblings, 1 reply; 4+ messages in thread
From: Paul McQuade @ 2014-10-02 15:44 UTC (permalink / raw)
  To: paulmcquad; +Cc: akpm, jcmvbkbc, linux-mm, linux-kernel

pointers should be foo *bar or (foo *)

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
---
 mm/highmem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/highmem.c b/mm/highmem.c
index 123bcd3..f6dae74 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -130,7 +130,7 @@ unsigned int nr_free_highpages (void)
 static int pkmap_count[LAST_PKMAP];
 static  __cacheline_aligned_in_smp DEFINE_SPINLOCK(kmap_lock);
 
-pte_t * pkmap_page_table;
+pte_t *pkmap_page_table;
 
 /*
  * Most architectures have no use for kmap_high_get(), so let's abstract
@@ -291,7 +291,7 @@ void *kmap_high(struct page *page)
 	pkmap_count[PKMAP_NR(vaddr)]++;
 	BUG_ON(pkmap_count[PKMAP_NR(vaddr)] < 2);
 	unlock_kmap();
-	return (void*) vaddr;
+	return (void *) vaddr;
 }
 
 EXPORT_SYMBOL(kmap_high);
@@ -318,7 +318,7 @@ void *kmap_high_get(struct page *page)
 		pkmap_count[PKMAP_NR(vaddr)]++;
 	}
 	unlock_kmap_any(flags);
-	return (void*) vaddr;
+	return (void *) vaddr;
 }
 #endif
 
-- 
1.9.1

--
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 related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: highmem remove 3 errors
  2014-10-02 15:44 Paul McQuade
@ 2014-10-02 15:54 ` Max Filippov
  2014-10-02 16:13   ` Max Filippov
  0 siblings, 1 reply; 4+ messages in thread
From: Max Filippov @ 2014-10-02 15:54 UTC (permalink / raw)
  To: Paul McQuade; +Cc: Andrew Morton, linux-mm@kvack.org, LKML

On Thu, Oct 2, 2014 at 7:44 PM, Paul McQuade <paulmcquad@gmail.com> wrote:
> pointers should be foo *bar or (foo *)
>
> Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
> ---
>  mm/highmem.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/mm/highmem.c b/mm/highmem.c
> index 123bcd3..f6dae74 100644
> --- a/mm/highmem.c
> +++ b/mm/highmem.c
> @@ -130,7 +130,7 @@ unsigned int nr_free_highpages (void)
>  static int pkmap_count[LAST_PKMAP];
>  static  __cacheline_aligned_in_smp DEFINE_SPINLOCK(kmap_lock);
>
> -pte_t * pkmap_page_table;
> +pte_t *pkmap_page_table;
>
>  /*
>   * Most architectures have no use for kmap_high_get(), so let's abstract
> @@ -291,7 +291,7 @@ void *kmap_high(struct page *page)
>         pkmap_count[PKMAP_NR(vaddr)]++;
>         BUG_ON(pkmap_count[PKMAP_NR(vaddr)] < 2);
>         unlock_kmap();
> -       return (void*) vaddr;
> +       return (void *) vaddr;

checkpatch suggests that
CHECK: No space is necessary after a cast

>  }
>
>  EXPORT_SYMBOL(kmap_high);
> @@ -318,7 +318,7 @@ void *kmap_high_get(struct page *page)
>                 pkmap_count[PKMAP_NR(vaddr)]++;
>         }
>         unlock_kmap_any(flags);
> -       return (void*) vaddr;
> +       return (void *) vaddr;

Here as well.

-- 
Thanks.
-- Max

--
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] 4+ messages in thread

* Re: [PATCH] mm: highmem remove 3 errors
  2014-10-02 15:54 ` Max Filippov
@ 2014-10-02 16:13   ` Max Filippov
  0 siblings, 0 replies; 4+ messages in thread
From: Max Filippov @ 2014-10-02 16:13 UTC (permalink / raw)
  To: Paul McQuade; +Cc: Andrew Morton, linux-mm@kvack.org, LKML

On Thu, Oct 2, 2014 at 7:54 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> On Thu, Oct 2, 2014 at 7:44 PM, Paul McQuade <paulmcquad@gmail.com> wrote:
>> -       return (void*) vaddr;
>> +       return (void *) vaddr;
>
> checkpatch suggests that
> CHECK: No space is necessary after a cast

Sorry, wasn't clear enough. 'After a cast' means between ')' and 'vaddr' in the
above case. Space insertion between 'void' and '*' is correct.

-- 
Thanks.
-- Max

--
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] 4+ messages in thread

* [PATCH] mm: highmem remove 3 errors
@ 2014-10-02 16:44 Paul McQuade
  0 siblings, 0 replies; 4+ messages in thread
From: Paul McQuade @ 2014-10-02 16:44 UTC (permalink / raw)
  To: paulmcquad; +Cc: akpm, jcmvbkbc, linux-mm, linux-kernel

pointers should be foo *bar or (foo *)

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
---
 mm/highmem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/highmem.c b/mm/highmem.c
index 123bcd3..996c1d8 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -130,7 +130,7 @@ unsigned int nr_free_highpages (void)
 static int pkmap_count[LAST_PKMAP];
 static  __cacheline_aligned_in_smp DEFINE_SPINLOCK(kmap_lock);
 
-pte_t * pkmap_page_table;
+pte_t *pkmap_page_table;
 
 /*
  * Most architectures have no use for kmap_high_get(), so let's abstract
@@ -291,7 +291,7 @@ void *kmap_high(struct page *page)
 	pkmap_count[PKMAP_NR(vaddr)]++;
 	BUG_ON(pkmap_count[PKMAP_NR(vaddr)] < 2);
 	unlock_kmap();
-	return (void*) vaddr;
+	return (void *)vaddr;
 }
 
 EXPORT_SYMBOL(kmap_high);
@@ -318,7 +318,7 @@ void *kmap_high_get(struct page *page)
 		pkmap_count[PKMAP_NR(vaddr)]++;
 	}
 	unlock_kmap_any(flags);
-	return (void*) vaddr;
+	return (void *)vaddr;
 }
 #endif
 
-- 
1.9.1

--
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 related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-02 16:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-02 16:44 [PATCH] mm: highmem remove 3 errors Paul McQuade
  -- strict thread matches above, loose matches on Subject: below --
2014-10-02 15:44 Paul McQuade
2014-10-02 15:54 ` Max Filippov
2014-10-02 16:13   ` Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).