powerpc: whitespace cleanup in reg.h
PATCH 1/1 powerpc: whitespace cleanup in reg.h
In reg.h we mostly have #define<space> but there are a few #define<tab> around. Clean these up so we use space exclusively.
---
It's clear this patch is fundamental to our future prosperity!
include/asm-powerpc/reg.h | 46 +++++++++++++++++++++++----------------------- 1 files changed, 23 insertions(+), 23 deletions(-)
include/asm-powerpc/reg.h +23 -23
@@ -153,7 +153,7 @@#define SPRN_DABR 0x3F5/* Data Address Breakpoint Register */ #define DABR_TRANSLATION (1UL << 2)#define SPRN_DAR 0x013/* Data Address Register */ -#define SPRN_DSISR 0x012/* Data Storage Interrupt Status Register */ +#define SPRN_DSISR 0x012/* Data Storage Interrupt Status Register */ #define DSISR_NOHPTE 0x40000000/* no translation found */ #define DSISR_PROTFAULT 0x08000000/* protection fault */ #define DSISR_ISSTORE 0x02000000/* access was a store */
@@ -258,16 +258,16 @@#define SPRN_IABR 0x3F2/* Instruction Address Breakpoint Register */ #define SPRN_HID4 0x3F4/* 970 HID4 */ #define SPRN_HID5 0x3F6/* 970 HID5 */ -#define SPRN_HID6 0x3F9/* BE HID 6 */ -#define HID6_LB (0x0F<<12)/* Concurrent Large Page Modes */ -#define HID6_DLP (1<<20)/* Disable all large page modes (4K only) */ -#define SPRN_TSC_CELL 0x399/* Thread switch control on Cell */ -#define TSC_CELL_DEC_ENABLE_0 0x400000/* Decrementer Interrupt */ -#define TSC_CELL_DEC_ENABLE_1 0x200000/* Decrementer Interrupt */ -#define TSC_CELL_EE_ENABLE 0x100000/* External Interrupt */ -#define TSC_CELL_EE_BOOST 0x080000/* External Interrupt Boost */ -#define SPRN_TSC 0x3FD/* Thread switch control on others */ -#define SPRN_TST 0x3FC/* Thread switch timeout on others */ +#define SPRN_HID6 0x3F9/* BE HID 6 */ +#define HID6_LB (0x0F<<12)/* Concurrent Large Page Modes */ +#define HID6_DLP (1<<20)/* Disable all large page modes (4K only) */ +#define SPRN_TSC_CELL 0x399/* Thread switch control on Cell */ +#define TSC_CELL_DEC_ENABLE_0 0x400000/* Decrementer Interrupt */ +#define TSC_CELL_DEC_ENABLE_1 0x200000/* Decrementer Interrupt */ +#define TSC_CELL_EE_ENABLE 0x100000/* External Interrupt */ +#define TSC_CELL_EE_BOOST 0x080000/* External Interrupt Boost */ +#define SPRN_TSC 0x3FD/* Thread switch control on others */ +#define SPRN_TST 0x3FC/* Thread switch timeout on others */ #if !defined(SPRN_IAC1 ) && !defined(SPRN_IAC2 )#define SPRN_IAC1 0x3F4/* Instruction Address Compare 1 */ #define SPRN_IAC2 0x3F5/* Instruction Address Compare 2 */
@@ -362,7 +362,7 @@#endif #define SPRN_PTEHI 0x3D5/* 981 7450 PTE HI word (S/W TLB load) */ #define SPRN_PTELO 0x3D6/* 982 7450 PTE LO word (S/W TLB load) */ -#define SPRN_PURR 0x135/* Processor Utilization of Resources Reg */ +#define SPRN_PURR 0x135/* Processor Utilization of Resources Reg */ #define SPRN_PVR 0x11F/* Processor Version Register */ #define SPRN_RPA 0x3D6/* Required Physical Address Register */ #define SPRN_SDA 0x3BF/* Sampled Data Address Register */
@@ -559,20 +559,20 @@/* 64-bit processors */ /* XXX the prefix should be PVR_, we'll do a global sweep to fix it one day */ -#define PV_NORTHSTAR 0x0033 -#define PV_PULSAR 0x0034 -#define PV_POWER4 0x0035 -#define PV_ICESTAR 0x0036 -#define PV_SSTAR 0x0037 -#define PV_POWER4p 0x0038 +#define PV_NORTHSTAR 0x0033 +#define PV_PULSAR 0x0034 +#define PV_POWER4 0x0035 +#define PV_ICESTAR 0x0036 +#define PV_SSTAR 0x0037 +#define PV_POWER4p 0x0038#define PV_970 0x0039 -#define PV_POWER5 0x003A +#define PV_POWER5 0x003A#define PV_POWER5p 0x003B#define PV_970FX 0x003C -#define PV_630 0x0040 -#define PV_630p 0x0041 -#define PV_970MP 0x0044 -#define PV_BE 0x0070 +#define PV_630 0x0040 +#define PV_630p 0x0041 +#define PV_970MP 0x0044 +#define PV_BE 0x0070/* * Number of entries in the SLB. If this ever changes we should handle
jschopp
NAKQuoted 4 lines
In
reg.hwe mostly have #define<space> but there are a few #define<tab> around. Clean these up so we use space exclusively.Signed-off-by Michael Neuling <[email protected]>
nack
include/asm-powerpc/reg.h line 270
Quoted 10 lines
include/asm-powerpc/reg.h +10
-0+#define SPRN_HID6 0x3F9/* BE HID 6 */ +#define HID6_LB (0x0F<<12)/* Concurrent Large Page Modes */ +#define HID6_DLP (1<<20)/* Disable all large page modes (4K only) */ +#define SPRN_TSC_CELL 0x399/* Thread switch control on Cell */ +#define TSC_CELL_DEC_ENABLE_0 0x400000/* Decrementer Interrupt */ +#define TSC_CELL_DEC_ENABLE_1 0x200000/* Decrementer Interrupt */ +#define TSC_CELL_EE_ENABLE 0x100000/* External Interrupt */ +#define TSC_CELL_EE_BOOST 0x080000/* External Interrupt Boost */ +#define SPRN_TSC 0x3FD/* Thread switch control on others */ +#define SPRN_TST 0x3FC/* Thread switch timeout on others */
OK, the tab to space for lines like SPRN_HID6 I understand. But then you seem to be trying to do indenting with 3 spaces instead of tabs. And your values don't line up, and your comments don't line up.
I'm just saying, either fix the formatting right or don't fix it at all. Moving it from one ugly to another ugly is not worth the trouble.
Quoted 1 line
But then you seem to be trying to do indenting with 3 spaces instead of tabs.
I disagree. These used to be #define<tab><space><space>. I just changed them to #define<space><space><space>.
Quoted 1 line
And your values don't line up, and your comments don't line up.
Try applying the patch and looking at reg.h. It looks much different there than in the patch.
Quoted 2 lines
I'm just saying, either fix the formatting right or don't fix it at all. Moving it from one ugly to another ugly is not worth the trouble.
With 8 character tabs, I've not changed to look at all.
Mikey
Quoted 15 lines · jschopp
include/asm-powerpc/reg.h line 270
Quoted 11 lines
include/asm-powerpc/reg.h +10
-0+#define SPRN_HID6 0x3F9/* BE HID 6 */ +#define HID6_LB (0x0F<<12)/* Concurrent Large Page Modes */ +#define HID6_DLP (1<<20)/* Disable all large page modes (4K only) */ +#define SPRN_TSC_CELL 0x399/* Thread switch control on Cell */ +#define TSC_CELL_DEC_ENABLE_0 0x400000/* Decrementer Interrupt */ +#define TSC_CELL_DEC_ENABLE_1 0x200000/* Decrementer Interrupt */ +#define TSC_CELL_EE_ENABLE 0x100000/* External Interrupt */ +#define TSC_CELL_EE_BOOST 0x080000/* External Interrupt Boost */ +#define SPRN_TSC 0x3FD/* Thread switch control on others */ +#define SPRN_TST 0x3FC/* Thread switch timeout on others */ OK, the tab to space for lines like
SPRN_HID6I understand. But then you seem to be trying to do indenting with 3 spaces instead of tabs. And your values don't line up, and your comments don't line up.
The SPR numbers are indented one space. The values for each SPR follow the SPR definition, and are indented two spaces past that. It's not unreasonable.
I don't really care about the values or comments, but if other people do then please use spaces for formatting (and tabs only for indenting).
-Hollis
Quoted 5 lines · jschopp
Quoted 5 lines
include/asm-powerpc/reg.h +5
-0+#define SPRN_HID6 0x3F9/* BE HID 6 */ +#define HID6_LB (0x0F<<12)/* Concurrent Large Page Modes */ +#define HID6_DLP (1<<20)/* Disable all large page modes (4K only) */ +#define SPRN_TSC_CELL 0x399/* Thread switch control on Cell */ +#define TSC_CELL_DEC_ENABLE_0 0x400000/* Decrementer Interrupt */
Quoted 8 lines
include/asm-powerpc/reg.h line 270
Quoted 5 lines
include/asm-powerpc/reg.h +5
-0+#define TSC_CELL_DEC_ENABLE_1 0x200000/* Decrementer Interrupt */ +#define TSC_CELL_EE_ENABLE 0x100000/* External Interrupt */ +#define TSC_CELL_EE_BOOST 0x080000/* External Interrupt Boost */ +#define SPRN_TSC 0x3FD/* Thread switch control on others */ +#define SPRN_TST 0x3FC/* Thread switch timeout on others */ OK, the tab to space for lines like
SPRN_HID6I understand. But then you seem to be trying to do indenting with 3 spaces instead of tabs.
It's what the rest of the file uses. It might not correspond to CodingStyle, but it makes it easy to read.
(Now, I'm not sure it's a good idea to define the meanings of HID bits in the global register include, but that's unrelated to the whitespace cleanup Mikey did.)
-Olof