From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Yinghai Lu <yinghai@kernel.org>
Subject: [PATCH 4/9 -tip] x86: mtrr/cyrix.c fix trivial style problems
Date: Sat, 04 Jul 2009 07:52:08 +0530 [thread overview]
Message-ID: <1246674128.2642.9.camel@ht.satnam> (raw)
In-Reply-To: <1246674092.2642.8.camel@ht.satnam>
Fix trivial style problems :
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
WARNING: line over 80 characters
ERROR: do not initialise statics to 0 or NULL
ERROR: space prohibited after that open parenthesis '(' X 2
ERROR: space prohibited before that close parenthesis ')' X 2
ERROR: trailing whitespace X 2
ERROR: trailing statements should be on next line
ERROR: do not use C99 // comments X 2
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
arch/x86/kernel/cpu/mtrr/cyrix.c | 30 ++++++++++++++++--------------
1 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/arch/x86/kernel/cpu/mtrr/cyrix.c b/arch/x86/kernel/cpu/mtrr/cyrix.c
index ff14c32..f01c723 100644
--- a/arch/x86/kernel/cpu/mtrr/cyrix.c
+++ b/arch/x86/kernel/cpu/mtrr/cyrix.c
@@ -1,8 +1,8 @@
#include <linux/init.h>
+#include <linux/io.h>
#include <linux/mm.h>
#include <asm/mtrr.h>
#include <asm/msr.h>
-#include <asm/io.h>
#include <asm/processor-cyrix.h>
#include <asm/processor-flags.h>
#include "mtrr.h"
@@ -114,7 +114,10 @@ cyrix_get_free_region(unsigned long base, unsigned long size, int replace_reg)
if (lsize == 0)
return i;
}
- /* ARR0-ARR6 isn't free, try ARR7 but its size must be at least 256K */
+ /*
+ * ARR0-ARR6 isn't free
+ * try ARR7 but its size must be at least 256K
+ */
cyrix_get_arr(i, &lbase, &lsize, <ype);
if ((lsize == 0) && (size >= 0x40))
return i;
@@ -122,21 +125,22 @@ cyrix_get_free_region(unsigned long base, unsigned long size, int replace_reg)
return -ENOSPC;
}
-static u32 cr4 = 0;
-static u32 ccr3;
+static u32 cr4, ccr3;
static void prepare_set(void)
{
u32 cr0;
/* Save value of CR4 and clear Page Global Enable (bit 7) */
- if ( cpu_has_pge ) {
+ if (cpu_has_pge) {
cr4 = read_cr4();
write_cr4(cr4 & ~X86_CR4_PGE);
}
- /* Disable and flush caches. Note that wbinvd flushes the TLBs as
- a side-effect */
+ /*
+ * Disable and flush caches.
+ * Note that wbinvd flushes the TLBs as a side-effect
+ */
cr0 = read_cr0() | X86_CR0_CD;
wbinvd();
write_cr0(cr0);
@@ -157,12 +161,12 @@ static void post_set(void)
/* Cyrix ARRs - everything else was excluded at the top */
setCx86(CX86_CCR3, ccr3);
-
+
/* Enable caches */
write_cr0(read_cr0() & 0xbfffffff);
/* Restore value of CR4 */
- if ( cpu_has_pge )
+ if (cpu_has_pge)
write_cr4(cr4);
}
@@ -178,7 +182,8 @@ static void cyrix_set_arr(unsigned int reg, unsigned long base,
size >>= 6;
size &= 0x7fff; /* make sure arr_size <= 14 */
- for (arr_size = 0; size; arr_size++, size >>= 1) ;
+ for (arr_size = 0; size; arr_size++, size >>= 1)
+ ;
if (reg < 7) {
switch (type) {
@@ -248,7 +253,7 @@ static void cyrix_set_all(void)
for (; i < 7; i++)
setCx86(CX86_CCR4 + i, ccr_state[i]);
for (i = 0; i < 8; i++)
- cyrix_set_arr(i, arr_state[i].base,
+ cyrix_set_arr(i, arr_state[i].base,
arr_state[i].size, arr_state[i].type);
post_set();
@@ -256,7 +261,6 @@ static void cyrix_set_all(void)
static struct mtrr_ops cyrix_mtrr_ops = {
.vendor = X86_VENDOR_CYRIX,
-// .init = cyrix_arr_init,
.set_all = cyrix_set_all,
.set = cyrix_set_arr,
.get = cyrix_get_arr,
@@ -270,5 +274,3 @@ int __init cyrix_init_mtrr(void)
set_mtrr_ops(&cyrix_mtrr_ops);
return 0;
}
-
-//arch_initcall(cyrix_init_mtrr);
--
1.6.0.6
next prev parent reply other threads:[~2009-07-04 2:31 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 11:36 [PATCH] vt: add an event interface Alan Cox
2009-07-03 6:45 ` Ingo Molnar
2009-07-03 9:08 ` Alan Cox
2009-07-03 9:16 ` Ingo Molnar
2009-07-03 9:44 ` Alan Cox
2009-07-03 9:54 ` Ingo Molnar
2009-07-03 10:06 ` Alan Cox
2009-07-03 10:22 ` Ingo Molnar
2009-07-03 10:44 ` Alan Cox
2009-07-03 13:17 ` Ingo Molnar
2009-07-03 13:37 ` Alan Cox
2009-07-03 14:47 ` Ingo Molnar
2009-07-03 15:02 ` Alan Cox
2009-07-03 15:42 ` Ingo Molnar
2009-07-03 15:48 ` Ingo Molnar
2009-07-03 16:11 ` Alan Cox
2009-07-03 16:24 ` Ingo Molnar
2009-07-03 18:29 ` Alan Cox
2009-07-03 18:41 ` Ingo Molnar
2009-07-03 15:57 ` Ingo Molnar
2009-07-03 15:58 ` Ingo Molnar
2009-07-03 16:26 ` Alan Cox
2009-07-03 16:33 ` Ingo Molnar
2009-07-03 16:42 ` Ingo Molnar
2009-07-03 22:17 ` Jaswinder Singh Rajput
2009-07-04 2:18 ` [GIT PULL -tip][PATCH 0/9] MTRR fix trivial style patches Jaswinder Singh Rajput
2009-07-04 2:20 ` [PATCH 1/9 -tip] x86: mtrr/amd.c fix trivial style problems Jaswinder Singh Rajput
2009-07-04 2:20 ` [PATCH 2/9 -tip] x86: mtrr/centaur.c fix " Jaswinder Singh Rajput
2009-07-04 2:21 ` [PATCH 3/9 -tip] x86: mtrr/cleanup.c fix trivial " Jaswinder Singh Rajput
2009-07-04 2:22 ` Jaswinder Singh Rajput [this message]
2009-07-04 2:23 ` [PATCH 5/9 -tip] x86: mtrr/generic.c fix " Jaswinder Singh Rajput
2009-07-04 2:23 ` [PATCH 6/9 -tip] x86: mtrr/if.c fix trivial " Jaswinder Singh Rajput
2009-07-04 2:24 ` [PATCH 7/9 -tip] x86: mtrr/mtrr.h " Jaswinder Singh Rajput
2009-07-04 2:24 ` [PATCH 8/9 -tip] x86: mtrr/state.c " Jaswinder Singh Rajput
2009-07-04 2:26 ` [PATCH 9/9 -tip] x86: mtrr/main.c fix " Jaswinder Singh Rajput
2009-07-05 18:21 ` [GIT PULL -tip][PATCH 0/9] MTRR fix trivial style patches Ingo Molnar
2009-07-05 22:09 ` Jaswinder Singh Rajput
2009-07-04 10:06 ` [tip:x86/cleanups] x86: Clean up mtrr/amd.c: tip-bot for Jaswinder Singh Rajput
2009-07-04 10:06 ` [tip:x86/cleanups] x86: Clean up mtrr/centaur.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/cleanup.c tip-bot for Jaswinder Singh Rajput
2009-07-04 21:12 ` Yinghai Lu
2009-07-05 0:27 ` Ingo Molnar
2009-07-05 6:02 ` Jaswinder Singh Rajput
2009-07-05 11:59 ` Pekka Enberg
2009-07-05 13:19 ` Jaswinder Singh Rajput
2009-07-05 20:11 ` Thomas Gleixner
2009-07-05 22:16 ` Jaswinder Singh Rajput
2009-07-05 18:04 ` Ingo Molnar
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/cyrix.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/generic.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/if.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/mtrr.h tip-bot for Jaswinder Singh Rajput
2009-07-04 10:08 ` [tip:x86/cleanups] x86: Clean up mtrr/state.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:08 ` [tip:x86/cleanups] x86: Clean up mtrr/main.c tip-bot for Jaswinder Singh Rajput
2009-07-05 7:57 ` [tip:x86/cleanups] x86: Further clean up of mtrr/generic.c tip-bot for Ingo Molnar
2009-07-03 16:10 ` [PATCH] vt: add an event interface Ingo Molnar
2009-07-03 18:24 ` Alan Cox
2009-07-21 16:23 ` Lennart Poettering
2009-07-21 16:32 ` Alan Cox
2009-07-22 11:14 ` Lennart Poettering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1246674128.2642.9.camel@ht.satnam \
--to=jaswinder@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox