Commit ec1120f7 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] warning fixes

- uninitialised var warning in pci_update_resource

- fix jiffy comparison type warnings in parport_pc.c
parent 60e5e04d
...@@ -147,7 +147,7 @@ static int change_mode(struct parport *p, int m) ...@@ -147,7 +147,7 @@ static int change_mode(struct parport *p, int m)
if (mode >= 2 && !(priv->ctr & 0x20)) { if (mode >= 2 && !(priv->ctr & 0x20)) {
/* This mode resets the FIFO, so we may /* This mode resets the FIFO, so we may
* have to wait for it to drain first. */ * have to wait for it to drain first. */
long expire = jiffies + p->physport->cad->timeout; unsigned long expire = jiffies + p->physport->cad->timeout;
int counter; int counter;
switch (mode) { switch (mode) {
case ECR_PPF: /* Parallel Port FIFO mode */ case ECR_PPF: /* Parallel Port FIFO mode */
...@@ -596,7 +596,7 @@ static size_t parport_pc_fifo_write_block_pio (struct parport *port, ...@@ -596,7 +596,7 @@ static size_t parport_pc_fifo_write_block_pio (struct parport *port,
int ret = 0; int ret = 0;
const unsigned char *bufp = buf; const unsigned char *bufp = buf;
size_t left = length; size_t left = length;
long expire = jiffies + port->physport->cad->timeout; unsigned long expire = jiffies + port->physport->cad->timeout;
const int fifo = FIFO (port); const int fifo = FIFO (port);
int poll_for = 8; /* 80 usecs */ int poll_for = 8; /* 80 usecs */
const struct parport_pc_private *priv = port->physport->private_data; const struct parport_pc_private *priv = port->physport->private_data;
...@@ -724,7 +724,7 @@ dump_parport_state ("enter fifo_write_block_dma", port); ...@@ -724,7 +724,7 @@ dump_parport_state ("enter fifo_write_block_dma", port);
parport_pc_data_forward (port); /* Must be in PS2 mode */ parport_pc_data_forward (port); /* Must be in PS2 mode */
while (left) { while (left) {
long expire = jiffies + port->physport->cad->timeout; unsigned long expire = jiffies + port->physport->cad->timeout;
size_t count = left; size_t count = left;
...@@ -816,7 +816,7 @@ size_t parport_pc_compat_write_block_pio (struct parport *port, ...@@ -816,7 +816,7 @@ size_t parport_pc_compat_write_block_pio (struct parport *port,
{ {
size_t written; size_t written;
int r; int r;
long int expire; unsigned long expire;
const struct parport_pc_private *priv = port->physport->private_data; const struct parport_pc_private *priv = port->physport->private_data;
/* Special case: a timeout of zero means we cannot call schedule(). /* Special case: a timeout of zero means we cannot call schedule().
...@@ -893,7 +893,7 @@ size_t parport_pc_ecp_write_block_pio (struct parport *port, ...@@ -893,7 +893,7 @@ size_t parport_pc_ecp_write_block_pio (struct parport *port,
{ {
size_t written; size_t written;
int r; int r;
long int expire; unsigned long expire;
const struct parport_pc_private *priv = port->physport->private_data; const struct parport_pc_private *priv = port->physport->private_data;
/* Special case: a timeout of zero means we cannot call schedule(). /* Special case: a timeout of zero means we cannot call schedule().
...@@ -1111,7 +1111,7 @@ dump_parport_state ("rev idle", port); ...@@ -1111,7 +1111,7 @@ dump_parport_state ("rev idle", port);
/* Do the transfer. */ /* Do the transfer. */
while (left > fifofull) { while (left > fifofull) {
int ret; int ret;
long int expire = jiffies + port->cad->timeout; unsigned long expire = jiffies + port->cad->timeout;
unsigned char ecrval = inb (ECONTROL (port)); unsigned char ecrval = inb (ECONTROL (port));
if (need_resched() && time_before (jiffies, expire)) if (need_resched() && time_before (jiffies, expire))
......
...@@ -60,6 +60,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) ...@@ -60,6 +60,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
} else { } else {
/* Hmm, non-standard resource. */ /* Hmm, non-standard resource. */
BUG(); BUG();
return; /* kill uninitialised var warning */
} }
pci_write_config_dword(dev, reg, new); pci_write_config_dword(dev, reg, new);
......
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