Commit 82ae0fba authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Adrian Bunk

proper flags type of spin_lock_irqsave()

Convert various spin_lock_irqsave() callers to correctly use `unsigned long'
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 15c47f32
...@@ -220,7 +220,7 @@ ia64_log_get(int sal_info_type, u8 **buffer, int irq_safe) ...@@ -220,7 +220,7 @@ ia64_log_get(int sal_info_type, u8 **buffer, int irq_safe)
{ {
sal_log_record_header_t *log_buffer; sal_log_record_header_t *log_buffer;
u64 total_len = 0; u64 total_len = 0;
int s; unsigned long s;
IA64_LOG_LOCK(sal_info_type); IA64_LOG_LOCK(sal_info_type);
......
...@@ -160,7 +160,7 @@ void pcibr_ate_free(struct pcibus_info *pcibus_info, int index) ...@@ -160,7 +160,7 @@ void pcibr_ate_free(struct pcibus_info *pcibus_info, int index)
volatile u64 ate; volatile u64 ate;
int count; int count;
u64 flags; unsigned long flags;
if (pcibr_invalidate_ate) { if (pcibr_invalidate_ate) {
/* For debugging purposes, clear the valid bit in the ATE */ /* For debugging purposes, clear the valid bit in the ATE */
......
...@@ -212,7 +212,7 @@ void sn_dma_flush(u64 addr) ...@@ -212,7 +212,7 @@ void sn_dma_flush(u64 addr)
int is_tio; int is_tio;
int wid_num; int wid_num;
int i, j; int i, j;
u64 flags; unsigned long flags;
u64 itte; u64 itte;
struct hubdev_info *hubinfo; struct hubdev_info *hubinfo;
struct sn_flush_device_kernel *p; struct sn_flush_device_kernel *p;
......
...@@ -1013,7 +1013,7 @@ void pdc_iodc_putc(unsigned char c) ...@@ -1013,7 +1013,7 @@ void pdc_iodc_putc(unsigned char c)
static int __attribute__((aligned(8))) iodc_retbuf[32]; static int __attribute__((aligned(8))) iodc_retbuf[32];
static char __attribute__((aligned(64))) iodc_dbuf[4096]; static char __attribute__((aligned(64))) iodc_dbuf[4096];
unsigned int n; unsigned int n;
unsigned int flags; unsigned long flags;
switch (c) { switch (c) {
case '\n': case '\n':
...@@ -1052,7 +1052,8 @@ void pdc_iodc_putc(unsigned char c) ...@@ -1052,7 +1052,8 @@ void pdc_iodc_putc(unsigned char c)
*/ */
void pdc_iodc_outc(unsigned char c) void pdc_iodc_outc(unsigned char c)
{ {
unsigned int n, flags; unsigned int n;
unsigned long flags;
/* fill buffer with one caracter and print it */ /* fill buffer with one caracter and print it */
static int __attribute__((aligned(8))) iodc_retbuf[32]; static int __attribute__((aligned(8))) iodc_retbuf[32];
...@@ -1077,7 +1078,7 @@ void pdc_iodc_outc(unsigned char c) ...@@ -1077,7 +1078,7 @@ void pdc_iodc_outc(unsigned char c)
*/ */
int pdc_iodc_getc(void) int pdc_iodc_getc(void)
{ {
unsigned int flags; unsigned long flags;
static int __attribute__((aligned(8))) iodc_retbuf[32]; static int __attribute__((aligned(8))) iodc_retbuf[32];
static char __attribute__((aligned(64))) iodc_dbuf[4096]; static char __attribute__((aligned(64))) iodc_dbuf[4096];
int ch; int ch;
......
...@@ -30,7 +30,7 @@ static DEFINE_SPINLOCK(memcons_lock); ...@@ -30,7 +30,7 @@ static DEFINE_SPINLOCK(memcons_lock);
static size_t write (const char *buf, size_t len) static size_t write (const char *buf, size_t len)
{ {
int flags; unsigned long flags;
char *point; char *point;
spin_lock_irqsave (memcons_lock, flags); spin_lock_irqsave (memcons_lock, flags);
......
...@@ -43,7 +43,7 @@ do { \ ...@@ -43,7 +43,7 @@ do { \
len = LED_NUM_DIGITS - pos; \ len = LED_NUM_DIGITS - pos; \
\ \
if (len > 0) { \ if (len > 0) { \
int _flags; \ unsigned long _flags; \
const char *_end = buf + len; \ const char *_end = buf + len; \
img_decl = &leds_image[pos]; \ img_decl = &leds_image[pos]; \
\ \
......
...@@ -366,7 +366,7 @@ static DEFINE_SPINLOCK(mb_sram_lock); ...@@ -366,7 +366,7 @@ static DEFINE_SPINLOCK(mb_sram_lock);
static void *alloc_mb_sram (size_t size) static void *alloc_mb_sram (size_t size)
{ {
struct mb_sram_free_area *prev, *fa; struct mb_sram_free_area *prev, *fa;
int flags; unsigned long flags;
void *mem = 0; void *mem = 0;
spin_lock_irqsave (mb_sram_lock, flags); spin_lock_irqsave (mb_sram_lock, flags);
...@@ -407,7 +407,7 @@ static void *alloc_mb_sram (size_t size) ...@@ -407,7 +407,7 @@ static void *alloc_mb_sram (size_t size)
static void free_mb_sram (void *mem, size_t size) static void free_mb_sram (void *mem, size_t size)
{ {
struct mb_sram_free_area *prev, *fa, *new_fa; struct mb_sram_free_area *prev, *fa, *new_fa;
int flags; unsigned long flags;
void *end = mem + size; void *end = mem + size;
spin_lock_irqsave (mb_sram_lock, flags); spin_lock_irqsave (mb_sram_lock, flags);
...@@ -518,7 +518,7 @@ static DEFINE_SPINLOCK(dma_mappings_lock); ...@@ -518,7 +518,7 @@ static DEFINE_SPINLOCK(dma_mappings_lock);
static struct dma_mapping *new_dma_mapping (size_t size) static struct dma_mapping *new_dma_mapping (size_t size)
{ {
int flags; unsigned long flags;
struct dma_mapping *mapping; struct dma_mapping *mapping;
void *mb_sram_block = alloc_mb_sram (size); void *mb_sram_block = alloc_mb_sram (size);
...@@ -576,7 +576,7 @@ static struct dma_mapping *new_dma_mapping (size_t size) ...@@ -576,7 +576,7 @@ static struct dma_mapping *new_dma_mapping (size_t size)
static struct dma_mapping *find_dma_mapping (void *mb_sram_addr) static struct dma_mapping *find_dma_mapping (void *mb_sram_addr)
{ {
int flags; unsigned long flags;
struct dma_mapping *mapping; struct dma_mapping *mapping;
spin_lock_irqsave (dma_mappings_lock, flags); spin_lock_irqsave (dma_mappings_lock, flags);
...@@ -593,7 +593,7 @@ static struct dma_mapping *find_dma_mapping (void *mb_sram_addr) ...@@ -593,7 +593,7 @@ static struct dma_mapping *find_dma_mapping (void *mb_sram_addr)
static struct dma_mapping *deactivate_dma_mapping (void *mb_sram_addr) static struct dma_mapping *deactivate_dma_mapping (void *mb_sram_addr)
{ {
int flags; unsigned long flags;
struct dma_mapping *mapping, *prev; struct dma_mapping *mapping, *prev;
spin_lock_irqsave (dma_mappings_lock, flags); spin_lock_irqsave (dma_mappings_lock, flags);
...@@ -623,7 +623,7 @@ static struct dma_mapping *deactivate_dma_mapping (void *mb_sram_addr) ...@@ -623,7 +623,7 @@ static struct dma_mapping *deactivate_dma_mapping (void *mb_sram_addr)
static inline void static inline void
free_dma_mapping (struct dma_mapping *mapping) free_dma_mapping (struct dma_mapping *mapping)
{ {
int flags; unsigned long flags;
free_mb_sram (mapping->mb_sram_addr, mapping->size); free_mb_sram (mapping->mb_sram_addr, mapping->size);
......
...@@ -104,7 +104,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file, ...@@ -104,7 +104,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file,
switch (cmd) { switch (cmd) {
case RTC_AIE_OFF: /* Mask alarm int. enab. bit */ case RTC_AIE_OFF: /* Mask alarm int. enab. bit */
{ {
unsigned int flags; unsigned long flags;
unsigned char val; unsigned char val;
if (!capable(CAP_SYS_TIME)) if (!capable(CAP_SYS_TIME))
...@@ -120,7 +120,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file, ...@@ -120,7 +120,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file,
} }
case RTC_AIE_ON: /* Allow alarm interrupts. */ case RTC_AIE_ON: /* Allow alarm interrupts. */
{ {
unsigned int flags; unsigned long flags;
unsigned char val; unsigned char val;
if (!capable(CAP_SYS_TIME)) if (!capable(CAP_SYS_TIME))
...@@ -136,7 +136,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file, ...@@ -136,7 +136,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file,
} }
case RTC_WIE_OFF: /* Mask watchdog int. enab. bit */ case RTC_WIE_OFF: /* Mask watchdog int. enab. bit */
{ {
unsigned int flags; unsigned long flags;
unsigned char val; unsigned char val;
if (!capable(CAP_SYS_TIME)) if (!capable(CAP_SYS_TIME))
...@@ -152,7 +152,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file, ...@@ -152,7 +152,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file,
} }
case RTC_WIE_ON: /* Allow watchdog interrupts. */ case RTC_WIE_ON: /* Allow watchdog interrupts. */
{ {
unsigned int flags; unsigned long flags;
unsigned char val; unsigned char val;
if (!capable(CAP_SYS_TIME)) if (!capable(CAP_SYS_TIME))
...@@ -434,7 +434,7 @@ static inline unsigned char ds1286_is_updating(void) ...@@ -434,7 +434,7 @@ static inline unsigned char ds1286_is_updating(void)
static void ds1286_get_time(struct rtc_time *rtc_tm) static void ds1286_get_time(struct rtc_time *rtc_tm)
{ {
unsigned char save_control; unsigned char save_control;
unsigned int flags; unsigned long flags;
unsigned long uip_watchdog = jiffies; unsigned long uip_watchdog = jiffies;
/* /*
...@@ -494,7 +494,8 @@ static int ds1286_set_time(struct rtc_time *rtc_tm) ...@@ -494,7 +494,8 @@ static int ds1286_set_time(struct rtc_time *rtc_tm)
{ {
unsigned char mon, day, hrs, min, sec, leap_yr; unsigned char mon, day, hrs, min, sec, leap_yr;
unsigned char save_control; unsigned char save_control;
unsigned int yrs, flags; unsigned int yrs;
unsigned long flags;
yrs = rtc_tm->tm_year + 1900; yrs = rtc_tm->tm_year + 1900;
...@@ -552,7 +553,7 @@ static int ds1286_set_time(struct rtc_time *rtc_tm) ...@@ -552,7 +553,7 @@ static int ds1286_set_time(struct rtc_time *rtc_tm)
static void ds1286_get_alm_time(struct rtc_time *alm_tm) static void ds1286_get_alm_time(struct rtc_time *alm_tm)
{ {
unsigned char cmd; unsigned char cmd;
unsigned int flags; unsigned long flags;
/* /*
* Only the values that we read from the RTC are set. That * Only the values that we read from the RTC are set. That
......
...@@ -109,7 +109,7 @@ static int iic_ite_getclock(void *data) ...@@ -109,7 +109,7 @@ static int iic_ite_getclock(void *data)
static void iic_ite_waitforpin(void) { static void iic_ite_waitforpin(void) {
DEFINE_WAIT(wait); DEFINE_WAIT(wait);
int timeout = 2; int timeout = 2;
long flags; unsigned long flags;
/* If interrupts are enabled (which they are), then put the process to /* If interrupts are enabled (which they are), then put the process to
* sleep. This process will be awakened by two events -- either the * sleep. This process will be awakened by two events -- either the
......
...@@ -724,7 +724,7 @@ static int serdma_reg_access(struct cs4297a_state *s, u64 data) ...@@ -724,7 +724,7 @@ static int serdma_reg_access(struct cs4297a_state *s, u64 data)
serdma_t *d = &s->dma_dac; serdma_t *d = &s->dma_dac;
u64 *data_p; u64 *data_p;
unsigned swptr; unsigned swptr;
int flags; unsigned long flags;
serdma_descr_t *descr; serdma_descr_t *descr;
if (s->reg_request) { if (s->reg_request) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment