Commit c53421b18f205c5f97c604ae55c6a921f034b0f6

Authored by Alexey Dobriyan
Committed by Linus Torvalds
1 parent f5579f8c7d

[PATCH] proper flags type of spin_lock_irqsave()

Convert various spin_lock_irqsave() callers to correctly use `unsigned long'.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: "Luck, Tony" <tony.luck@intel.com>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 10 changed files with 25 additions and 23 deletions Side-by-side Diff

arch/ia64/kernel/mca.c
... ... @@ -388,7 +388,7 @@
388 388 {
389 389 sal_log_record_header_t *log_buffer;
390 390 u64 total_len = 0;
391   - int s;
  391 + unsigned long s;
392 392  
393 393 IA64_LOG_LOCK(sal_info_type);
394 394  
arch/ia64/sn/pci/pcibr/pcibr_ate.c
... ... @@ -160,7 +160,7 @@
160 160  
161 161 volatile u64 ate;
162 162 int count;
163   - u64 flags;
  163 + unsigned long flags;
164 164  
165 165 if (pcibr_invalidate_ate) {
166 166 /* For debugging purposes, clear the valid bit in the ATE */
arch/ia64/sn/pci/pcibr/pcibr_dma.c
... ... @@ -237,7 +237,7 @@
237 237 int is_tio;
238 238 int wid_num;
239 239 int i, j;
240   - u64 flags;
  240 + unsigned long flags;
241 241 u64 itte;
242 242 struct hubdev_info *hubinfo;
243 243 struct sn_flush_device_kernel *p;
arch/parisc/kernel/firmware.c
... ... @@ -1049,7 +1049,7 @@
1049 1049 static int __attribute__((aligned(8))) iodc_retbuf[32];
1050 1050 static char __attribute__((aligned(64))) iodc_dbuf[4096];
1051 1051 unsigned int n;
1052   - unsigned int flags;
  1052 + unsigned long flags;
1053 1053  
1054 1054 switch (c) {
1055 1055 case '\n':
... ... @@ -1088,7 +1088,8 @@
1088 1088 */
1089 1089 void pdc_iodc_outc(unsigned char c)
1090 1090 {
1091   - unsigned int n, flags;
  1091 + unsigned int n;
  1092 + unsigned long flags;
1092 1093  
1093 1094 /* fill buffer with one caracter and print it */
1094 1095 static int __attribute__((aligned(8))) iodc_retbuf[32];
... ... @@ -1113,7 +1114,7 @@
1113 1114 */
1114 1115 int pdc_iodc_getc(void)
1115 1116 {
1116   - unsigned int flags;
  1117 + unsigned long flags;
1117 1118 static int __attribute__((aligned(8))) iodc_retbuf[32];
1118 1119 static char __attribute__((aligned(64))) iodc_dbuf[4096];
1119 1120 int ch;
arch/v850/kernel/memcons.c
... ... @@ -30,7 +30,7 @@
30 30  
31 31 static size_t write (const char *buf, size_t len)
32 32 {
33   - int flags;
  33 + unsigned long flags;
34 34 char *point;
35 35  
36 36 spin_lock_irqsave (memcons_lock, flags);
arch/v850/kernel/rte_cb_leds.c
... ... @@ -42,7 +42,7 @@
42 42 len = LED_NUM_DIGITS - pos; \
43 43 \
44 44 if (len > 0) { \
45   - int _flags; \
  45 + unsigned long _flags; \
46 46 const char *_end = buf + len; \
47 47 img_decl = &leds_image[pos]; \
48 48 \
arch/v850/kernel/rte_mb_a_pci.c
... ... @@ -365,7 +365,7 @@
365 365 static void *alloc_mb_sram (size_t size)
366 366 {
367 367 struct mb_sram_free_area *prev, *fa;
368   - int flags;
  368 + unsigned long flags;
369 369 void *mem = 0;
370 370  
371 371 spin_lock_irqsave (mb_sram_lock, flags);
... ... @@ -406,7 +406,7 @@
406 406 static void free_mb_sram (void *mem, size_t size)
407 407 {
408 408 struct mb_sram_free_area *prev, *fa, *new_fa;
409   - int flags;
  409 + unsigned long flags;
410 410 void *end = mem + size;
411 411  
412 412 spin_lock_irqsave (mb_sram_lock, flags);
... ... @@ -517,7 +517,7 @@
517 517  
518 518 static struct dma_mapping *new_dma_mapping (size_t size)
519 519 {
520   - int flags;
  520 + unsigned long flags;
521 521 struct dma_mapping *mapping;
522 522 void *mb_sram_block = alloc_mb_sram (size);
523 523  
... ... @@ -575,7 +575,7 @@
575 575  
576 576 static struct dma_mapping *find_dma_mapping (void *mb_sram_addr)
577 577 {
578   - int flags;
  578 + unsigned long flags;
579 579 struct dma_mapping *mapping;
580 580  
581 581 spin_lock_irqsave (dma_mappings_lock, flags);
... ... @@ -592,7 +592,7 @@
592 592  
593 593 static struct dma_mapping *deactivate_dma_mapping (void *mb_sram_addr)
594 594 {
595   - int flags;
  595 + unsigned long flags;
596 596 struct dma_mapping *mapping, *prev;
597 597  
598 598 spin_lock_irqsave (dma_mappings_lock, flags);
... ... @@ -622,7 +622,7 @@
622 622 static inline void
623 623 free_dma_mapping (struct dma_mapping *mapping)
624 624 {
625   - int flags;
  625 + unsigned long flags;
626 626  
627 627 free_mb_sram (mapping->mb_sram_addr, mapping->size);
628 628  
drivers/char/ds1286.c
... ... @@ -104,7 +104,7 @@
104 104 switch (cmd) {
105 105 case RTC_AIE_OFF: /* Mask alarm int. enab. bit */
106 106 {
107   - unsigned int flags;
  107 + unsigned long flags;
108 108 unsigned char val;
109 109  
110 110 if (!capable(CAP_SYS_TIME))
... ... @@ -120,7 +120,7 @@
120 120 }
121 121 case RTC_AIE_ON: /* Allow alarm interrupts. */
122 122 {
123   - unsigned int flags;
  123 + unsigned long flags;
124 124 unsigned char val;
125 125  
126 126 if (!capable(CAP_SYS_TIME))
... ... @@ -136,7 +136,7 @@
136 136 }
137 137 case RTC_WIE_OFF: /* Mask watchdog int. enab. bit */
138 138 {
139   - unsigned int flags;
  139 + unsigned long flags;
140 140 unsigned char val;
141 141  
142 142 if (!capable(CAP_SYS_TIME))
... ... @@ -152,7 +152,7 @@
152 152 }
153 153 case RTC_WIE_ON: /* Allow watchdog interrupts. */
154 154 {
155   - unsigned int flags;
  155 + unsigned long flags;
156 156 unsigned char val;
157 157  
158 158 if (!capable(CAP_SYS_TIME))
... ... @@ -434,7 +434,7 @@
434 434 static void ds1286_get_time(struct rtc_time *rtc_tm)
435 435 {
436 436 unsigned char save_control;
437   - unsigned int flags;
  437 + unsigned long flags;
438 438 unsigned long uip_watchdog = jiffies;
439 439  
440 440 /*
... ... @@ -494,7 +494,8 @@
494 494 {
495 495 unsigned char mon, day, hrs, min, sec, leap_yr;
496 496 unsigned char save_control;
497   - unsigned int yrs, flags;
  497 + unsigned int yrs;
  498 + unsigned long flags;
498 499  
499 500  
500 501 yrs = rtc_tm->tm_year + 1900;
... ... @@ -552,7 +553,7 @@
552 553 static void ds1286_get_alm_time(struct rtc_time *alm_tm)
553 554 {
554 555 unsigned char cmd;
555   - unsigned int flags;
  556 + unsigned long flags;
556 557  
557 558 /*
558 559 * Only the values that we read from the RTC are set. That
drivers/i2c/busses/i2c-ite.c
... ... @@ -109,7 +109,7 @@
109 109 static void iic_ite_waitforpin(void) {
110 110 DEFINE_WAIT(wait);
111 111 int timeout = 2;
112   - long flags;
  112 + unsigned long flags;
113 113  
114 114 /* If interrupts are enabled (which they are), then put the process to
115 115 * sleep. This process will be awakened by two events -- either the
sound/oss/swarm_cs4297a.c
... ... @@ -725,7 +725,7 @@
725 725 serdma_t *d = &s->dma_dac;
726 726 u64 *data_p;
727 727 unsigned swptr;
728   - int flags;
  728 + unsigned long flags;
729 729 serdma_descr_t *descr;
730 730  
731 731 if (s->reg_request) {