diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-26 23:31:01 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-26 23:31:01 -0400 |
commit | e4c2cfee5d5cf3e4c16b423be23551aeddf2717b (patch) | |
tree | 656b3feabfb595448b04f4111ea82f6e395d1e0a | |
parent | a56d276c05a80ce727902076a3b4c6247705e2df (diff) |
sh: Various cosmetic cleanups.
We had quite a bit of whitespace damage, clean most of it up..
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/boards/dreamcast/irq.c | 8 | ||||
-rw-r--r-- | arch/sh/boards/dreamcast/rtc.c | 18 | ||||
-rw-r--r-- | arch/sh/boards/dreamcast/setup.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/renesas/edosk7705/Makefile | 4 | ||||
-rw-r--r-- | arch/sh/boards/renesas/hs7751rvoip/Makefile | 4 | ||||
-rw-r--r-- | arch/sh/boards/renesas/hs7751rvoip/io.c | 4 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/Makefile | 4 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/led.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/setup.c | 3 | ||||
-rw-r--r-- | arch/sh/drivers/dma/dma-pvr2.c | 5 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/clock.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4/sq.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/entry.S | 18 | ||||
-rw-r--r-- | arch/sh/kernel/ptrace.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/sh_ksyms.c | 2 | ||||
-rw-r--r-- | drivers/char/watchdog/shwdt.c | 58 | ||||
-rw-r--r-- | include/asm-sh/atomic.h | 1 | ||||
-rw-r--r-- | include/asm-sh/bitops.h | 16 | ||||
-rw-r--r-- | include/asm-sh/checksum.h | 2 | ||||
-rw-r--r-- | include/asm-sh/fixmap.h | 2 | ||||
-rw-r--r-- | include/asm-sh/watchdog.h | 3 |
21 files changed, 60 insertions, 106 deletions
diff --git a/arch/sh/boards/dreamcast/irq.c b/arch/sh/boards/dreamcast/irq.c index b10a6b11c034..373a22e48ac4 100644 --- a/arch/sh/boards/dreamcast/irq.c +++ b/arch/sh/boards/dreamcast/irq.c | |||
@@ -26,10 +26,10 @@ | |||
26 | event. | 26 | event. |
27 | 27 | ||
28 | There are three 32-bit ESRs located at 0xa05f8900 - 0xa05f6908. Event | 28 | There are three 32-bit ESRs located at 0xa05f8900 - 0xa05f6908. Event |
29 | types can be found in include/asm-sh/dc_sysasic.h. There are three groups | 29 | types can be found in include/asm-sh/dreamcast/sysasic.h. There are three |
30 | of EMRs that parallel the ESRs. Each EMR group corresponds to an IRQ, so | 30 | groups of EMRs that parallel the ESRs. Each EMR group corresponds to an |
31 | 0xa05f6910 - 0xa05f6918 triggers IRQ 13, 0xa05f6920 - 0xa05f6928 triggers | 31 | IRQ, so 0xa05f6910 - 0xa05f6918 triggers IRQ 13, 0xa05f6920 - 0xa05f6928 |
32 | IRQ 11, and 0xa05f6930 - 0xa05f6938 triggers IRQ 9. | 32 | triggers IRQ 11, and 0xa05f6930 - 0xa05f6938 triggers IRQ 9. |
33 | 33 | ||
34 | In the kernel, these events are mapped to virtual IRQs so that drivers can | 34 | In the kernel, these events are mapped to virtual IRQs so that drivers can |
35 | respond to them as they would a normal interrupt. In order to keep this | 35 | respond to them as they would a normal interrupt. In order to keep this |
diff --git a/arch/sh/boards/dreamcast/rtc.c b/arch/sh/boards/dreamcast/rtc.c index 379de1629134..44420494dc22 100644 --- a/arch/sh/boards/dreamcast/rtc.c +++ b/arch/sh/boards/dreamcast/rtc.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* arch/sh/kernel/rtc-aica.c | 1 | /* |
2 | * arch/sh/boards/dreamcast/rtc.c | ||
2 | * | 3 | * |
3 | * Dreamcast AICA RTC routines. | 4 | * Dreamcast AICA RTC routines. |
4 | * | 5 | * |
@@ -10,15 +11,12 @@ | |||
10 | */ | 11 | */ |
11 | 12 | ||
12 | #include <linux/time.h> | 13 | #include <linux/time.h> |
13 | 14 | #include <asm/rtc.h> | |
14 | #include <asm/io.h> | 15 | #include <asm/io.h> |
15 | 16 | ||
16 | extern void (*rtc_get_time)(struct timespec *); | ||
17 | extern int (*rtc_set_time)(const time_t); | ||
18 | |||
19 | /* The AICA RTC has an Epoch of 1/1/1950, so we must subtract 20 years (in | 17 | /* The AICA RTC has an Epoch of 1/1/1950, so we must subtract 20 years (in |
20 | seconds to get the standard Unix Epoch when getting the time, and add 20 | 18 | seconds) to get the standard Unix Epoch when getting the time, and add |
21 | years when setting the time. */ | 19 | 20 years when setting the time. */ |
22 | #define TWENTY_YEARS ((20 * 365LU + 5) * 86400) | 20 | #define TWENTY_YEARS ((20 * 365LU + 5) * 86400) |
23 | 21 | ||
24 | /* The AICA RTC is represented by a 32-bit seconds counter stored in 2 16-bit | 22 | /* The AICA RTC is represented by a 32-bit seconds counter stored in 2 16-bit |
@@ -32,7 +30,8 @@ extern int (*rtc_set_time)(const time_t); | |||
32 | * | 30 | * |
33 | * Grabs the current RTC seconds counter and adjusts it to the Unix Epoch. | 31 | * Grabs the current RTC seconds counter and adjusts it to the Unix Epoch. |
34 | */ | 32 | */ |
35 | void aica_rtc_gettimeofday(struct timespec *ts) { | 33 | void aica_rtc_gettimeofday(struct timespec *ts) |
34 | { | ||
36 | unsigned long val1, val2; | 35 | unsigned long val1, val2; |
37 | 36 | ||
38 | do { | 37 | do { |
@@ -55,7 +54,8 @@ void aica_rtc_gettimeofday(struct timespec *ts) { | |||
55 | * | 54 | * |
56 | * Adjusts the given @tv to the AICA Epoch and sets the RTC seconds counter. | 55 | * Adjusts the given @tv to the AICA Epoch and sets the RTC seconds counter. |
57 | */ | 56 | */ |
58 | int aica_rtc_settimeofday(const time_t secs) { | 57 | int aica_rtc_settimeofday(const time_t secs) |
58 | { | ||
59 | unsigned long val1, val2; | 59 | unsigned long val1, val2; |
60 | unsigned long adj = secs + TWENTY_YEARS; | 60 | unsigned long adj = secs + TWENTY_YEARS; |
61 | 61 | ||
diff --git a/arch/sh/boards/dreamcast/setup.c b/arch/sh/boards/dreamcast/setup.c index 0027b80a2343..a00ac94beb05 100644 --- a/arch/sh/boards/dreamcast/setup.c +++ b/arch/sh/boards/dreamcast/setup.c | |||
@@ -25,18 +25,16 @@ | |||
25 | 25 | ||
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
28 | #include <asm/rtc.h> | ||
28 | #include <asm/machvec.h> | 29 | #include <asm/machvec.h> |
29 | #include <asm/machvec_init.h> | ||
30 | #include <asm/mach/sysasic.h> | 30 | #include <asm/mach/sysasic.h> |
31 | 31 | ||
32 | extern struct hw_interrupt_type systemasic_int; | 32 | extern struct hw_interrupt_type systemasic_int; |
33 | /* XXX: Move this into it's proper header. */ | ||
34 | extern void (*board_time_init)(void); | ||
35 | extern void aica_time_init(void); | 33 | extern void aica_time_init(void); |
36 | extern int gapspci_init(void); | 34 | extern int gapspci_init(void); |
37 | extern int systemasic_irq_demux(int); | 35 | extern int systemasic_irq_demux(int); |
38 | 36 | ||
39 | void *dreamcast_consistent_alloc(struct device *, size_t, dma_addr_t *, int); | 37 | void *dreamcast_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t); |
40 | int dreamcast_consistent_free(struct device *, size_t, void *, dma_addr_t); | 38 | int dreamcast_consistent_free(struct device *, size_t, void *, dma_addr_t); |
41 | 39 | ||
42 | const char *get_system_type(void) | 40 | const char *get_system_type(void) |
diff --git a/arch/sh/boards/renesas/edosk7705/Makefile b/arch/sh/boards/renesas/edosk7705/Makefile index 7fccbf2e4a1d..14bdd531f116 100644 --- a/arch/sh/boards/renesas/edosk7705/Makefile +++ b/arch/sh/boards/renesas/edosk7705/Makefile | |||
@@ -1,10 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the EDOSK7705 specific parts of the kernel | 2 | # Makefile for the EDOSK7705 specific parts of the kernel |
3 | # | 3 | # |
4 | # Note! Dependencies are done automagically by 'make dep', which also | ||
5 | # removes any old dependencies. DON'T put your own dependencies here | ||
6 | # unless it's something special (ie not a .c file). | ||
7 | # | ||
8 | 4 | ||
9 | obj-y := setup.o io.o | 5 | obj-y := setup.o io.o |
10 | 6 | ||
diff --git a/arch/sh/boards/renesas/hs7751rvoip/Makefile b/arch/sh/boards/renesas/hs7751rvoip/Makefile index e8b4109ace11..3ef8cbaa0b37 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/Makefile +++ b/arch/sh/boards/renesas/hs7751rvoip/Makefile | |||
@@ -1,10 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the HS7751RVoIP specific parts of the kernel | 2 | # Makefile for the HS7751RVoIP specific parts of the kernel |
3 | # | 3 | # |
4 | # Note! Dependencies are done automagically by 'make dep', which also | ||
5 | # removes any old dependencies. DON'T put your own dependencies here | ||
6 | # unless it's something special (ie not a .c file). | ||
7 | # | ||
8 | 4 | ||
9 | obj-y := mach.o setup.o io.o irq.o led.o | 5 | obj-y := mach.o setup.o io.o irq.o led.o |
10 | 6 | ||
diff --git a/arch/sh/boards/renesas/hs7751rvoip/io.c b/arch/sh/boards/renesas/hs7751rvoip/io.c index 3a1abfa2fefb..09fb77ffb835 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/io.c +++ b/arch/sh/boards/renesas/hs7751rvoip/io.c | |||
@@ -167,7 +167,7 @@ void hs7751rvoip_outb(unsigned char value, unsigned long port) | |||
167 | *(volatile unsigned char *)port = value; | 167 | *(volatile unsigned char *)port = value; |
168 | #if defined(CONFIG_HS7751RVOIP_CODEC) | 168 | #if defined(CONFIG_HS7751RVOIP_CODEC) |
169 | else if (codec_port(port)) | 169 | else if (codec_port(port)) |
170 | *(volatile unsigned cjar *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value; | 170 | *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value; |
171 | #endif | 171 | #endif |
172 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) | 172 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) |
173 | *(unsigned char *)PCI_IOMAP(port) = value; | 173 | *(unsigned char *)PCI_IOMAP(port) = value; |
@@ -181,7 +181,7 @@ void hs7751rvoip_outb_p(unsigned char value, unsigned long port) | |||
181 | *(volatile unsigned char *)port = value; | 181 | *(volatile unsigned char *)port = value; |
182 | #if defined(CONFIG_HS7751RVOIP_CODEC) | 182 | #if defined(CONFIG_HS7751RVOIP_CODEC) |
183 | else if (codec_port(port)) | 183 | else if (codec_port(port)) |
184 | *(volatile unsigned cjar *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value; | 184 | *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value; |
185 | #endif | 185 | #endif |
186 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) | 186 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) |
187 | *(unsigned char *)PCI_IOMAP(port) = value; | 187 | *(unsigned char *)PCI_IOMAP(port) = value; |
diff --git a/arch/sh/boards/renesas/rts7751r2d/Makefile b/arch/sh/boards/renesas/rts7751r2d/Makefile index daa53334bdc3..eee1ed6f5727 100644 --- a/arch/sh/boards/renesas/rts7751r2d/Makefile +++ b/arch/sh/boards/renesas/rts7751r2d/Makefile | |||
@@ -1,10 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the RTS7751R2D specific parts of the kernel | 2 | # Makefile for the RTS7751R2D specific parts of the kernel |
3 | # | 3 | # |
4 | # Note! Dependencies are done automagically by 'make dep', which also | ||
5 | # removes any old dependencies. DON'T put your own dependencies here | ||
6 | # unless it's something special (ie not a .c file). | ||
7 | # | ||
8 | 4 | ||
9 | obj-y := mach.o setup.o io.o irq.o led.o | 5 | obj-y := mach.o setup.o io.o irq.o led.o |
10 | 6 | ||
diff --git a/arch/sh/boards/renesas/rts7751r2d/led.c b/arch/sh/boards/renesas/rts7751r2d/led.c index 4d16de71fac1..cf35f90dfe03 100644 --- a/arch/sh/boards/renesas/rts7751r2d/led.c +++ b/arch/sh/boards/renesas/rts7751r2d/led.c | |||
@@ -12,8 +12,6 @@ | |||
12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
13 | #include <asm/rts7751r2d/rts7751r2d.h> | 13 | #include <asm/rts7751r2d/rts7751r2d.h> |
14 | 14 | ||
15 | extern unsigned int debug_counter; | ||
16 | |||
17 | #ifdef CONFIG_HEARTBEAT | 15 | #ifdef CONFIG_HEARTBEAT |
18 | 16 | ||
19 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index 7953dde0b91c..60907f574f34 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -14,8 +14,6 @@ | |||
14 | #include <asm/io.h> | 14 | #include <asm/io.h> |
15 | #include <asm/rts7751r2d/rts7751r2d.h> | 15 | #include <asm/rts7751r2d/rts7751r2d.h> |
16 | 16 | ||
17 | unsigned int debug_counter; | ||
18 | |||
19 | const char *get_system_type(void) | 17 | const char *get_system_type(void) |
20 | { | 18 | { |
21 | return "RTS7751R2D"; | 19 | return "RTS7751R2D"; |
@@ -34,5 +32,4 @@ void __init platform_setup(void) | |||
34 | printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n"); | 32 | printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n"); |
35 | ctrl_outw(0x0000, PA_OUTPORT); | 33 | ctrl_outw(0x0000, PA_OUTPORT); |
36 | pm_power_off = rts7751r2d_power_off; | 34 | pm_power_off = rts7751r2d_power_off; |
37 | debug_counter = 0; | ||
38 | } | 35 | } |
diff --git a/arch/sh/drivers/dma/dma-pvr2.c b/arch/sh/drivers/dma/dma-pvr2.c index 30a580aa7cbd..3b0b0f60bb3c 100644 --- a/arch/sh/drivers/dma/dma-pvr2.c +++ b/arch/sh/drivers/dma/dma-pvr2.c | |||
@@ -18,8 +18,8 @@ | |||
18 | #include <asm/dma.h> | 18 | #include <asm/dma.h> |
19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
20 | 20 | ||
21 | static unsigned int xfer_complete = 0; | 21 | static unsigned int xfer_complete; |
22 | static int count = 0; | 22 | static int count; |
23 | 23 | ||
24 | static irqreturn_t pvr2_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 24 | static irqreturn_t pvr2_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
25 | { | 25 | { |
@@ -107,4 +107,3 @@ module_exit(pvr2_dma_exit); | |||
107 | MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>"); | 107 | MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>"); |
108 | MODULE_DESCRIPTION("NEC PowerVR 2 DMA driver"); | 108 | MODULE_DESCRIPTION("NEC PowerVR 2 DMA driver"); |
109 | MODULE_LICENSE("GPL"); | 109 | MODULE_LICENSE("GPL"); |
110 | |||
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index 97fa37f42b84..e7eef07536f5 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c | |||
@@ -225,7 +225,7 @@ int __init clk_init(void) | |||
225 | { | 225 | { |
226 | int i, ret = 0; | 226 | int i, ret = 0; |
227 | 227 | ||
228 | BUG_ON(unlikely(!master_clk.rate)); | 228 | BUG_ON(!master_clk.rate); |
229 | 229 | ||
230 | for (i = 0; i < ARRAY_SIZE(onchip_clocks); i++) { | 230 | for (i = 0; i < ARRAY_SIZE(onchip_clocks); i++) { |
231 | struct clk *clk = onchip_clocks[i]; | 231 | struct clk *clk = onchip_clocks[i]; |
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index b09805f3ee23..00f6a3c8c43b 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c | |||
@@ -24,9 +24,10 @@ | |||
24 | #include <linux/proc_fs.h> | 24 | #include <linux/proc_fs.h> |
25 | #include <linux/miscdevice.h> | 25 | #include <linux/miscdevice.h> |
26 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
27 | 27 | #include <linux/mm.h> | |
28 | #include <asm/io.h> | 28 | #include <asm/io.h> |
29 | #include <asm/page.h> | 29 | #include <asm/page.h> |
30 | #include <asm/cacheflush.h> | ||
30 | #include <asm/mmu_context.h> | 31 | #include <asm/mmu_context.h> |
31 | #include <asm/cpu/sq.h> | 32 | #include <asm/cpu/sq.h> |
32 | 33 | ||
diff --git a/arch/sh/kernel/entry.S b/arch/sh/kernel/entry.S index 1a05804caf37..306eb8d83de5 100644 --- a/arch/sh/kernel/entry.S +++ b/arch/sh/kernel/entry.S | |||
@@ -18,24 +18,6 @@ | |||
18 | #include <asm/cpu/mmu_context.h> | 18 | #include <asm/cpu/mmu_context.h> |
19 | #include <asm/unistd.h> | 19 | #include <asm/unistd.h> |
20 | 20 | ||
21 | #if !defined(CONFIG_NFSD) && !defined(CONFIG_NFSD_MODULE) | ||
22 | #define sys_nfsservctl sys_ni_syscall | ||
23 | #endif | ||
24 | |||
25 | #if !defined(CONFIG_MMU) | ||
26 | #define sys_madvise sys_ni_syscall | ||
27 | #define sys_readahead sys_ni_syscall | ||
28 | #define sys_mprotect sys_ni_syscall | ||
29 | #define sys_msync sys_ni_syscall | ||
30 | #define sys_mlock sys_ni_syscall | ||
31 | #define sys_munlock sys_ni_syscall | ||
32 | #define sys_mlockall sys_ni_syscall | ||
33 | #define sys_munlockall sys_ni_syscall | ||
34 | #define sys_mremap sys_ni_syscall | ||
35 | #define sys_mincore sys_ni_syscall | ||
36 | #define sys_remap_file_pages sys_ni_syscall | ||
37 | #endif | ||
38 | |||
39 | ! NOTE: | 21 | ! NOTE: |
40 | ! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address | 22 | ! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address |
41 | ! to be jumped is too far, but it causes illegal slot exception. | 23 | ! to be jumped is too far, but it causes illegal slot exception. |
diff --git a/arch/sh/kernel/ptrace.c b/arch/sh/kernel/ptrace.c index f7eebbde3291..04ca13a041c1 100644 --- a/arch/sh/kernel/ptrace.c +++ b/arch/sh/kernel/ptrace.c | |||
@@ -224,7 +224,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
224 | 224 | ||
225 | case PTRACE_SETDSPREGS: { | 225 | case PTRACE_SETDSPREGS: { |
226 | unsigned long dp; | 226 | unsigned long dp; |
227 | int i; | ||
228 | 227 | ||
229 | ret = -EIO; | 228 | ret = -EIO; |
230 | dp = ((unsigned long) child) + THREAD_SIZE - | 229 | dp = ((unsigned long) child) + THREAD_SIZE - |
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index 245ed8f945e8..8cad80cec9a6 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c | |||
@@ -117,6 +117,8 @@ EXPORT_SYMBOL(synchronize_irq); | |||
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | EXPORT_SYMBOL(csum_partial); | 119 | EXPORT_SYMBOL(csum_partial); |
120 | #ifdef CONFIG_IPV6 | ||
120 | EXPORT_SYMBOL(csum_ipv6_magic); | 121 | EXPORT_SYMBOL(csum_ipv6_magic); |
122 | #endif | ||
121 | EXPORT_SYMBOL(consistent_sync); | 123 | EXPORT_SYMBOL(consistent_sync); |
122 | EXPORT_SYMBOL(clear_page); | 124 | EXPORT_SYMBOL(clear_page); |
diff --git a/drivers/char/watchdog/shwdt.c b/drivers/char/watchdog/shwdt.c index 1355038f1044..7c39f39effdf 100644 --- a/drivers/char/watchdog/shwdt.c +++ b/drivers/char/watchdog/shwdt.c | |||
@@ -125,7 +125,6 @@ static void sh_wdt_start(void) | |||
125 | 125 | ||
126 | /** | 126 | /** |
127 | * sh_wdt_stop - Stop the Watchdog | 127 | * sh_wdt_stop - Stop the Watchdog |
128 | * | ||
129 | * Stops the watchdog. | 128 | * Stops the watchdog. |
130 | */ | 129 | */ |
131 | static void sh_wdt_stop(void) | 130 | static void sh_wdt_stop(void) |
@@ -141,22 +140,20 @@ static void sh_wdt_stop(void) | |||
141 | 140 | ||
142 | /** | 141 | /** |
143 | * sh_wdt_keepalive - Keep the Userspace Watchdog Alive | 142 | * sh_wdt_keepalive - Keep the Userspace Watchdog Alive |
144 | * | ||
145 | * The Userspace watchdog got a KeepAlive: schedule the next heartbeat. | 143 | * The Userspace watchdog got a KeepAlive: schedule the next heartbeat. |
146 | */ | 144 | */ |
147 | static void sh_wdt_keepalive(void) | 145 | static inline void sh_wdt_keepalive(void) |
148 | { | 146 | { |
149 | next_heartbeat = jiffies + (heartbeat * HZ); | 147 | next_heartbeat = jiffies + (heartbeat * HZ); |
150 | } | 148 | } |
151 | 149 | ||
152 | /** | 150 | /** |
153 | * sh_wdt_set_heartbeat - Set the Userspace Watchdog heartbeat | 151 | * sh_wdt_set_heartbeat - Set the Userspace Watchdog heartbeat |
154 | * | ||
155 | * Set the Userspace Watchdog heartbeat | 152 | * Set the Userspace Watchdog heartbeat |
156 | */ | 153 | */ |
157 | static int sh_wdt_set_heartbeat(int t) | 154 | static int sh_wdt_set_heartbeat(int t) |
158 | { | 155 | { |
159 | if ((t < 1) || (t > 3600)) /* arbitrary upper limit */ | 156 | if (unlikely((t < 1) || (t > 3600))) /* arbitrary upper limit */ |
160 | return -EINVAL; | 157 | return -EINVAL; |
161 | 158 | ||
162 | heartbeat = t; | 159 | heartbeat = t; |
@@ -165,7 +162,6 @@ static int sh_wdt_set_heartbeat(int t) | |||
165 | 162 | ||
166 | /** | 163 | /** |
167 | * sh_wdt_ping - Ping the Watchdog | 164 | * sh_wdt_ping - Ping the Watchdog |
168 | * | ||
169 | * @data: Unused | 165 | * @data: Unused |
170 | * | 166 | * |
171 | * Clears overflow bit, resets timer counter. | 167 | * Clears overflow bit, resets timer counter. |
@@ -182,14 +178,13 @@ static void sh_wdt_ping(unsigned long data) | |||
182 | sh_wdt_write_cnt(0); | 178 | sh_wdt_write_cnt(0); |
183 | 179 | ||
184 | mod_timer(&timer, next_ping_period(clock_division_ratio)); | 180 | mod_timer(&timer, next_ping_period(clock_division_ratio)); |
185 | } else { | 181 | } else |
186 | printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n"); | 182 | printk(KERN_WARNING PFX "Heartbeat lost! Will not ping " |
187 | } | 183 | "the watchdog\n"); |
188 | } | 184 | } |
189 | 185 | ||
190 | /** | 186 | /** |
191 | * sh_wdt_open - Open the Device | 187 | * sh_wdt_open - Open the Device |
192 | * | ||
193 | * @inode: inode of device | 188 | * @inode: inode of device |
194 | * @file: file handle of device | 189 | * @file: file handle of device |
195 | * | 190 | * |
@@ -209,7 +204,6 @@ static int sh_wdt_open(struct inode *inode, struct file *file) | |||
209 | 204 | ||
210 | /** | 205 | /** |
211 | * sh_wdt_close - Close the Device | 206 | * sh_wdt_close - Close the Device |
212 | * | ||
213 | * @inode: inode of device | 207 | * @inode: inode of device |
214 | * @file: file handle of device | 208 | * @file: file handle of device |
215 | * | 209 | * |
@@ -220,7 +214,8 @@ static int sh_wdt_close(struct inode *inode, struct file *file) | |||
220 | if (shwdt_expect_close == 42) { | 214 | if (shwdt_expect_close == 42) { |
221 | sh_wdt_stop(); | 215 | sh_wdt_stop(); |
222 | } else { | 216 | } else { |
223 | printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n"); | 217 | printk(KERN_CRIT PFX "Unexpected close, not " |
218 | "stopping watchdog!\n"); | ||
224 | sh_wdt_keepalive(); | 219 | sh_wdt_keepalive(); |
225 | } | 220 | } |
226 | 221 | ||
@@ -232,7 +227,6 @@ static int sh_wdt_close(struct inode *inode, struct file *file) | |||
232 | 227 | ||
233 | /** | 228 | /** |
234 | * sh_wdt_write - Write to Device | 229 | * sh_wdt_write - Write to Device |
235 | * | ||
236 | * @file: file handle of device | 230 | * @file: file handle of device |
237 | * @buf: buffer to write | 231 | * @buf: buffer to write |
238 | * @count: length of buffer | 232 | * @count: length of buffer |
@@ -265,7 +259,6 @@ static ssize_t sh_wdt_write(struct file *file, const char *buf, | |||
265 | 259 | ||
266 | /** | 260 | /** |
267 | * sh_wdt_ioctl - Query Device | 261 | * sh_wdt_ioctl - Query Device |
268 | * | ||
269 | * @inode: inode of device | 262 | * @inode: inode of device |
270 | * @file: file handle of device | 263 | * @file: file handle of device |
271 | * @cmd: watchdog command | 264 | * @cmd: watchdog command |
@@ -326,7 +319,6 @@ static int sh_wdt_ioctl(struct inode *inode, struct file *file, | |||
326 | 319 | ||
327 | /** | 320 | /** |
328 | * sh_wdt_notify_sys - Notifier Handler | 321 | * sh_wdt_notify_sys - Notifier Handler |
329 | * | ||
330 | * @this: notifier block | 322 | * @this: notifier block |
331 | * @code: notifier event | 323 | * @code: notifier event |
332 | * @unused: unused | 324 | * @unused: unused |
@@ -337,9 +329,8 @@ static int sh_wdt_ioctl(struct inode *inode, struct file *file, | |||
337 | static int sh_wdt_notify_sys(struct notifier_block *this, | 329 | static int sh_wdt_notify_sys(struct notifier_block *this, |
338 | unsigned long code, void *unused) | 330 | unsigned long code, void *unused) |
339 | { | 331 | { |
340 | if (code == SYS_DOWN || code == SYS_HALT) { | 332 | if (code == SYS_DOWN || code == SYS_HALT) |
341 | sh_wdt_stop(); | 333 | sh_wdt_stop(); |
342 | } | ||
343 | 334 | ||
344 | return NOTIFY_DONE; | 335 | return NOTIFY_DONE; |
345 | } | 336 | } |
@@ -354,7 +345,8 @@ static const struct file_operations sh_wdt_fops = { | |||
354 | }; | 345 | }; |
355 | 346 | ||
356 | static struct watchdog_info sh_wdt_info = { | 347 | static struct watchdog_info sh_wdt_info = { |
357 | .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE, | 348 | .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | |
349 | WDIOF_MAGICCLOSE, | ||
358 | .firmware_version = 1, | 350 | .firmware_version = 1, |
359 | .identity = "SH WDT", | 351 | .identity = "SH WDT", |
360 | }; | 352 | }; |
@@ -371,7 +363,6 @@ static struct miscdevice sh_wdt_miscdev = { | |||
371 | 363 | ||
372 | /** | 364 | /** |
373 | * sh_wdt_init - Initialize module | 365 | * sh_wdt_init - Initialize module |
374 | * | ||
375 | * Registers the device and notifier handler. Actual device | 366 | * Registers the device and notifier handler. Actual device |
376 | * initialization is handled by sh_wdt_open(). | 367 | * initialization is handled by sh_wdt_open(). |
377 | */ | 368 | */ |
@@ -381,15 +372,15 @@ static int __init sh_wdt_init(void) | |||
381 | 372 | ||
382 | if ((clock_division_ratio < 0x5) || (clock_division_ratio > 0x7)) { | 373 | if ((clock_division_ratio < 0x5) || (clock_division_ratio > 0x7)) { |
383 | clock_division_ratio = WTCSR_CKS_4096; | 374 | clock_division_ratio = WTCSR_CKS_4096; |
384 | printk(KERN_INFO PFX "clock_division_ratio value must be 0x5<=x<=0x7, using %d\n", | 375 | printk(KERN_INFO PFX "clock_division_ratio value must " |
385 | clock_division_ratio); | 376 | "be 0x5<=x<=0x7, using %d\n", clock_division_ratio); |
386 | } | 377 | } |
387 | 378 | ||
388 | if (sh_wdt_set_heartbeat(heartbeat)) | 379 | rc = sh_wdt_set_heartbeat(heartbeat); |
389 | { | 380 | if (unlikely(rc)) { |
390 | heartbeat = WATCHDOG_HEARTBEAT; | 381 | heartbeat = WATCHDOG_HEARTBEAT; |
391 | printk(KERN_INFO PFX "heartbeat value must be 1<=x<=3600, using %d\n", | 382 | printk(KERN_INFO PFX "heartbeat value must " |
392 | heartbeat); | 383 | "be 1<=x<=3600, using %d\n", heartbeat); |
393 | } | 384 | } |
394 | 385 | ||
395 | init_timer(&timer); | 386 | init_timer(&timer); |
@@ -397,15 +388,16 @@ static int __init sh_wdt_init(void) | |||
397 | timer.data = 0; | 388 | timer.data = 0; |
398 | 389 | ||
399 | rc = register_reboot_notifier(&sh_wdt_notifier); | 390 | rc = register_reboot_notifier(&sh_wdt_notifier); |
400 | if (rc) { | 391 | if (unlikely(rc)) { |
401 | printk(KERN_ERR PFX "Can't register reboot notifier (err=%d)\n", rc); | 392 | printk(KERN_ERR PFX "Can't register reboot notifier (err=%d)\n", |
393 | rc); | ||
402 | return rc; | 394 | return rc; |
403 | } | 395 | } |
404 | 396 | ||
405 | rc = misc_register(&sh_wdt_miscdev); | 397 | rc = misc_register(&sh_wdt_miscdev); |
406 | if (rc) { | 398 | if (unlikely(rc)) { |
407 | printk(KERN_ERR PFX "Can't register miscdev on minor=%d (err=%d)\n", | 399 | printk(KERN_ERR PFX "Can't register miscdev on " |
408 | sh_wdt_miscdev.minor, rc); | 400 | "minor=%d (err=%d)\n", sh_wdt_miscdev.minor, rc); |
409 | unregister_reboot_notifier(&sh_wdt_notifier); | 401 | unregister_reboot_notifier(&sh_wdt_notifier); |
410 | return rc; | 402 | return rc; |
411 | } | 403 | } |
@@ -418,7 +410,6 @@ static int __init sh_wdt_init(void) | |||
418 | 410 | ||
419 | /** | 411 | /** |
420 | * sh_wdt_exit - Deinitialize module | 412 | * sh_wdt_exit - Deinitialize module |
421 | * | ||
422 | * Unregisters the device and notifier handler. Actual device | 413 | * Unregisters the device and notifier handler. Actual device |
423 | * deinitialization is handled by sh_wdt_close(). | 414 | * deinitialization is handled by sh_wdt_close(). |
424 | */ | 415 | */ |
@@ -434,14 +425,13 @@ MODULE_LICENSE("GPL"); | |||
434 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); | 425 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); |
435 | 426 | ||
436 | module_param(clock_division_ratio, int, 0); | 427 | module_param(clock_division_ratio, int, 0); |
437 | MODULE_PARM_DESC(clock_division_ratio, "Clock division ratio. Valid ranges are from 0x5 (1.31ms) to 0x7 (5.25ms). Defaults to 0x7."); | 428 | MODULE_PARM_DESC(clock_division_ratio, "Clock division ratio. Valid ranges are from 0x5 (1.31ms) to 0x7 (5.25ms). (default=" __MODULE_STRING(clock_division_ratio) ")"); |
438 | 429 | ||
439 | module_param(heartbeat, int, 0); | 430 | module_param(heartbeat, int, 0); |
440 | MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (1<=heartbeat<=3600, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); | 431 | MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (1<=heartbeat<=3600, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); |
441 | 432 | ||
442 | module_param(nowayout, int, 0); | 433 | module_param(nowayout, int, 0); |
443 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)"); | 434 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
444 | 435 | ||
445 | module_init(sh_wdt_init); | 436 | module_init(sh_wdt_init); |
446 | module_exit(sh_wdt_exit); | 437 | module_exit(sh_wdt_exit); |
447 | |||
diff --git a/include/asm-sh/atomic.h b/include/asm-sh/atomic.h index fb627de217f2..049eb2dda6b6 100644 --- a/include/asm-sh/atomic.h +++ b/include/asm-sh/atomic.h | |||
@@ -14,6 +14,7 @@ typedef struct { volatile int counter; } atomic_t; | |||
14 | #define atomic_read(v) ((v)->counter) | 14 | #define atomic_read(v) ((v)->counter) |
15 | #define atomic_set(v,i) ((v)->counter = (i)) | 15 | #define atomic_set(v,i) ((v)->counter = (i)) |
16 | 16 | ||
17 | #include <linux/compiler.h> | ||
17 | #include <asm/system.h> | 18 | #include <asm/system.h> |
18 | 19 | ||
19 | /* | 20 | /* |
diff --git a/include/asm-sh/bitops.h b/include/asm-sh/bitops.h index e34f82508568..1c16792cee1d 100644 --- a/include/asm-sh/bitops.h +++ b/include/asm-sh/bitops.h | |||
@@ -6,7 +6,7 @@ | |||
6 | /* For __swab32 */ | 6 | /* For __swab32 */ |
7 | #include <asm/byteorder.h> | 7 | #include <asm/byteorder.h> |
8 | 8 | ||
9 | static __inline__ void set_bit(int nr, volatile void * addr) | 9 | static inline void set_bit(int nr, volatile void * addr) |
10 | { | 10 | { |
11 | int mask; | 11 | int mask; |
12 | volatile unsigned int *a = addr; | 12 | volatile unsigned int *a = addr; |
@@ -24,7 +24,7 @@ static __inline__ void set_bit(int nr, volatile void * addr) | |||
24 | */ | 24 | */ |
25 | #define smp_mb__before_clear_bit() barrier() | 25 | #define smp_mb__before_clear_bit() barrier() |
26 | #define smp_mb__after_clear_bit() barrier() | 26 | #define smp_mb__after_clear_bit() barrier() |
27 | static __inline__ void clear_bit(int nr, volatile void * addr) | 27 | static inline void clear_bit(int nr, volatile void * addr) |
28 | { | 28 | { |
29 | int mask; | 29 | int mask; |
30 | volatile unsigned int *a = addr; | 30 | volatile unsigned int *a = addr; |
@@ -37,7 +37,7 @@ static __inline__ void clear_bit(int nr, volatile void * addr) | |||
37 | local_irq_restore(flags); | 37 | local_irq_restore(flags); |
38 | } | 38 | } |
39 | 39 | ||
40 | static __inline__ void change_bit(int nr, volatile void * addr) | 40 | static inline void change_bit(int nr, volatile void * addr) |
41 | { | 41 | { |
42 | int mask; | 42 | int mask; |
43 | volatile unsigned int *a = addr; | 43 | volatile unsigned int *a = addr; |
@@ -50,7 +50,7 @@ static __inline__ void change_bit(int nr, volatile void * addr) | |||
50 | local_irq_restore(flags); | 50 | local_irq_restore(flags); |
51 | } | 51 | } |
52 | 52 | ||
53 | static __inline__ int test_and_set_bit(int nr, volatile void * addr) | 53 | static inline int test_and_set_bit(int nr, volatile void * addr) |
54 | { | 54 | { |
55 | int mask, retval; | 55 | int mask, retval; |
56 | volatile unsigned int *a = addr; | 56 | volatile unsigned int *a = addr; |
@@ -66,7 +66,7 @@ static __inline__ int test_and_set_bit(int nr, volatile void * addr) | |||
66 | return retval; | 66 | return retval; |
67 | } | 67 | } |
68 | 68 | ||
69 | static __inline__ int test_and_clear_bit(int nr, volatile void * addr) | 69 | static inline int test_and_clear_bit(int nr, volatile void * addr) |
70 | { | 70 | { |
71 | int mask, retval; | 71 | int mask, retval; |
72 | volatile unsigned int *a = addr; | 72 | volatile unsigned int *a = addr; |
@@ -82,7 +82,7 @@ static __inline__ int test_and_clear_bit(int nr, volatile void * addr) | |||
82 | return retval; | 82 | return retval; |
83 | } | 83 | } |
84 | 84 | ||
85 | static __inline__ int test_and_change_bit(int nr, volatile void * addr) | 85 | static inline int test_and_change_bit(int nr, volatile void * addr) |
86 | { | 86 | { |
87 | int mask, retval; | 87 | int mask, retval; |
88 | volatile unsigned int *a = addr; | 88 | volatile unsigned int *a = addr; |
@@ -100,7 +100,7 @@ static __inline__ int test_and_change_bit(int nr, volatile void * addr) | |||
100 | 100 | ||
101 | #include <asm-generic/bitops/non-atomic.h> | 101 | #include <asm-generic/bitops/non-atomic.h> |
102 | 102 | ||
103 | static __inline__ unsigned long ffz(unsigned long word) | 103 | static inline unsigned long ffz(unsigned long word) |
104 | { | 104 | { |
105 | unsigned long result; | 105 | unsigned long result; |
106 | 106 | ||
@@ -120,7 +120,7 @@ static __inline__ unsigned long ffz(unsigned long word) | |||
120 | * | 120 | * |
121 | * Undefined if no bit exists, so code should check against 0 first. | 121 | * Undefined if no bit exists, so code should check against 0 first. |
122 | */ | 122 | */ |
123 | static __inline__ unsigned long __ffs(unsigned long word) | 123 | static inline unsigned long __ffs(unsigned long word) |
124 | { | 124 | { |
125 | unsigned long result; | 125 | unsigned long result; |
126 | 126 | ||
diff --git a/include/asm-sh/checksum.h b/include/asm-sh/checksum.h index fa03b30c4269..08168afe6746 100644 --- a/include/asm-sh/checksum.h +++ b/include/asm-sh/checksum.h | |||
@@ -159,6 +159,7 @@ static __inline__ unsigned short ip_compute_csum(unsigned char * buff, int len) | |||
159 | } | 159 | } |
160 | 160 | ||
161 | #define _HAVE_ARCH_IPV6_CSUM | 161 | #define _HAVE_ARCH_IPV6_CSUM |
162 | #ifdef CONFIG_IPV6 | ||
162 | static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, | 163 | static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, |
163 | struct in6_addr *daddr, | 164 | struct in6_addr *daddr, |
164 | __u32 len, | 165 | __u32 len, |
@@ -194,6 +195,7 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, | |||
194 | 195 | ||
195 | return csum_fold(sum); | 196 | return csum_fold(sum); |
196 | } | 197 | } |
198 | #endif | ||
197 | 199 | ||
198 | /* | 200 | /* |
199 | * Copy and checksum to user | 201 | * Copy and checksum to user |
diff --git a/include/asm-sh/fixmap.h b/include/asm-sh/fixmap.h index 412bccaa07e6..458e9fa59545 100644 --- a/include/asm-sh/fixmap.h +++ b/include/asm-sh/fixmap.h | |||
@@ -25,7 +25,7 @@ | |||
25 | * addresses. The point is to have a constant address at | 25 | * addresses. The point is to have a constant address at |
26 | * compile time, but to set the physical address only | 26 | * compile time, but to set the physical address only |
27 | * in the boot process. We allocate these special addresses | 27 | * in the boot process. We allocate these special addresses |
28 | * from the end of virtual memory (0xfffff000) backwards. | 28 | * from the end of P3 backwards. |
29 | * Also this lets us do fail-safe vmalloc(), we | 29 | * Also this lets us do fail-safe vmalloc(), we |
30 | * can guarantee that these special addresses and | 30 | * can guarantee that these special addresses and |
31 | * vmalloc()-ed addresses never overlap. | 31 | * vmalloc()-ed addresses never overlap. |
diff --git a/include/asm-sh/watchdog.h b/include/asm-sh/watchdog.h index 09ca41972a11..d19ea62ef8c6 100644 --- a/include/asm-sh/watchdog.h +++ b/include/asm-sh/watchdog.h | |||
@@ -62,7 +62,6 @@ | |||
62 | 62 | ||
63 | /** | 63 | /** |
64 | * sh_wdt_read_cnt - Read from Counter | 64 | * sh_wdt_read_cnt - Read from Counter |
65 | * | ||
66 | * Reads back the WTCNT value. | 65 | * Reads back the WTCNT value. |
67 | */ | 66 | */ |
68 | static inline __u8 sh_wdt_read_cnt(void) | 67 | static inline __u8 sh_wdt_read_cnt(void) |
@@ -72,7 +71,6 @@ static inline __u8 sh_wdt_read_cnt(void) | |||
72 | 71 | ||
73 | /** | 72 | /** |
74 | * sh_wdt_write_cnt - Write to Counter | 73 | * sh_wdt_write_cnt - Write to Counter |
75 | * | ||
76 | * @val: Value to write | 74 | * @val: Value to write |
77 | * | 75 | * |
78 | * Writes the given value @val to the lower byte of the timer counter. | 76 | * Writes the given value @val to the lower byte of the timer counter. |
@@ -95,7 +93,6 @@ static inline __u8 sh_wdt_read_csr(void) | |||
95 | 93 | ||
96 | /** | 94 | /** |
97 | * sh_wdt_write_csr - Write to Control/Status Register | 95 | * sh_wdt_write_csr - Write to Control/Status Register |
98 | * | ||
99 | * @val: Value to write | 96 | * @val: Value to write |
100 | * | 97 | * |
101 | * Writes the given value @val to the lower byte of the control/status | 98 | * Writes the given value @val to the lower byte of the control/status |