Skip to content

Commit 24ed960

Browse files
committed
treewide: Switch DEFINE_TIMER callbacks to struct timer_list *
This changes all DEFINE_TIMER() callbacks to use a struct timer_list pointer instead of unsigned long. Since the data argument has already been removed, none of these callbacks are using their argument currently, so this renames the argument to "unused". Done using the following semantic patch: @match_define_timer@ declarer name DEFINE_TIMER; identifier _timer, _callback; @@ DEFINE_TIMER(_timer, _callback); @change_callback depends on match_define_timer@ identifier match_define_timer._callback; type _origtype; identifier _origarg; @@ void -_callback(_origtype _origarg) +_callback(struct timer_list *unused) { ... } Signed-off-by: Kees Cook <[email protected]>
1 parent 6cc73a0 commit 24ed960

File tree

39 files changed

+82
-82
lines changed

39 files changed

+82
-82
lines changed

arch/arm/mach-ixp4xx/dsmg600-setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ static int power_button_countdown;
179179
/* Must hold the button down for at least this many counts to be processed */
180180
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
181181

182-
static void dsmg600_power_handler(unsigned long data);
182+
static void dsmg600_power_handler(struct timer_list *unused);
183183
static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler);
184184

185-
static void dsmg600_power_handler(unsigned long data)
185+
static void dsmg600_power_handler(struct timer_list *unused)
186186
{
187187
/* This routine is called twice per second to check the
188188
* state of the power button.

arch/arm/mach-ixp4xx/nas100d-setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ static int power_button_countdown;
202202
/* Must hold the button down for at least this many counts to be processed */
203203
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
204204

205-
static void nas100d_power_handler(unsigned long data);
205+
static void nas100d_power_handler(struct timer_list *unused);
206206
static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler);
207207

208-
static void nas100d_power_handler(unsigned long data)
208+
static void nas100d_power_handler(struct timer_list *unused)
209209
{
210210
/* This routine is called twice per second to check the
211211
* state of the power button.

arch/m68k/amiga/amisound.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void __init amiga_init_sound(void)
6565
#endif
6666
}
6767

68-
static void nosound( unsigned long ignored );
68+
static void nosound(struct timer_list *unused);
6969
static DEFINE_TIMER(sound_timer, nosound);
7070

7171
void amiga_mksound( unsigned int hz, unsigned int ticks )
@@ -107,7 +107,7 @@ void amiga_mksound( unsigned int hz, unsigned int ticks )
107107
}
108108

109109

110-
static void nosound( unsigned long ignored )
110+
static void nosound(struct timer_list *unused)
111111
{
112112
/* turn off DMA for audio channel 2 */
113113
custom.dmacon = DMAF_AUD2;

arch/m68k/mac/macboing.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static unsigned long mac_bell_phasepersample;
4848
* some function protos
4949
*/
5050
static void mac_init_asc( void );
51-
static void mac_nosound( unsigned long );
51+
static void mac_nosound(struct timer_list *);
5252
static void mac_quadra_start_bell( unsigned int, unsigned int, unsigned int );
5353
static void mac_quadra_ring_bell( unsigned long );
5454
static void mac_av_start_bell( unsigned int, unsigned int, unsigned int );
@@ -216,7 +216,7 @@ void mac_mksound( unsigned int freq, unsigned int length )
216216
/*
217217
* regular ASC: stop whining ..
218218
*/
219-
static void mac_nosound( unsigned long ignored )
219+
static void mac_nosound(struct timer_list *unused)
220220
{
221221
mac_asc_regs[ ASC_ENABLE ] = 0;
222222
}

arch/mips/mti-malta/malta-display.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ void mips_display_message(const char *str)
3636
}
3737
}
3838

39-
static void scroll_display_message(unsigned long unused);
39+
static void scroll_display_message(struct timer_list *unused);
4040
static DEFINE_TIMER(mips_scroll_timer, scroll_display_message);
4141

42-
static void scroll_display_message(unsigned long unused)
42+
static void scroll_display_message(struct timer_list *unused)
4343
{
4444
mips_display_message(&display_string[display_count++]);
4545
if (display_count == max_display_count)

arch/parisc/kernel/pdc_cons.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static int pdc_console_setup(struct console *co, char *options)
9191

9292
#define PDC_CONS_POLL_DELAY (30 * HZ / 1000)
9393

94-
static void pdc_console_poll(unsigned long unused);
94+
static void pdc_console_poll(struct timer_list *unused);
9595
static DEFINE_TIMER(pdc_console_timer, pdc_console_poll);
9696
static struct tty_port tty_port;
9797

@@ -135,7 +135,7 @@ static const struct tty_operations pdc_console_tty_ops = {
135135
.chars_in_buffer = pdc_console_tty_chars_in_buffer,
136136
};
137137

138-
static void pdc_console_poll(unsigned long unused)
138+
static void pdc_console_poll(struct timer_list *unused)
139139
{
140140
int data, count = 0;
141141

drivers/atm/idt77105.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ static DEFINE_SPINLOCK(idt77105_priv_lock);
4545
#define PUT(val,reg) dev->ops->phy_put(dev,val,IDT77105_##reg)
4646
#define GET(reg) dev->ops->phy_get(dev,IDT77105_##reg)
4747

48-
static void idt77105_stats_timer_func(unsigned long);
49-
static void idt77105_restart_timer_func(unsigned long);
48+
static void idt77105_stats_timer_func(struct timer_list *);
49+
static void idt77105_restart_timer_func(struct timer_list *);
5050

5151

5252
static DEFINE_TIMER(stats_timer, idt77105_stats_timer_func);
@@ -80,7 +80,7 @@ static u16 get_counter(struct atm_dev *dev, int counter)
8080
* a separate copy of the stats allows implementation of
8181
* an ioctl which gathers the stats *without* zero'ing them.
8282
*/
83-
static void idt77105_stats_timer_func(unsigned long dummy)
83+
static void idt77105_stats_timer_func(struct timer_list *unused)
8484
{
8585
struct idt77105_priv *walk;
8686
struct atm_dev *dev;
@@ -109,7 +109,7 @@ static void idt77105_stats_timer_func(unsigned long dummy)
109109
* interrupts need to be disabled when the cable is pulled out
110110
* to avoid lots of spurious cell error interrupts.
111111
*/
112-
static void idt77105_restart_timer_func(unsigned long dummy)
112+
static void idt77105_restart_timer_func(struct timer_list *unused)
113113
{
114114
struct idt77105_priv *walk;
115115
struct atm_dev *dev;

drivers/atm/iphase.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void desc_dbg(IADEV *iadev);
7575
static IADEV *ia_dev[8];
7676
static struct atm_dev *_ia_dev[8];
7777
static int iadev_count;
78-
static void ia_led_timer(unsigned long arg);
78+
static void ia_led_timer(struct timer_list *unused);
7979
static DEFINE_TIMER(ia_timer, ia_led_timer);
8080
static int IA_TX_BUF = DFL_TX_BUFFERS, IA_TX_BUF_SZ = DFL_TX_BUF_SZ;
8181
static int IA_RX_BUF = DFL_RX_BUFFERS, IA_RX_BUF_SZ = DFL_RX_BUF_SZ;
@@ -2432,7 +2432,7 @@ static void ia_update_stats(IADEV *iadev) {
24322432
return;
24332433
}
24342434

2435-
static void ia_led_timer(unsigned long arg) {
2435+
static void ia_led_timer(struct timer_list *unused) {
24362436
unsigned long flags;
24372437
static u_char blinking[8] = {0, 0, 0, 0, 0, 0, 0, 0};
24382438
u_char i;

drivers/block/ataflop.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ static int NeedSeek = 0;
342342
static void fd_select_side( int side );
343343
static void fd_select_drive( int drive );
344344
static void fd_deselect( void );
345-
static void fd_motor_off_timer( unsigned long dummy );
346-
static void check_change( unsigned long dummy );
345+
static void fd_motor_off_timer(struct timer_list *unused);
346+
static void check_change(struct timer_list *unused);
347347
static irqreturn_t floppy_irq (int irq, void *dummy);
348348
static void fd_error( void );
349349
static int do_format(int drive, int type, struct atari_format_descr *desc);
@@ -353,12 +353,12 @@ static void fd_calibrate_done( int status );
353353
static void fd_seek( void );
354354
static void fd_seek_done( int status );
355355
static void fd_rwsec( void );
356-
static void fd_readtrack_check( unsigned long dummy );
356+
static void fd_readtrack_check(struct timer_list *unused);
357357
static void fd_rwsec_done( int status );
358358
static void fd_rwsec_done1(int status);
359359
static void fd_writetrack( void );
360360
static void fd_writetrack_done( int status );
361-
static void fd_times_out( unsigned long dummy );
361+
static void fd_times_out(struct timer_list *unused);
362362
static void finish_fdc( void );
363363
static void finish_fdc_done( int dummy );
364364
static void setup_req_params( int drive );
@@ -479,7 +479,7 @@ static void fd_deselect( void )
479479
* counts the index signals, which arrive only if one drive is selected.
480480
*/
481481

482-
static void fd_motor_off_timer( unsigned long dummy )
482+
static void fd_motor_off_timer(struct timer_list *unused)
483483
{
484484
unsigned char status;
485485

@@ -515,7 +515,7 @@ static void fd_motor_off_timer( unsigned long dummy )
515515
* as possible) and keep track of the current state of the write protection.
516516
*/
517517

518-
static void check_change( unsigned long dummy )
518+
static void check_change(struct timer_list *unused)
519519
{
520520
static int drive = 0;
521521

@@ -966,7 +966,7 @@ static void fd_rwsec( void )
966966
}
967967

968968

969-
static void fd_readtrack_check( unsigned long dummy )
969+
static void fd_readtrack_check(struct timer_list *unused)
970970
{
971971
unsigned long flags, addr, addr2;
972972

@@ -1237,7 +1237,7 @@ static void fd_writetrack_done( int status )
12371237
fd_error();
12381238
}
12391239

1240-
static void fd_times_out( unsigned long dummy )
1240+
static void fd_times_out(struct timer_list *unused)
12411241
{
12421242
atari_disable_irq( IRQ_MFP_FDC );
12431243
if (!FloppyIRQHandler) goto end; /* int occurred after timer was fired, but

drivers/char/dtlk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
#endif /* TRACING */
7575

7676
static DEFINE_MUTEX(dtlk_mutex);
77-
static void dtlk_timer_tick(unsigned long data);
77+
static void dtlk_timer_tick(struct timer_list *unused);
7878

7979
static int dtlk_major;
8080
static int dtlk_port_lpc;
@@ -259,7 +259,7 @@ static unsigned int dtlk_poll(struct file *file, poll_table * wait)
259259
return mask;
260260
}
261261

262-
static void dtlk_timer_tick(unsigned long data)
262+
static void dtlk_timer_tick(struct timer_list *unused)
263263
{
264264
TRACE_TEXT(" dtlk_timer_tick");
265265
wake_up_interruptible(&dtlk_process_list);

0 commit comments

Comments
 (0)