Skip to content

Commit 9ef595d

Browse files
JoePerchesdavem330
authored andcommitted
sparc: Convert naked unsigned uses to unsigned int
Use the more normal kernel definition/declaration style. Done via: $ git ls-files arch/sparc | \ xargs ./scripts/checkpatch.pl -f --fix-inplace --types=unspecified_int Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 08f8007 commit 9ef595d

File tree

15 files changed

+58
-58
lines changed

15 files changed

+58
-58
lines changed

arch/sparc/include/asm/compat_signal.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
#ifdef CONFIG_COMPAT
88
struct __new_sigaction32 {
9-
unsigned sa_handler;
9+
unsigned int sa_handler;
1010
unsigned int sa_flags;
11-
unsigned sa_restorer; /* not used by Linux/SPARC yet */
11+
unsigned int sa_restorer; /* not used by Linux/SPARC yet */
1212
compat_sigset_t sa_mask;
1313
};
1414

1515
struct __old_sigaction32 {
16-
unsigned sa_handler;
16+
unsigned int sa_handler;
1717
compat_old_sigset_t sa_mask;
1818
unsigned int sa_flags;
19-
unsigned sa_restorer; /* not used by Linux/SPARC yet */
19+
unsigned int sa_restorer; /* not used by Linux/SPARC yet */
2020
};
2121
#endif
2222

arch/sparc/include/asm/obio.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ static inline void bw_clear_intr_mask(int sbus_level, int mask)
117117
"i" (ASI_M_CTL));
118118
}
119119

120-
static inline unsigned bw_get_prof_limit(int cpu)
120+
static inline unsigned int bw_get_prof_limit(int cpu)
121121
{
122-
unsigned limit;
122+
unsigned int limit;
123123

124124
__asm__ __volatile__ ("lda [%1] %2, %0" :
125125
"=r" (limit) :
@@ -128,17 +128,17 @@ static inline unsigned bw_get_prof_limit(int cpu)
128128
return limit;
129129
}
130130

131-
static inline void bw_set_prof_limit(int cpu, unsigned limit)
131+
static inline void bw_set_prof_limit(int cpu, unsigned int limit)
132132
{
133133
__asm__ __volatile__ ("sta %0, [%1] %2" : :
134134
"r" (limit),
135135
"r" (CSR_BASE(cpu) + BW_PTIMER_LIMIT),
136136
"i" (ASI_M_CTL));
137137
}
138138

139-
static inline unsigned bw_get_ctrl(int cpu)
139+
static inline unsigned int bw_get_ctrl(int cpu)
140140
{
141-
unsigned ctrl;
141+
unsigned int ctrl;
142142

143143
__asm__ __volatile__ ("lda [%1] %2, %0" :
144144
"=r" (ctrl) :
@@ -147,17 +147,17 @@ static inline unsigned bw_get_ctrl(int cpu)
147147
return ctrl;
148148
}
149149

150-
static inline void bw_set_ctrl(int cpu, unsigned ctrl)
150+
static inline void bw_set_ctrl(int cpu, unsigned int ctrl)
151151
{
152152
__asm__ __volatile__ ("sta %0, [%1] %2" : :
153153
"r" (ctrl),
154154
"r" (CSR_BASE(cpu) + BW_CTRL),
155155
"i" (ASI_M_CTL));
156156
}
157157

158-
static inline unsigned cc_get_ipen(void)
158+
static inline unsigned int cc_get_ipen(void)
159159
{
160-
unsigned pending;
160+
unsigned int pending;
161161

162162
__asm__ __volatile__ ("lduha [%1] %2, %0" :
163163
"=r" (pending) :
@@ -166,17 +166,17 @@ static inline unsigned cc_get_ipen(void)
166166
return pending;
167167
}
168168

169-
static inline void cc_set_iclr(unsigned clear)
169+
static inline void cc_set_iclr(unsigned int clear)
170170
{
171171
__asm__ __volatile__ ("stha %0, [%1] %2" : :
172172
"r" (clear),
173173
"r" (CC_ICLR),
174174
"i" (ASI_M_MXCC));
175175
}
176176

177-
static inline unsigned cc_get_imsk(void)
177+
static inline unsigned int cc_get_imsk(void)
178178
{
179-
unsigned mask;
179+
unsigned int mask;
180180

181181
__asm__ __volatile__ ("lduha [%1] %2, %0" :
182182
"=r" (mask) :
@@ -185,17 +185,17 @@ static inline unsigned cc_get_imsk(void)
185185
return mask;
186186
}
187187

188-
static inline void cc_set_imsk(unsigned mask)
188+
static inline void cc_set_imsk(unsigned int mask)
189189
{
190190
__asm__ __volatile__ ("stha %0, [%1] %2" : :
191191
"r" (mask),
192192
"r" (CC_IMSK),
193193
"i" (ASI_M_MXCC));
194194
}
195195

196-
static inline unsigned cc_get_imsk_other(int cpuid)
196+
static inline unsigned int cc_get_imsk_other(int cpuid)
197197
{
198-
unsigned mask;
198+
unsigned int mask;
199199

200200
__asm__ __volatile__ ("lduha [%1] %2, %0" :
201201
"=r" (mask) :
@@ -204,15 +204,15 @@ static inline unsigned cc_get_imsk_other(int cpuid)
204204
return mask;
205205
}
206206

207-
static inline void cc_set_imsk_other(int cpuid, unsigned mask)
207+
static inline void cc_set_imsk_other(int cpuid, unsigned int mask)
208208
{
209209
__asm__ __volatile__ ("stha %0, [%1] %2" : :
210210
"r" (mask),
211211
"r" (ECSR_BASE(cpuid) | CC_IMSK),
212212
"i" (ASI_M_CTL));
213213
}
214214

215-
static inline void cc_set_igen(unsigned gen)
215+
static inline void cc_set_igen(unsigned int gen)
216216
{
217217
__asm__ __volatile__ ("sta %0, [%1] %2" : :
218218
"r" (gen),

arch/sparc/include/asm/openprom.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ struct linux_dev_v0_funcs {
2929
/* V2 and later prom device operations. */
3030
struct linux_dev_v2_funcs {
3131
phandle (*v2_inst2pkg)(int d); /* Convert ihandle to phandle */
32-
char * (*v2_dumb_mem_alloc)(char *va, unsigned sz);
33-
void (*v2_dumb_mem_free)(char *va, unsigned sz);
32+
char * (*v2_dumb_mem_alloc)(char *va, unsigned int sz);
33+
void (*v2_dumb_mem_free)(char *va, unsigned int sz);
3434

3535
/* To map devices into virtual I/O space. */
36-
char * (*v2_dumb_mmap)(char *virta, int which_io, unsigned paddr, unsigned sz);
37-
void (*v2_dumb_munmap)(char *virta, unsigned size);
36+
char * (*v2_dumb_mmap)(char *virta, int which_io, unsigned int paddr, unsigned int sz);
37+
void (*v2_dumb_munmap)(char *virta, unsigned int size);
3838

3939
int (*v2_dev_open)(char *devpath);
4040
void (*v2_dev_close)(int d);
@@ -50,7 +50,7 @@ struct linux_dev_v2_funcs {
5050
struct linux_mlist_v0 {
5151
struct linux_mlist_v0 *theres_more;
5252
unsigned int start_adr;
53-
unsigned num_bytes;
53+
unsigned int num_bytes;
5454
};
5555

5656
struct linux_mem_v0 {

arch/sparc/include/asm/sigcontext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct sigcontext32 {
2525
int sigc_oswins; /* outstanding windows */
2626

2727
/* stack ptrs for each regwin buf */
28-
unsigned sigc_spbuf[__SUNOS_MAXWIN];
28+
unsigned int sigc_spbuf[__SUNOS_MAXWIN];
2929

3030
/* Windows to restore after signal */
3131
struct reg_window32 sigc_wbuf[__SUNOS_MAXWIN];

arch/sparc/include/uapi/asm/stat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
#if defined(__sparc__) && defined(__arch64__)
77
/* 64 bit sparc */
88
struct stat {
9-
unsigned st_dev;
9+
unsigned int st_dev;
1010
ino_t st_ino;
1111
mode_t st_mode;
1212
short st_nlink;
1313
uid_t st_uid;
1414
gid_t st_gid;
15-
unsigned st_rdev;
15+
unsigned int st_rdev;
1616
off_t st_size;
1717
time_t st_atime;
1818
time_t st_mtime;

arch/sparc/kernel/audit.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@
55

66
#include "kernel.h"
77

8-
static unsigned dir_class[] = {
8+
static unsigned int dir_class[] = {
99
#include <asm-generic/audit_dir_write.h>
1010
~0U
1111
};
1212

13-
static unsigned read_class[] = {
13+
static unsigned int read_class[] = {
1414
#include <asm-generic/audit_read.h>
1515
~0U
1616
};
1717

18-
static unsigned write_class[] = {
18+
static unsigned int write_class[] = {
1919
#include <asm-generic/audit_write.h>
2020
~0U
2121
};
2222

23-
static unsigned chattr_class[] = {
23+
static unsigned int chattr_class[] = {
2424
#include <asm-generic/audit_change_attr.h>
2525
~0U
2626
};
2727

28-
static unsigned signal_class[] = {
28+
static unsigned int signal_class[] = {
2929
#include <asm-generic/audit_signal.h>
3030
~0U
3131
};
@@ -39,7 +39,7 @@ int audit_classify_arch(int arch)
3939
return 0;
4040
}
4141

42-
int audit_classify_syscall(int abi, unsigned syscall)
42+
int audit_classify_syscall(int abi, unsigned int syscall)
4343
{
4444
#ifdef CONFIG_COMPAT
4545
if (abi == AUDIT_ARCH_SPARC)

arch/sparc/kernel/compat_audit.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,32 @@
22
#include <asm/unistd.h>
33
#include "kernel.h"
44

5-
unsigned sparc32_dir_class[] = {
5+
unsigned int sparc32_dir_class[] = {
66
#include <asm-generic/audit_dir_write.h>
77
~0U
88
};
99

10-
unsigned sparc32_chattr_class[] = {
10+
unsigned int sparc32_chattr_class[] = {
1111
#include <asm-generic/audit_change_attr.h>
1212
~0U
1313
};
1414

15-
unsigned sparc32_write_class[] = {
15+
unsigned int sparc32_write_class[] = {
1616
#include <asm-generic/audit_write.h>
1717
~0U
1818
};
1919

20-
unsigned sparc32_read_class[] = {
20+
unsigned int sparc32_read_class[] = {
2121
#include <asm-generic/audit_read.h>
2222
~0U
2323
};
2424

25-
unsigned sparc32_signal_class[] = {
25+
unsigned int sparc32_signal_class[] = {
2626
#include <asm-generic/audit_signal.h>
2727
~0U
2828
};
2929

30-
int sparc32_classify_syscall(unsigned syscall)
30+
int sparc32_classify_syscall(unsigned int syscall)
3131
{
3232
switch(syscall) {
3333
case __NR_open:

arch/sparc/kernel/kernel.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ void do_signal32(struct pt_regs * regs);
5454
asmlinkage int do_sys32_sigstack(u32 u_ssptr, u32 u_ossptr, unsigned long sp);
5555

5656
/* compat_audit.c */
57-
extern unsigned sparc32_dir_class[];
58-
extern unsigned sparc32_chattr_class[];
59-
extern unsigned sparc32_write_class[];
60-
extern unsigned sparc32_read_class[];
61-
extern unsigned sparc32_signal_class[];
62-
int sparc32_classify_syscall(unsigned syscall);
57+
extern unsigned int sparc32_dir_class[];
58+
extern unsigned int sparc32_chattr_class[];
59+
extern unsigned int sparc32_write_class[];
60+
extern unsigned int sparc32_read_class[];
61+
extern unsigned int sparc32_signal_class[];
62+
int sparc32_classify_syscall(unsigned int syscall);
6363
#endif
6464

6565
#ifdef CONFIG_SPARC32

arch/sparc/kernel/process_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static void show_regwindow32(struct pt_regs *regs)
103103
mm_segment_t old_fs;
104104

105105
__asm__ __volatile__ ("flushw");
106-
rw = compat_ptr((unsigned)regs->u_regs[14]);
106+
rw = compat_ptr((unsigned int)regs->u_regs[14]);
107107
old_fs = get_fs();
108108
set_fs (USER_DS);
109109
if (copy_from_user (&r_w, rw, sizeof(r_w))) {

arch/sparc/kernel/setup_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ unsigned long cmdline_memory_size __initdata = 0;
109109
unsigned char boot_cpu_id = 0xff; /* 0xff will make it into DATA section... */
110110

111111
static void
112-
prom_console_write(struct console *con, const char *s, unsigned n)
112+
prom_console_write(struct console *con, const char *s, unsigned int n)
113113
{
114114
prom_write(s, n);
115115
}

arch/sparc/kernel/setup_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct screen_info screen_info = {
7777
};
7878

7979
static void
80-
prom_console_write(struct console *con, const char *s, unsigned n)
80+
prom_console_write(struct console *con, const char *s, unsigned int n)
8181
{
8282
prom_write(s, n);
8383
}

arch/sparc/kernel/signal32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ void do_sigreturn32(struct pt_regs *regs)
144144
compat_uptr_t fpu_save;
145145
compat_uptr_t rwin_save;
146146
unsigned int psr;
147-
unsigned pc, npc;
147+
unsigned int pc, npc;
148148
sigset_t set;
149149
compat_sigset_t seta;
150150
int err, i;

arch/sparc/kernel/sys_sparc_64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,10 @@ SYSCALL_DEFINE6(sparc_ipc, unsigned int, call, int, first, unsigned long, second
337337
switch (call) {
338338
case SEMOP:
339339
err = sys_semtimedop(first, ptr,
340-
(unsigned)second, NULL);
340+
(unsigned int)second, NULL);
341341
goto out;
342342
case SEMTIMEDOP:
343-
err = sys_semtimedop(first, ptr, (unsigned)second,
343+
err = sys_semtimedop(first, ptr, (unsigned int)second,
344344
(const struct timespec __user *)
345345
(unsigned long) fifth);
346346
goto out;

arch/sparc/kernel/unaligned_64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ static inline int do_int_store(int reg_num, int size, unsigned long *dst_addr,
209209
if (size == 16) {
210210
size = 8;
211211
zero = (((long)(reg_num ?
212-
(unsigned)fetch_reg(reg_num, regs) : 0)) << 32) |
213-
(unsigned)fetch_reg(reg_num + 1, regs);
212+
(unsigned int)fetch_reg(reg_num, regs) : 0)) << 32) |
213+
(unsigned int)fetch_reg(reg_num + 1, regs);
214214
} else if (reg_num) {
215215
src_val_p = fetch_reg_addr(reg_num, regs);
216216
}

arch/sparc/mm/fault_32.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,10 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
303303
fixup = search_extables_range(regs->pc, &g2);
304304
/* Values below 10 are reserved for other things */
305305
if (fixup > 10) {
306-
extern const unsigned __memset_start[];
307-
extern const unsigned __memset_end[];
308-
extern const unsigned __csum_partial_copy_start[];
309-
extern const unsigned __csum_partial_copy_end[];
306+
extern const unsigned int __memset_start[];
307+
extern const unsigned int __memset_end[];
308+
extern const unsigned int __csum_partial_copy_start[];
309+
extern const unsigned int __csum_partial_copy_end[];
310310

311311
#ifdef DEBUG_EXCEPTIONS
312312
printk("Exception: PC<%08lx> faddr<%08lx>\n",

0 commit comments

Comments
 (0)