aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-10-14 14:35:20 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-14 15:41:51 -0400
commit64b33619a30ff18c1535ee779572ecffcc4711d2 (patch)
tree742db1890a5671d105eba372b78c7d383607ffe6
parent0cc0844bc6d0bfca97fda48fa28d1f0a7cf878cb (diff)
long vs. unsigned long - low-hanging fruits in drivers
deal with signedness of the stuff passed to set_bit() et.al. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/x86/kernel/scx200_32.c2
-rw-r--r--drivers/atm/ambassador.h2
-rw-r--r--drivers/atm/horizon.h2
-rw-r--r--drivers/char/dsp56k.c2
-rw-r--r--drivers/char/rio/host.h2
-rw-r--r--drivers/char/riscom8.h2
-rw-r--r--drivers/char/sx.h4
-rw-r--r--drivers/fc4/fcp_impl.h2
-rw-r--r--drivers/isdn/hisax/hisax.h2
-rw-r--r--drivers/isdn/hisax/hisax_if.h2
-rw-r--r--drivers/net/ni65.c2
-rw-r--r--drivers/net/wan/cosa.c4
-rw-r--r--drivers/net/wireless/hostap/hostap_wlan.h2
-rw-r--r--drivers/net/wireless/ray_cs.h4
-rw-r--r--include/linux/agpgart.h2
-rw-r--r--include/linux/hdlcdrv.h2
-rw-r--r--include/linux/scx200_gpio.h8
-rw-r--r--include/linux/stallion.h2
-rw-r--r--sound/pci/bt87x.c2
19 files changed, 25 insertions, 25 deletions
diff --git a/arch/x86/kernel/scx200_32.c b/arch/x86/kernel/scx200_32.c
index 487597720913..87bc159d29df 100644
--- a/arch/x86/kernel/scx200_32.c
+++ b/arch/x86/kernel/scx200_32.c
@@ -24,7 +24,7 @@ MODULE_DESCRIPTION("NatSemi SCx200 Driver");
24MODULE_LICENSE("GPL"); 24MODULE_LICENSE("GPL");
25 25
26unsigned scx200_gpio_base = 0; 26unsigned scx200_gpio_base = 0;
27long scx200_gpio_shadow[2]; 27unsigned long scx200_gpio_shadow[2];
28 28
29unsigned scx200_cb_base = 0; 29unsigned scx200_cb_base = 0;
30 30
diff --git a/drivers/atm/ambassador.h b/drivers/atm/ambassador.h
index 8296420ceaef..ff2a303cbe00 100644
--- a/drivers/atm/ambassador.h
+++ b/drivers/atm/ambassador.h
@@ -626,7 +626,7 @@ typedef struct {
626 626
627struct amb_dev { 627struct amb_dev {
628 u8 irq; 628 u8 irq;
629 long flags; 629 unsigned long flags;
630 u32 iobase; 630 u32 iobase;
631 u32 * membase; 631 u32 * membase;
632 632
diff --git a/drivers/atm/horizon.h b/drivers/atm/horizon.h
index 4461229f56a5..b48859d0d434 100644
--- a/drivers/atm/horizon.h
+++ b/drivers/atm/horizon.h
@@ -423,7 +423,7 @@ struct hrz_dev {
423 wait_queue_head_t tx_queue; 423 wait_queue_head_t tx_queue;
424 424
425 u8 irq; 425 u8 irq;
426 long flags; 426 unsigned long flags;
427 u8 tx_last; 427 u8 tx_last;
428 u8 tx_idle; 428 u8 tx_idle;
429 429
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c
index acbfe1c49b4d..a69c65283260 100644
--- a/drivers/char/dsp56k.c
+++ b/drivers/char/dsp56k.c
@@ -136,7 +136,7 @@ static int sizeof_bootstrap = 375;
136 136
137 137
138static struct dsp56k_device { 138static struct dsp56k_device {
139 long in_use; 139 unsigned long in_use;
140 long maxio, timeout; 140 long maxio, timeout;
141 int tx_wsize, rx_wsize; 141 int tx_wsize, rx_wsize;
142} dsp56k; 142} dsp56k;
diff --git a/drivers/char/rio/host.h b/drivers/char/rio/host.h
index 23d0681fe491..78f24540c224 100644
--- a/drivers/char/rio/host.h
+++ b/drivers/char/rio/host.h
@@ -99,7 +99,7 @@ struct Host {
99 struct UnixRup UnixRups[MAX_RUP + LINKS_PER_UNIT]; 99 struct UnixRup UnixRups[MAX_RUP + LINKS_PER_UNIT];
100 int timeout_id; /* For calling 100 ms delays */ 100 int timeout_id; /* For calling 100 ms delays */
101 int timeout_sem; /* For calling 100 ms delays */ 101 int timeout_sem; /* For calling 100 ms delays */
102 long locks; /* long req'd for set_bit --RR */ 102 unsigned long locks; /* long req'd for set_bit --RR */
103 char ____end_marker____; 103 char ____end_marker____;
104}; 104};
105#define Control CardP->DpControl 105#define Control CardP->DpControl
diff --git a/drivers/char/riscom8.h b/drivers/char/riscom8.h
index 6317aade201a..9cc1313d5e67 100644
--- a/drivers/char/riscom8.h
+++ b/drivers/char/riscom8.h
@@ -71,7 +71,7 @@ struct riscom_port {
71 struct tty_struct * tty; 71 struct tty_struct * tty;
72 int count; 72 int count;
73 int blocked_open; 73 int blocked_open;
74 long event; /* long req'd for set_bit --RR */ 74 unsigned long event; /* long req'd for set_bit --RR */
75 int timeout; 75 int timeout;
76 int close_delay; 76 int close_delay;
77 unsigned char * xmit_buf; 77 unsigned char * xmit_buf;
diff --git a/drivers/char/sx.h b/drivers/char/sx.h
index 432aad0a2ddd..70d9783c7323 100644
--- a/drivers/char/sx.h
+++ b/drivers/char/sx.h
@@ -27,7 +27,7 @@ struct sx_port {
27 int c_dcd; 27 int c_dcd;
28 struct sx_board *board; 28 struct sx_board *board;
29 int line; 29 int line;
30 long locks; 30 unsigned long locks;
31}; 31};
32 32
33struct sx_board { 33struct sx_board {
@@ -45,7 +45,7 @@ struct sx_board {
45 int poll; 45 int poll;
46 int ta_type; 46 int ta_type;
47 struct timer_list timer; 47 struct timer_list timer;
48 long locks; 48 unsigned long locks;
49}; 49};
50 50
51struct vpd_prom { 51struct vpd_prom {
diff --git a/drivers/fc4/fcp_impl.h b/drivers/fc4/fcp_impl.h
index 1ac61330592e..506338a461ba 100644
--- a/drivers/fc4/fcp_impl.h
+++ b/drivers/fc4/fcp_impl.h
@@ -91,7 +91,7 @@ typedef struct _fc_channel {
91 fcp_cmd *scsi_cmd_pool; 91 fcp_cmd *scsi_cmd_pool;
92 char *scsi_rsp_pool; 92 char *scsi_rsp_pool;
93 dma_addr_t dma_scsi_cmd, dma_scsi_rsp; 93 dma_addr_t dma_scsi_cmd, dma_scsi_rsp;
94 long *scsi_bitmap; 94 unsigned long *scsi_bitmap;
95 long scsi_bitmap_end; 95 long scsi_bitmap_end;
96 int scsi_free; 96 int scsi_free;
97 int (*encode_addr)(struct scsi_cmnd *, u16 *, struct _fc_channel *, fcp_cmnd *); 97 int (*encode_addr)(struct scsi_cmnd *, u16 *, struct _fc_channel *, fcp_cmnd *);
diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h
index 3cd8d5ba239b..34733c903df7 100644
--- a/drivers/isdn/hisax/hisax.h
+++ b/drivers/isdn/hisax/hisax.h
@@ -202,7 +202,7 @@ struct Layer1 {
202 void *hardware; 202 void *hardware;
203 struct BCState *bcs; 203 struct BCState *bcs;
204 struct PStack **stlistp; 204 struct PStack **stlistp;
205 long Flags; 205 unsigned long Flags;
206 struct FsmInst l1m; 206 struct FsmInst l1m;
207 struct FsmTimer timer; 207 struct FsmTimer timer;
208 void (*l1l2) (struct PStack *, int, void *); 208 void (*l1l2) (struct PStack *, int, void *);
diff --git a/drivers/isdn/hisax/hisax_if.h b/drivers/isdn/hisax/hisax_if.h
index 4898fce2d509..aa7c94037b2b 100644
--- a/drivers/isdn/hisax/hisax_if.h
+++ b/drivers/isdn/hisax/hisax_if.h
@@ -56,7 +56,7 @@ struct hisax_d_if {
56 struct IsdnCardState *cs; 56 struct IsdnCardState *cs;
57 struct hisax_b_if *b_if[2]; 57 struct hisax_b_if *b_if[2];
58 struct sk_buff_head erq; 58 struct sk_buff_head erq;
59 long ph_state; 59 unsigned long ph_state;
60}; 60};
61 61
62int hisax_register(struct hisax_d_if *hisax_if, struct hisax_b_if *b_if[], 62int hisax_register(struct hisax_d_if *hisax_if, struct hisax_b_if *b_if[],
diff --git a/drivers/net/ni65.c b/drivers/net/ni65.c
index 097685245112..3edc971d0eca 100644
--- a/drivers/net/ni65.c
+++ b/drivers/net/ni65.c
@@ -183,7 +183,7 @@ static struct card {
183 short addr_offset; 183 short addr_offset;
184 unsigned char *vendor_id; 184 unsigned char *vendor_id;
185 char *cardname; 185 char *cardname;
186 long config; 186 unsigned long config;
187} cards[] = { 187} cards[] = {
188 { 188 {
189 .id0 = NI65_ID0, 189 .id0 = NI65_ID0,
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 26058b4f8f36..ff37bf437a99 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -154,8 +154,8 @@ struct cosa_data {
154 int nchannels; /* # of channels on this card */ 154 int nchannels; /* # of channels on this card */
155 int driver_status; /* For communicating with firmware */ 155 int driver_status; /* For communicating with firmware */
156 int firmware_status; /* Downloaded, reseted, etc. */ 156 int firmware_status; /* Downloaded, reseted, etc. */
157 long int rxbitmap, txbitmap; /* Bitmap of channels who are willing to send/receive data */ 157 unsigned long rxbitmap, txbitmap;/* Bitmap of channels who are willing to send/receive data */
158 long int rxtx; /* RX or TX in progress? */ 158 unsigned long rxtx; /* RX or TX in progress? */
159 int enabled; 159 int enabled;
160 int usage; /* usage count */ 160 int usage; /* usage count */
161 int txchan, txsize, rxsize; 161 int txchan, txsize, rxsize;
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h
index c27b2c1c06af..e6516a186d0e 100644
--- a/drivers/net/wireless/hostap/hostap_wlan.h
+++ b/drivers/net/wireless/hostap/hostap_wlan.h
@@ -661,7 +661,7 @@ struct local_info {
661#define HOSTAP_BITS_TRANSMIT 0 661#define HOSTAP_BITS_TRANSMIT 0
662#define HOSTAP_BITS_BAP_TASKLET 1 662#define HOSTAP_BITS_BAP_TASKLET 1
663#define HOSTAP_BITS_BAP_TASKLET2 2 663#define HOSTAP_BITS_BAP_TASKLET2 2
664 long bits; 664 unsigned long bits;
665 665
666 struct ap_data *ap; 666 struct ap_data *ap;
667 667
diff --git a/drivers/net/wireless/ray_cs.h b/drivers/net/wireless/ray_cs.h
index bd73ebf03340..1e23b7f4cca7 100644
--- a/drivers/net/wireless/ray_cs.h
+++ b/drivers/net/wireless/ray_cs.h
@@ -33,8 +33,8 @@ typedef struct ray_dev_t {
33 void __iomem *rmem; /* pointer to receive buffer window */ 33 void __iomem *rmem; /* pointer to receive buffer window */
34 struct pcmcia_device *finder; /* pointer back to struct pcmcia_device for card */ 34 struct pcmcia_device *finder; /* pointer back to struct pcmcia_device for card */
35 struct timer_list timer; 35 struct timer_list timer;
36 long tx_ccs_lock; 36 unsigned long tx_ccs_lock;
37 long ccs_lock; 37 unsigned long ccs_lock;
38 int dl_param_ccs; 38 int dl_param_ccs;
39 union { 39 union {
40 struct b4_startup_params b4; 40 struct b4_startup_params b4;
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h
index bfb8ec791b7b..09fbf7e5a6cb 100644
--- a/include/linux/agpgart.h
+++ b/include/linux/agpgart.h
@@ -197,7 +197,7 @@ struct agp_file_private {
197 struct agp_file_private *next; 197 struct agp_file_private *next;
198 struct agp_file_private *prev; 198 struct agp_file_private *prev;
199 pid_t my_pid; 199 pid_t my_pid;
200 long access_flags; /* long req'd for set_bit --RR */ 200 unsigned long access_flags; /* long req'd for set_bit --RR */
201}; 201};
202 202
203struct agp_front_data { 203struct agp_front_data {
diff --git a/include/linux/hdlcdrv.h b/include/linux/hdlcdrv.h
index 4f6ee3b267fa..bf6302f6b5f8 100644
--- a/include/linux/hdlcdrv.h
+++ b/include/linux/hdlcdrv.h
@@ -200,7 +200,7 @@ struct hdlcdrv_state {
200 200
201 struct hdlcdrv_hdlcrx { 201 struct hdlcdrv_hdlcrx {
202 struct hdlcdrv_hdlcbuffer hbuf; 202 struct hdlcdrv_hdlcbuffer hbuf;
203 long in_hdlc_rx; 203 unsigned long in_hdlc_rx;
204 /* 0 = sync hunt, != 0 receiving */ 204 /* 0 = sync hunt, != 0 receiving */
205 int rx_state; 205 int rx_state;
206 unsigned int bitstream; 206 unsigned int bitstream;
diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h
index d2b058130eb1..ece4e553e9ac 100644
--- a/include/linux/scx200_gpio.h
+++ b/include/linux/scx200_gpio.h
@@ -1,7 +1,7 @@
1u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); 1u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear);
2 2
3extern unsigned scx200_gpio_base; 3extern unsigned scx200_gpio_base;
4extern long scx200_gpio_shadow[2]; 4extern unsigned long scx200_gpio_shadow[2];
5extern struct nsc_gpio_ops scx200_gpio_ops; 5extern struct nsc_gpio_ops scx200_gpio_ops;
6 6
7#define scx200_gpio_present() (scx200_gpio_base!=0) 7#define scx200_gpio_present() (scx200_gpio_base!=0)
@@ -9,7 +9,7 @@ extern struct nsc_gpio_ops scx200_gpio_ops;
9/* Definitions to make sure I do the same thing in all functions */ 9/* Definitions to make sure I do the same thing in all functions */
10#define __SCx200_GPIO_BANK unsigned bank = index>>5 10#define __SCx200_GPIO_BANK unsigned bank = index>>5
11#define __SCx200_GPIO_IOADDR unsigned short ioaddr = scx200_gpio_base+0x10*bank 11#define __SCx200_GPIO_IOADDR unsigned short ioaddr = scx200_gpio_base+0x10*bank
12#define __SCx200_GPIO_SHADOW long *shadow = scx200_gpio_shadow+bank 12#define __SCx200_GPIO_SHADOW unsigned long *shadow = scx200_gpio_shadow+bank
13#define __SCx200_GPIO_INDEX index &= 31 13#define __SCx200_GPIO_INDEX index &= 31
14 14
15#define __SCx200_GPIO_OUT __asm__ __volatile__("outsl":"=mS" (shadow):"d" (ioaddr), "0" (shadow)) 15#define __SCx200_GPIO_OUT __asm__ __volatile__("outsl":"=mS" (shadow):"d" (ioaddr), "0" (shadow))
@@ -42,7 +42,7 @@ static inline void scx200_gpio_set_high(unsigned index) {
42 __SCx200_GPIO_IOADDR; 42 __SCx200_GPIO_IOADDR;
43 __SCx200_GPIO_SHADOW; 43 __SCx200_GPIO_SHADOW;
44 __SCx200_GPIO_INDEX; 44 __SCx200_GPIO_INDEX;
45 set_bit(index, shadow); 45 set_bit(index, shadow); /* __set_bit()? */
46 __SCx200_GPIO_OUT; 46 __SCx200_GPIO_OUT;
47} 47}
48 48
@@ -53,7 +53,7 @@ static inline void scx200_gpio_set_low(unsigned index) {
53 __SCx200_GPIO_IOADDR; 53 __SCx200_GPIO_IOADDR;
54 __SCx200_GPIO_SHADOW; 54 __SCx200_GPIO_SHADOW;
55 __SCx200_GPIO_INDEX; 55 __SCx200_GPIO_INDEX;
56 clear_bit(index, shadow); 56 clear_bit(index, shadow); /* __clear_bit()? */
57 __SCx200_GPIO_OUT; 57 __SCx200_GPIO_OUT;
58} 58}
59 59
diff --git a/include/linux/stallion.h b/include/linux/stallion.h
index 4a0a329beafb..94b4a10b912f 100644
--- a/include/linux/stallion.h
+++ b/include/linux/stallion.h
@@ -75,7 +75,7 @@ struct stlport {
75 int ioaddr; 75 int ioaddr;
76 int uartaddr; 76 int uartaddr;
77 unsigned int pagenr; 77 unsigned int pagenr;
78 long istate; 78 unsigned long istate;
79 int flags; 79 int flags;
80 int baud_base; 80 int baud_base;
81 int custom_divisor; 81 int custom_divisor;
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index 188c7cf21b82..131952f55857 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -157,7 +157,7 @@ struct snd_bt87x {
157 int dig_rate; 157 int dig_rate;
158 158
159 spinlock_t reg_lock; 159 spinlock_t reg_lock;
160 long opened; 160 unsigned long opened;
161 struct snd_pcm_substream *substream; 161 struct snd_pcm_substream *substream;
162 162
163 struct snd_dma_buffer dma_risc; 163 struct snd_dma_buffer dma_risc;