Skip to content

Commit

Permalink
[PATCH] proper flags type of spin_lock_irqsave()
Browse files Browse the repository at this point in the history
Convert various spin_lock_irqsave() callers to correctly use `unsigned long'.

Signed-off-by: Alexey Dobriyan <[email protected]>
Cc: Miles Bader <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Acked-by: Kyle McMartin <[email protected]>
Cc: Jean Delvare <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Oct 1, 2006
1 parent f5579f8 commit c53421b
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion arch/ia64/kernel/mca.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ ia64_log_get(int sal_info_type, u8 **buffer, int irq_safe)
{
sal_log_record_header_t *log_buffer;
u64 total_len = 0;
int s;
unsigned long s;

IA64_LOG_LOCK(sal_info_type);

Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/sn/pci/pcibr/pcibr_ate.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void pcibr_ate_free(struct pcibus_info *pcibus_info, int index)

volatile u64 ate;
int count;
u64 flags;
unsigned long flags;

if (pcibr_invalidate_ate) {
/* For debugging purposes, clear the valid bit in the ATE */
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/sn/pci/pcibr/pcibr_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void sn_dma_flush(u64 addr)
int is_tio;
int wid_num;
int i, j;
u64 flags;
unsigned long flags;
u64 itte;
struct hubdev_info *hubinfo;
struct sn_flush_device_kernel *p;
Expand Down
7 changes: 4 additions & 3 deletions arch/parisc/kernel/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ void pdc_iodc_putc(unsigned char c)
static int __attribute__((aligned(8))) iodc_retbuf[32];
static char __attribute__((aligned(64))) iodc_dbuf[4096];
unsigned int n;
unsigned int flags;
unsigned long flags;

switch (c) {
case '\n':
Expand Down Expand Up @@ -1088,7 +1088,8 @@ void pdc_iodc_putc(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 */
static int __attribute__((aligned(8))) iodc_retbuf[32];
Expand All @@ -1113,7 +1114,7 @@ void pdc_iodc_outc(unsigned char c)
*/
int pdc_iodc_getc(void)
{
unsigned int flags;
unsigned long flags;
static int __attribute__((aligned(8))) iodc_retbuf[32];
static char __attribute__((aligned(64))) iodc_dbuf[4096];
int ch;
Expand Down
2 changes: 1 addition & 1 deletion arch/v850/kernel/memcons.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static DEFINE_SPINLOCK(memcons_lock);

static size_t write (const char *buf, size_t len)
{
int flags;
unsigned long flags;
char *point;

spin_lock_irqsave (memcons_lock, flags);
Expand Down
2 changes: 1 addition & 1 deletion arch/v850/kernel/rte_cb_leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ do { \
len = LED_NUM_DIGITS - pos; \
\
if (len > 0) { \
int _flags; \
unsigned long _flags; \
const char *_end = buf + len; \
img_decl = &leds_image[pos]; \
\
Expand Down
12 changes: 6 additions & 6 deletions arch/v850/kernel/rte_mb_a_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static DEFINE_SPINLOCK(mb_sram_lock);
static void *alloc_mb_sram (size_t size)
{
struct mb_sram_free_area *prev, *fa;
int flags;
unsigned long flags;
void *mem = 0;

spin_lock_irqsave (mb_sram_lock, flags);
Expand Down Expand Up @@ -406,7 +406,7 @@ static void *alloc_mb_sram (size_t size)
static void free_mb_sram (void *mem, size_t size)
{
struct mb_sram_free_area *prev, *fa, *new_fa;
int flags;
unsigned long flags;
void *end = mem + size;

spin_lock_irqsave (mb_sram_lock, flags);
Expand Down Expand Up @@ -517,7 +517,7 @@ static DEFINE_SPINLOCK(dma_mappings_lock);

static struct dma_mapping *new_dma_mapping (size_t size)
{
int flags;
unsigned long flags;
struct dma_mapping *mapping;
void *mb_sram_block = alloc_mb_sram (size);

Expand Down Expand Up @@ -575,7 +575,7 @@ static struct dma_mapping *new_dma_mapping (size_t size)

static struct dma_mapping *find_dma_mapping (void *mb_sram_addr)
{
int flags;
unsigned long flags;
struct dma_mapping *mapping;

spin_lock_irqsave (dma_mappings_lock, flags);
Expand All @@ -592,7 +592,7 @@ static struct dma_mapping *find_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;

spin_lock_irqsave (dma_mappings_lock, flags);
Expand Down Expand Up @@ -622,7 +622,7 @@ static struct dma_mapping *deactivate_dma_mapping (void *mb_sram_addr)
static inline void
free_dma_mapping (struct dma_mapping *mapping)
{
int flags;
unsigned long flags;

free_mb_sram (mapping->mb_sram_addr, mapping->size);

Expand Down
15 changes: 8 additions & 7 deletions drivers/char/ds1286.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file,
switch (cmd) {
case RTC_AIE_OFF: /* Mask alarm int. enab. bit */
{
unsigned int flags;
unsigned long flags;
unsigned char val;

if (!capable(CAP_SYS_TIME))
Expand All @@ -120,7 +120,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file,
}
case RTC_AIE_ON: /* Allow alarm interrupts. */
{
unsigned int flags;
unsigned long flags;
unsigned char val;

if (!capable(CAP_SYS_TIME))
Expand All @@ -136,7 +136,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file,
}
case RTC_WIE_OFF: /* Mask watchdog int. enab. bit */
{
unsigned int flags;
unsigned long flags;
unsigned char val;

if (!capable(CAP_SYS_TIME))
Expand All @@ -152,7 +152,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file,
}
case RTC_WIE_ON: /* Allow watchdog interrupts. */
{
unsigned int flags;
unsigned long flags;
unsigned char val;

if (!capable(CAP_SYS_TIME))
Expand Down Expand Up @@ -434,7 +434,7 @@ static inline unsigned char ds1286_is_updating(void)
static void ds1286_get_time(struct rtc_time *rtc_tm)
{
unsigned char save_control;
unsigned int flags;
unsigned long flags;
unsigned long uip_watchdog = jiffies;

/*
Expand Down Expand Up @@ -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 save_control;
unsigned int yrs, flags;
unsigned int yrs;
unsigned long flags;


yrs = rtc_tm->tm_year + 1900;
Expand Down Expand Up @@ -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)
{
unsigned char cmd;
unsigned int flags;
unsigned long flags;

/*
* Only the values that we read from the RTC are set. That
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-ite.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static int iic_ite_getclock(void *data)
static void iic_ite_waitforpin(void) {
DEFINE_WAIT(wait);
int timeout = 2;
long flags;
unsigned long flags;

/* If interrupts are enabled (which they are), then put the process to
* sleep. This process will be awakened by two events -- either the
Expand Down
2 changes: 1 addition & 1 deletion sound/oss/swarm_cs4297a.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ static int serdma_reg_access(struct cs4297a_state *s, u64 data)
serdma_t *d = &s->dma_dac;
u64 *data_p;
unsigned swptr;
int flags;
unsigned long flags;
serdma_descr_t *descr;

if (s->reg_request) {
Expand Down

0 comments on commit c53421b

Please sign in to comment.