]> git.hungrycats.org Git - linux/commitdiff
[PATCH] warning fixes
authorAndrew Morton <akpm@digeo.com>
Sun, 23 Mar 2003 11:29:46 +0000 (03:29 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 23 Mar 2003 11:29:46 +0000 (03:29 -0800)
- uninitialised var warning in pci_update_resource

- fix jiffy comparison type warnings in parport_pc.c

drivers/parport/parport_pc.c
drivers/pci/setup-res.c

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