diff options
Diffstat (limited to 'drivers/char/ftape')
-rw-r--r-- | drivers/char/ftape/lowlevel/fdc-io.c | 22 | ||||
-rw-r--r-- | drivers/char/ftape/lowlevel/fdc-isr.c | 14 | ||||
-rw-r--r-- | drivers/char/ftape/lowlevel/ftape-bsm.c | 6 | ||||
-rw-r--r-- | drivers/char/ftape/lowlevel/ftape-format.c | 2 | ||||
-rw-r--r-- | drivers/char/ftape/lowlevel/ftape-io.c | 8 | ||||
-rw-r--r-- | drivers/char/ftape/lowlevel/ftape-rw.c | 10 | ||||
-rw-r--r-- | drivers/char/ftape/lowlevel/ftape-tracing.c | 4 | ||||
-rw-r--r-- | drivers/char/ftape/lowlevel/ftape-write.c | 2 | ||||
-rw-r--r-- | drivers/char/ftape/zftape/zftape-buffers.c | 4 | ||||
-rw-r--r-- | drivers/char/ftape/zftape/zftape-ctl.c | 14 | ||||
-rw-r--r-- | drivers/char/ftape/zftape/zftape-read.c | 6 | ||||
-rw-r--r-- | drivers/char/ftape/zftape/zftape-rw.c | 22 | ||||
-rw-r--r-- | drivers/char/ftape/zftape/zftape-vtbl.c | 10 | ||||
-rw-r--r-- | drivers/char/ftape/zftape/zftape-write.c | 4 |
14 files changed, 64 insertions, 64 deletions
diff --git a/drivers/char/ftape/lowlevel/fdc-io.c b/drivers/char/ftape/lowlevel/fdc-io.c index 12d1e1a6e..ea67cd9f4 100644 --- a/drivers/char/ftape/lowlevel/fdc-io.c +++ b/drivers/char/ftape/lowlevel/fdc-io.c @@ -50,10 +50,10 @@ /* Global vars. */ -int ftape_motor = 0; +int ftape_motor; volatile int ftape_current_cylinder = -1; volatile fdc_mode_enum fdc_mode = fdc_idle; -fdc_config_info fdc = {0}; +fdc_config_info fdc; DECLARE_WAIT_QUEUE_HEAD(ftape_wait_intr); unsigned int ft_fdc_base = CONFIG_FT_FDC_BASE; @@ -73,15 +73,15 @@ volatile __u8 fdc_head; /* FDC head from sector id */ volatile __u8 fdc_cyl; /* FDC track from sector id */ volatile __u8 fdc_sect; /* FDC sector from sector id */ static int fdc_data_rate = 500; /* data rate (Kbps) */ -static int fdc_rate_code = 0; /* data rate code (0 == 500 Kbps) */ +static int fdc_rate_code; /* data rate code (0 == 500 Kbps) */ static int fdc_seek_rate = 2; /* step rate (msec) */ static void (*do_ftape) (void); static int fdc_fifo_state; /* original fifo setting - fifo enabled */ static int fdc_fifo_thr; /* original fifo setting - threshold */ static int fdc_lock_state; /* original lock setting - locked */ -static int fdc_fifo_locked = 0; /* has fifo && lock set ? */ -static __u8 fdc_precomp = 0; /* default precomp. value (nsec) */ -static __u8 fdc_prec_code = 0; /* fdc precomp. select code */ +static int fdc_fifo_locked; /* has fifo && lock set ? */ +static __u8 fdc_precomp; /* default precomp. value (nsec) */ +static __u8 fdc_prec_code; /* fdc precomp. select code */ static char ftape_id[] = "ftape"; /* used by request irq and free irq */ @@ -188,7 +188,7 @@ int fdc_command(const __u8 * cmd_data, int cmd_len) int count = cmd_len; int retry = 0; #ifdef TESTING - static unsigned int last_time = 0; + static unsigned int last_time; unsigned int time; #endif TRACE_FUN(ft_t_any); @@ -387,7 +387,7 @@ int fdc_interrupt_wait(unsigned int time) { DECLARE_WAITQUEUE(wait,current); sigset_t old_sigmask; - static int resetting = 0; + static int resetting; long timeout; TRACE_FUN(ft_t_fdc_dma); @@ -868,7 +868,7 @@ int fdc_recalibrate(void) TRACE_EXIT 0; } -static int perpend_mode = 0; /* set if fdc is in perpendicular mode */ +static int perpend_mode; /* set if fdc is in perpendicular mode */ static int perpend_off(void) { @@ -1113,7 +1113,7 @@ static int fdc_fifo_enable(void) /* Determine fd controller type */ -static __u8 fdc_save_state[2] = {0, 0}; +static __u8 fdc_save_state[2]; int fdc_probe(void) { @@ -1283,7 +1283,7 @@ static int fdc_config_regs(unsigned int fdc_base, static int fdc_config(void) { - static int already_done = 0; + static int already_done; TRACE_FUN(ft_t_any); if (already_done) { diff --git a/drivers/char/ftape/lowlevel/fdc-isr.c b/drivers/char/ftape/lowlevel/fdc-isr.c index 4c3975add..3fdae227e 100644 --- a/drivers/char/ftape/lowlevel/fdc-isr.c +++ b/drivers/char/ftape/lowlevel/fdc-isr.c @@ -44,10 +44,10 @@ /* Global vars. */ -volatile int ft_expected_stray_interrupts = 0; -volatile int ft_interrupt_seen = 0; -volatile int ft_seek_completed = 0; -volatile int ft_hide_interrupt = 0; +volatile int ft_expected_stray_interrupts; +volatile int ft_interrupt_seen; +volatile int ft_seek_completed; +volatile int ft_hide_interrupt; /* Local vars. */ typedef enum { @@ -55,7 +55,7 @@ typedef enum { data_am_error = 0x04, data_crc_error = 0x08, no_data_error = 0x10, overrun_error = 0x20, } error_cause; -static int stop_read_ahead = 0; +static int stop_read_ahead; static void print_error_cause(int cause) @@ -730,7 +730,7 @@ static void continue_formatting(buffer_struct *buff) */ static void handle_fdc_busy(buffer_struct *buff) { - static int no_data_error_count = 0; + static int no_data_error_count; int retry = 0; error_cause cause; __u8 in[7]; @@ -1077,7 +1077,7 @@ static void handle_fdc_busy(buffer_struct *buff) */ void fdc_isr(void) { - static int isr_active = 0; + static int isr_active; #ifdef TESTING unsigned int t0 = ftape_timestamp(); #endif diff --git a/drivers/char/ftape/lowlevel/ftape-bsm.c b/drivers/char/ftape/lowlevel/ftape-bsm.c index 2fcc85e50..ad157a1c7 100644 --- a/drivers/char/ftape/lowlevel/ftape-bsm.c +++ b/drivers/char/ftape/lowlevel/ftape-bsm.c @@ -39,8 +39,8 @@ /* Local vars. */ -static __u8 *bad_sector_map = NULL; -static SectorCount *bsm_hash_ptr = NULL; +static __u8 *bad_sector_map; +static SectorCount *bsm_hash_ptr; typedef enum { forward, backward @@ -454,7 +454,7 @@ SectorMap ftape_get_bad_sector_entry(int segment_id) * For true random access it may have to be redesigned. */ static int last_reference = -1; - static SectorMap map = 0; + static SectorMap map; if (segment_id > last_reference) { /* Skip all sectors before segment_id diff --git a/drivers/char/ftape/lowlevel/ftape-format.c b/drivers/char/ftape/lowlevel/ftape-format.c index 015911918..41f43dffb 100644 --- a/drivers/char/ftape/lowlevel/ftape-format.c +++ b/drivers/char/ftape/lowlevel/ftape-format.c @@ -47,7 +47,7 @@ /* * first segment of the new buffer */ -static int switch_segment = 0; +static int switch_segment; /* * at most 256 segments fit into one 32 kb buffer. Even TR-1 cartridges have diff --git a/drivers/char/ftape/lowlevel/ftape-io.c b/drivers/char/ftape/lowlevel/ftape-io.c index 464b792d3..c13b8e3c8 100644 --- a/drivers/char/ftape/lowlevel/ftape-io.c +++ b/drivers/char/ftape/lowlevel/ftape-io.c @@ -50,14 +50,14 @@ */ /* NOTE: sectors start numbering at 1, all others at 0 ! */ ft_timeout_table ftape_timeout; -unsigned int ftape_tape_len = 0; +unsigned int ftape_tape_len; volatile qic117_cmd_t ftape_current_command; const struct qic117_command_table qic117_cmds[] = QIC117_COMMANDS; int ftape_might_be_off_track; /* Local vars. */ -static int diagnostic_mode = 0; +static int diagnostic_mode; static unsigned int ftape_udelay_count; static unsigned int ftape_udelay_time; @@ -232,7 +232,7 @@ static int ft_check_cmd_restrictions(qic117_cmd_t command) int ftape_command(qic117_cmd_t command) { int result = 0; - static int level = 0; + static int level; TRACE_FUN(ft_t_any); if ((unsigned int)command > NR_ITEMS(qic117_cmds)) { @@ -778,7 +778,7 @@ int ftape_set_data_rate(unsigned int new_rate /* Kbps */, unsigned int qic_std) int status; int result = 0; unsigned int data_rate = new_rate; - static int supported = 0; + static int supported; int rate_changed = 0; qic_model dummy_model; unsigned int dummy_qic_std, dummy_tape_len; diff --git a/drivers/char/ftape/lowlevel/ftape-rw.c b/drivers/char/ftape/lowlevel/ftape-rw.c index 2c14f468e..e6ac3b625 100644 --- a/drivers/char/ftape/lowlevel/ftape-rw.c +++ b/drivers/char/ftape/lowlevel/ftape-rw.c @@ -43,18 +43,18 @@ /* Global vars. */ -int ft_nr_buffers = 0; -buffer_struct *ft_buffer[FT_MAX_NR_BUFFERS] = {NULL, }; +int ft_nr_buffers; +buffer_struct *ft_buffer[FT_MAX_NR_BUFFERS]; static volatile int ft_head; static volatile int ft_tail; /* not volatile but need same type as head */ int fdc_setup_error; location_record ft_location = {-1, 0}; -volatile int ftape_tape_running = 0; +volatile int ftape_tape_running; /* Local vars. */ -static int overrun_count_offset = 0; -static int inhibit_correction = 0; +static int overrun_count_offset; +static int inhibit_correction; /* maxmimal allowed overshoot when fast seeking */ diff --git a/drivers/char/ftape/lowlevel/ftape-tracing.c b/drivers/char/ftape/lowlevel/ftape-tracing.c index 95e3df8e8..7fdc65674 100644 --- a/drivers/char/ftape/lowlevel/ftape-tracing.c +++ b/drivers/char/ftape/lowlevel/ftape-tracing.c @@ -43,11 +43,11 @@ * 8 + everything else */ ft_trace_t ftape_tracing = ft_t_info; /* Default level: information and up */ -int ftape_function_nest_level = 0; +int ftape_function_nest_level; /* Local vars. */ -static __u8 trace_id = 0; +static __u8 trace_id; static char spacing[] = "* "; void ftape_trace_call(const char *file, const char *name) diff --git a/drivers/char/ftape/lowlevel/ftape-write.c b/drivers/char/ftape/lowlevel/ftape-write.c index a0f095b9a..c4cb18779 100644 --- a/drivers/char/ftape/lowlevel/ftape-write.c +++ b/drivers/char/ftape/lowlevel/ftape-write.c @@ -47,7 +47,7 @@ /* Local vars. */ -static int last_write_failed = 0; +static int last_write_failed; void ftape_zap_write_buffers(void) { diff --git a/drivers/char/ftape/zftape/zftape-buffers.c b/drivers/char/ftape/zftape/zftape-buffers.c index bafc7e1a9..f3dace343 100644 --- a/drivers/char/ftape/zftape/zftape-buffers.c +++ b/drivers/char/ftape/zftape/zftape-buffers.c @@ -48,8 +48,8 @@ /* local varibales */ -static unsigned int used_memory = 0; -static unsigned int peak_memory = 0; +static unsigned int used_memory; +static unsigned int peak_memory; void zft_memory_stats(void) { diff --git a/drivers/char/ftape/zftape/zftape-ctl.c b/drivers/char/ftape/zftape/zftape-ctl.c index da2010ceb..6441ca929 100644 --- a/drivers/char/ftape/zftape/zftape-ctl.c +++ b/drivers/char/ftape/zftape/zftape-ctl.c @@ -49,16 +49,16 @@ /* Global vars. */ -int zft_write_protected = 0; /* this is when cartridge rdonly or O_RDONLY */ -int zft_header_read = 0; -int zft_offline = 0; -unsigned int zft_unit = 0; -int zft_resid = 0; -int zft_mt_compression = 0; +int zft_write_protected; /* this is when cartridge rdonly or O_RDONLY */ +int zft_header_read; +int zft_offline; +unsigned int zft_unit; +int zft_resid; +int zft_mt_compression; /* Local vars. */ -static int going_offline = 0; +static int going_offline; typedef int (mt_fun)(int *argptr); typedef int (*mt_funp)(int *argptr); diff --git a/drivers/char/ftape/zftape/zftape-read.c b/drivers/char/ftape/zftape/zftape-read.c index 91ed51423..756ee3239 100644 --- a/drivers/char/ftape/zftape/zftape-read.c +++ b/drivers/char/ftape/zftape/zftape-read.c @@ -45,11 +45,11 @@ /* Global vars. */ -int zft_just_before_eof = 0; +int zft_just_before_eof; /* Local vars. */ -static int buf_len_rd = 0; +static int buf_len_rd; void zft_zap_read_buffers(void) { @@ -194,7 +194,7 @@ static int check_read_access(int *req_len, int *req_clipped, const zft_position *pos) { - static __s64 remaining = 0; + static __s64 remaining; static int eod; TRACE_FUN(ft_t_flow); diff --git a/drivers/char/ftape/zftape/zftape-rw.c b/drivers/char/ftape/zftape/zftape-rw.c index 784068096..9e599530c 100644 --- a/drivers/char/ftape/zftape/zftape-rw.c +++ b/drivers/char/ftape/zftape/zftape-rw.c @@ -41,14 +41,14 @@ /* Global vars. */ -__u8 *zft_deblock_buf = NULL; -__u8 *zft_hseg_buf = NULL; +__u8 *zft_deblock_buf; +__u8 *zft_hseg_buf; int zft_deblock_segment = -1; zft_status_enum zft_io_state = zft_idle; -int zft_header_changed = 0; -int zft_bad_sector_map_changed = 0; -int zft_qic113 = 0; /* conform to old specs. and old zftape */ -int zft_use_compression = 0; +int zft_header_changed; +int zft_bad_sector_map_changed; +int zft_qic113; /* conform to old specs. and old zftape */ +int zft_use_compression; zft_position zft_pos = { -1, /* seg_pos */ 0, /* seg_byte_pos */ @@ -56,10 +56,10 @@ zft_position zft_pos = { 0 /* volume_pos */ }; unsigned int zft_blk_sz = CONFIG_ZFT_DFLT_BLK_SZ; -__s64 zft_capacity = 0; +__s64 zft_capacity; -unsigned int zft_written_segments = 0; -int zft_label_changed = 0; +unsigned int zft_written_segments; +int zft_label_changed; /* Local vars. */ @@ -165,8 +165,8 @@ int zft_calc_seg_byte_coord(int *seg_byte_pos, __s64 tape_pos) * Also, it might be in the future that the bad sector map gets * changed. -> reset the cache */ -static int seg_pos = 0; -static __s64 tape_pos = 0; +static int seg_pos; +static __s64 tape_pos; __s64 zft_get_capacity(void) { diff --git a/drivers/char/ftape/zftape/zftape-vtbl.c b/drivers/char/ftape/zftape/zftape-vtbl.c index cf0ef2325..e4804ea2e 100644 --- a/drivers/char/ftape/zftape/zftape-vtbl.c +++ b/drivers/char/ftape/zftape/zftape-vtbl.c @@ -48,8 +48,8 @@ * global variables */ int zft_qic_mode = 1; /* use the vtbl */ -int zft_old_ftape = 0; /* prevents old ftaped tapes to be overwritten */ -int zft_volume_table_changed = 0; /* for write_header_segments() */ +int zft_old_ftape; /* prevents old ftaped tapes to be overwritten */ +int zft_volume_table_changed; /* for write_header_segments() */ /* * private variables (only exported for inline functions) @@ -59,9 +59,9 @@ LIST_HEAD(zft_vtbl); /* We could also allocate these dynamically when extracting the volume table * sizeof(zft_volinfo) is about 32 or something close to that */ -static zft_volinfo tape_vtbl = { {NULL, NULL}, 0, }; -static zft_volinfo eot_vtbl = { {NULL, NULL}, 0, }; -static zft_volinfo *cur_vtbl = NULL; +static zft_volinfo tape_vtbl; +static zft_volinfo eot_vtbl; +static zft_volinfo *cur_vtbl; inline void zft_new_vtbl_entry(void) { diff --git a/drivers/char/ftape/zftape/zftape-write.c b/drivers/char/ftape/zftape/zftape-write.c index 03b126f49..8608c4dcc 100644 --- a/drivers/char/ftape/zftape/zftape-write.c +++ b/drivers/char/ftape/zftape/zftape-write.c @@ -48,8 +48,8 @@ /* Local vars. */ -static int last_write_failed = 0; -static int need_flush = 0; +static int last_write_failed; +static int need_flush; void zft_prevent_flush(void) { |