Fix various places which aren't using unsigned long for jiffies.
Also other warnings and compilation errors as encountered.
static int ps2esdi_out_cmd_blk(u_short * cmd_blk)
{
- int i, j;
+ int i;
+ unsigned long jif;
u_char status;
/* enable interrupts */
outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
/* do not write to the controller, if it is busy */
- for (i = jiffies + ESDI_STAT_TIMEOUT; time_after(i, jiffies) && (inb(ESDI_STATUS) &
- STATUS_BUSY););
+ for (jif = jiffies + ESDI_STAT_TIMEOUT;
+ time_after(jif, jiffies) &&
+ (inb(ESDI_STATUS) & STATUS_BUSY); )
+ ;
#if 0
- printk("%s: i(1)=%d\n", DEVICE_NAME, i);
+ printk("%s: i(1)=%ld\n", DEVICE_NAME, jif);
#endif
/* if device is still busy - then just time out */
/* one by one send each word out */
for (i = (((*cmd_blk) >> 14) + 1) << 1; i; i--) {
status = inb(ESDI_STATUS);
- for (j = jiffies + ESDI_STAT_TIMEOUT;
- time_after(j, jiffies) && (status & STATUS_BUSY) &&
+ for (jif = jiffies + ESDI_STAT_TIMEOUT;
+ time_after(jif, jiffies) && (status & STATUS_BUSY) &&
(status & STATUS_CMD_INF); status = inb(ESDI_STATUS));
if ((status & (STATUS_BUSY | STATUS_CMD_INF)) == STATUS_BUSY) {
#if 0
static int wait_for_ready(time_t timeout)
{
int stat;
- time_t spin_t;
+ unsigned long spin_t;
/* Wait for ready or exception, without driving the loadavg up too much.
* In most cases, the tape drive already has READY asserted,
{
struct adv7175 *encoder;
struct i2c_client *client;
- int rv, i, x_common=39; /* x is number entries init_common - 1 */
+ int rv = 0;
+ int i, x_common=39; /* x is number entries init_common - 1 */
printk(KERN_INFO "adv717x: video chip found.\n");
client=kmalloc(sizeof(*client), GFP_KERNEL);
if( 1 == (err = i2c_transfer(&mxb->i2c_adapter, &msg, 1))) {
for(i = 1;;i++) {
msg.len = saa7740_init[i].length;
- if( -1 == msg.len ) {
+ if (msg.len == -1U) {
break;
}
msg.buf = &saa7740_init[i].data[0];
}
static int
-buffer_setup(struct file *file, int *count, int *size)
+buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
{
*size = TS_PACKET_SIZE * TS_NR_PACKETS;
if (0 == *count)
}
static int
-buffer_setup(struct file *file, int *count, int *size)
+buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
{
struct saa7134_fh *fh = file->private_data;
static int w9966_rReg(struct w9966_dev* cam, int reg);
static int w9966_wReg(struct w9966_dev* cam, int reg, int data);
+#if 0
static int w9966_rReg_i2c(struct w9966_dev* cam, int reg);
+#endif
static int w9966_wReg_i2c(struct w9966_dev* cam, int reg, int data);
static int w9966_findlen(int near, int size, int maxlen);
static int w9966_calcscale(int size, int min, int max, int* beg, int* end, unsigned char* factor);
static inline int w9966_i2c_getsda(struct w9966_dev* cam);
static inline int w9966_i2c_getscl(struct w9966_dev* cam);
static int w9966_i2c_wbyte(struct w9966_dev* cam, int data);
+#if 0
static int w9966_i2c_rbyte(struct w9966_dev* cam);
+#endif
static int w9966_v4l_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
// Expects a claimed pdev. -1 on error
static inline int w9966_i2c_setscl(struct w9966_dev* cam, int state)
{
- int timeout;
+ unsigned long timeout;
+
if (state)
cam->i2c_state |= W9966_I2C_W_CLOCK;
else
// Read a data byte with ack from the i2c-bus
// Expects a claimed pdev. -1 on error
+#if 0
static int w9966_i2c_rbyte(struct w9966_dev* cam)
{
unsigned char data = 0x00;
}
return data;
}
+#endif
// Read a register from the i2c device.
// Expects claimed pdev. -1 on error
+#if 0
static int w9966_rReg_i2c(struct w9966_dev* cam, int reg)
{
int data;
return data;
}
+#endif
// Write a register to the i2c device.
// Expects claimed pdev. -1 on error
unsigned long adr)
{
int ret;
- int timeo;
+ unsigned long timeo;
int status;
DECLARE_WAITQUEUE(wait, current);
static void __exit ltpc_cleanup(void)
{
- long timeout;
+ unsigned long timeout;
ltpc_timer.data = 0; /* signal the poll routine that we're done */
void *chanid;
int found_turbo=0;
unsigned char *tchanid, ctemp;
- int i,j;
+ int i, j;
+ unsigned long jif;
void *ram_mapped ;
if (turbo_searched == 1) return;
writeb(0x00, ram_mapped+0x1E01+i);
}
writeb(0x00, ram_mapped+0x1E01);
- for(i=jiffies+TR_BUSY_INTERVAL; time_before_eq(jiffies,i););
+ for(jif=jiffies+TR_BUSY_INTERVAL; time_before_eq(jiffies,jif););
intf_tbl=ntohs(readw(ram_mapped+ACA_OFFSET+ACA_RW+WRBR_EVEN));
if (intf_tbl) {
#if IBMTR_DEBUG_MESSAGES
turbo_io[index]=ntohs(readw(ram_mapped+intf_tbl+4));
turbo_irq[index]=readb(ram_mapped+intf_tbl+3);
outb(0, turbo_io[index] + ADAPTRESET);
- for(i=jiffies+TR_RST_TIME;time_before_eq(jiffies,i););
+ for(jif=jiffies+TR_RST_TIME;time_before_eq(jiffies,jif););
outb(0, turbo_io[index] + ADAPTRESETREL);
index++;
continue;
if (table->num_nodes)
ptr += sprintf(ptr, "\n %s\n", title);
for (i = 0; i < table->num_nodes; i++) {
+ MetricomNode node;
+
spin_lock_irqsave(&strip_lock, flags);
- MetricomNode node = table->node[i];
+ node = table->node[i];
spin_unlock_irqrestore(&strip_lock, flags);
ptr += sprintf(ptr, " %s\n", node.c);
}
static int ql_wai(void)
{
- int i, k;
+ int k;
+ unsigned long i;
+
k = 0;
i = jiffies + WATCHDOG;
while (time_before(jiffies, i) && !qabort && !((k = inb(qbase + 4)) & 0xe0)) {
static unsigned int ql_pcmd(Scsi_Cmnd * cmd)
{
- unsigned int i, j, k;
+ unsigned int i, j;
+ unsigned long k;
unsigned int result; /* ultimate return result */
unsigned int status; /* scsi returned status */
unsigned int message; /* scsi returned message */
unsigned int orig_len = len;
unsigned long flags = 0;
unsigned int bytes_left;
- int i;
+ unsigned long i;
int timeout = READ_TIMEOUT;
/* Do transfer */
unsigned int orig_len = len;
unsigned long flags = 0;
unsigned int bufferfree;
- unsigned int i;
+ unsigned long i;
unsigned int timeout = WRITE_TIMEOUT;
/* Do transfer */
static int sym53c416_probeirq(int base, int scsi_id)
{
- int irq, irqs, i;
+ int irq, irqs;
+ unsigned long i;
/* Clear interrupt register */
inb(base + INT_REG);