Commit ebd158e7 authored by David S. Miller's avatar David S. Miller

[PATCH] Fix time comparison typing bugs.

Many places use inappropriate types for comparing jiffies,
int for example.  Fix those places up.
parent 236b5445
...@@ -981,7 +981,7 @@ dgrs_download(struct net_device *dev0) ...@@ -981,7 +981,7 @@ dgrs_download(struct net_device *dev0)
{ {
DGRS_PRIV *priv0 = (DGRS_PRIV *) dev0->priv; DGRS_PRIV *priv0 = (DGRS_PRIV *) dev0->priv;
int is; int is;
int i; unsigned long i;
static int iv2is[16] = { static int iv2is[16] = {
0, 0, 0, ES4H_IS_INT3, 0, 0, 0, ES4H_IS_INT3,
...@@ -1140,7 +1140,7 @@ int __init ...@@ -1140,7 +1140,7 @@ int __init
dgrs_probe1(struct net_device *dev) dgrs_probe1(struct net_device *dev)
{ {
DGRS_PRIV *priv = (DGRS_PRIV *) dev->priv; DGRS_PRIV *priv = (DGRS_PRIV *) dev->priv;
int i; unsigned long i;
int rc; int rc;
printk("%s: Digi RightSwitch io=%lx mem=%lx irq=%d plx=%lx dma=%lx\n", printk("%s: Digi RightSwitch io=%lx mem=%lx irq=%d plx=%lx dma=%lx\n",
......
...@@ -88,10 +88,10 @@ ...@@ -88,10 +88,10 @@
#include <net/arp.h> #include <net/arp.h>
struct shaper_cb { struct shaper_cb {
unsigned long shapeclock; /* Time it should go out */
unsigned long shapestamp; /* Stamp for shaper */
__u32 shapelatency; /* Latency on frame */ __u32 shapelatency; /* Latency on frame */
__u32 shapeclock; /* Time it should go out */
__u32 shapelen; /* Frame length in clocks */ __u32 shapelen; /* Frame length in clocks */
__u32 shapestamp; /* Stamp for shaper */
__u16 shapepend; /* Pending */ __u16 shapepend; /* Pending */
}; };
#define SHAPERCB(skb) ((struct shaper_cb *) ((skb)->cb)) #define SHAPERCB(skb) ((struct shaper_cb *) ((skb)->cb))
...@@ -335,7 +335,7 @@ static void shaper_kick(struct shaper *shaper) ...@@ -335,7 +335,7 @@ static void shaper_kick(struct shaper *shaper)
*/ */
if(sh_debug) if(sh_debug)
printk("Clock = %d, jiffies = %ld\n", SHAPERCB(skb)->shapeclock, jiffies); printk("Clock = %ld, jiffies = %ld\n", SHAPERCB(skb)->shapeclock, jiffies);
if(time_before_eq(SHAPERCB(skb)->shapeclock - jiffies, SHAPER_BURST)) if(time_before_eq(SHAPERCB(skb)->shapeclock - jiffies, SHAPER_BURST))
{ {
/* /*
......
...@@ -509,7 +509,7 @@ static int __init sis900_mii_probe (struct net_device * net_dev) ...@@ -509,7 +509,7 @@ static int __init sis900_mii_probe (struct net_device * net_dev)
{ {
struct sis900_private * sis_priv = net_dev->priv; struct sis900_private * sis_priv = net_dev->priv;
u16 poll_bit = MII_STAT_LINK, status = 0; u16 poll_bit = MII_STAT_LINK, status = 0;
unsigned int timeout = jiffies + 5 * HZ; unsigned long timeout = jiffies + 5 * HZ;
int phy_addr; int phy_addr;
u8 revision; u8 revision;
......
...@@ -694,7 +694,7 @@ static inline void isp2x00_disable_irqs(struct Scsi_Host *host) ...@@ -694,7 +694,7 @@ static inline void isp2x00_disable_irqs(struct Scsi_Host *host)
int isp2x00_detect(Scsi_Host_Template * tmpt) int isp2x00_detect(Scsi_Host_Template * tmpt)
{ {
int hosts = 0; int hosts = 0;
int wait_time; unsigned long wait_time;
struct Scsi_Host *host = NULL; struct Scsi_Host *host = NULL;
struct isp2x00_hostdata *hostdata; struct isp2x00_hostdata *hostdata;
struct pci_dev *pdev; struct pci_dev *pdev;
......
...@@ -21,7 +21,7 @@ struct shaper ...@@ -21,7 +21,7 @@ struct shaper
__u32 bitspersec; __u32 bitspersec;
__u32 shapelatency; __u32 shapelatency;
__u32 shapeclock; __u32 shapeclock;
__u32 recovery; /* Time we can next clock a packet out on unsigned long recovery; /* Time we can next clock a packet out on
an empty queue */ an empty queue */
unsigned long locked; unsigned long locked;
struct net_device_stats stats; struct net_device_stats stats;
......
...@@ -294,7 +294,7 @@ struct tty_struct { ...@@ -294,7 +294,7 @@ struct tty_struct {
unsigned char lnext:1, erasing:1, raw:1, real_raw:1, icanon:1; unsigned char lnext:1, erasing:1, raw:1, real_raw:1, icanon:1;
unsigned char closing:1; unsigned char closing:1;
unsigned short minimum_to_wake; unsigned short minimum_to_wake;
unsigned overrun_time; unsigned long overrun_time;
int num_overrun; int num_overrun;
unsigned long process_char_map[256/(8*sizeof(unsigned long))]; unsigned long process_char_map[256/(8*sizeof(unsigned long))];
char *read_buf; char *read_buf;
......
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