Commit 64b33619a30ff18c1535ee779572ecffcc4711d2
Committed by
Linus Torvalds
1 parent
0cc0844bc6
Exists in
master
and in
39 other branches
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>
Showing 19 changed files with 25 additions and 25 deletions Side-by-side Diff
- arch/x86/kernel/scx200_32.c
- drivers/atm/ambassador.h
- drivers/atm/horizon.h
- drivers/char/dsp56k.c
- drivers/char/rio/host.h
- drivers/char/riscom8.h
- drivers/char/sx.h
- drivers/fc4/fcp_impl.h
- drivers/isdn/hisax/hisax.h
- drivers/isdn/hisax/hisax_if.h
- drivers/net/ni65.c
- drivers/net/wan/cosa.c
- drivers/net/wireless/hostap/hostap_wlan.h
- drivers/net/wireless/ray_cs.h
- include/linux/agpgart.h
- include/linux/hdlcdrv.h
- include/linux/scx200_gpio.h
- include/linux/stallion.h
- sound/pci/bt87x.c
arch/x86/kernel/scx200_32.c
drivers/atm/ambassador.h
drivers/atm/horizon.h
drivers/char/dsp56k.c
drivers/char/rio/host.h
... | ... | @@ -99,7 +99,7 @@ |
99 | 99 | struct UnixRup UnixRups[MAX_RUP + LINKS_PER_UNIT]; |
100 | 100 | int timeout_id; /* For calling 100 ms delays */ |
101 | 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 | 103 | char ____end_marker____; |
104 | 104 | }; |
105 | 105 | #define Control CardP->DpControl |
drivers/char/riscom8.h
drivers/char/sx.h
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | int c_dcd; |
28 | 28 | struct sx_board *board; |
29 | 29 | int line; |
30 | - long locks; | |
30 | + unsigned long locks; | |
31 | 31 | }; |
32 | 32 | |
33 | 33 | struct sx_board { |
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | int poll; |
46 | 46 | int ta_type; |
47 | 47 | struct timer_list timer; |
48 | - long locks; | |
48 | + unsigned long locks; | |
49 | 49 | }; |
50 | 50 | |
51 | 51 | struct vpd_prom { |
drivers/fc4/fcp_impl.h
... | ... | @@ -91,7 +91,7 @@ |
91 | 91 | fcp_cmd *scsi_cmd_pool; |
92 | 92 | char *scsi_rsp_pool; |
93 | 93 | dma_addr_t dma_scsi_cmd, dma_scsi_rsp; |
94 | - long *scsi_bitmap; | |
94 | + unsigned long *scsi_bitmap; | |
95 | 95 | long scsi_bitmap_end; |
96 | 96 | int scsi_free; |
97 | 97 | int (*encode_addr)(struct scsi_cmnd *, u16 *, struct _fc_channel *, fcp_cmnd *); |
drivers/isdn/hisax/hisax.h
drivers/isdn/hisax/hisax_if.h
drivers/net/ni65.c
drivers/net/wan/cosa.c
... | ... | @@ -154,8 +154,8 @@ |
154 | 154 | int nchannels; /* # of channels on this card */ |
155 | 155 | int driver_status; /* For communicating with firmware */ |
156 | 156 | int firmware_status; /* Downloaded, reseted, etc. */ |
157 | - long int rxbitmap, txbitmap; /* Bitmap of channels who are willing to send/receive data */ | |
158 | - long int rxtx; /* RX or TX in progress? */ | |
157 | + unsigned long rxbitmap, txbitmap;/* Bitmap of channels who are willing to send/receive data */ | |
158 | + unsigned long rxtx; /* RX or TX in progress? */ | |
159 | 159 | int enabled; |
160 | 160 | int usage; /* usage count */ |
161 | 161 | int txchan, txsize, rxsize; |
drivers/net/wireless/hostap/hostap_wlan.h
drivers/net/wireless/ray_cs.h
... | ... | @@ -33,8 +33,8 @@ |
33 | 33 | void __iomem *rmem; /* pointer to receive buffer window */ |
34 | 34 | struct pcmcia_device *finder; /* pointer back to struct pcmcia_device for card */ |
35 | 35 | struct timer_list timer; |
36 | - long tx_ccs_lock; | |
37 | - long ccs_lock; | |
36 | + unsigned long tx_ccs_lock; | |
37 | + unsigned long ccs_lock; | |
38 | 38 | int dl_param_ccs; |
39 | 39 | union { |
40 | 40 | struct b4_startup_params b4; |
include/linux/agpgart.h
... | ... | @@ -197,7 +197,7 @@ |
197 | 197 | struct agp_file_private *next; |
198 | 198 | struct agp_file_private *prev; |
199 | 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 | |
203 | 203 | struct agp_front_data { |
include/linux/hdlcdrv.h
include/linux/scx200_gpio.h
1 | 1 | u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); |
2 | 2 | |
3 | 3 | extern unsigned scx200_gpio_base; |
4 | -extern long scx200_gpio_shadow[2]; | |
4 | +extern unsigned long scx200_gpio_shadow[2]; | |
5 | 5 | extern struct nsc_gpio_ops scx200_gpio_ops; |
6 | 6 | |
7 | 7 | #define scx200_gpio_present() (scx200_gpio_base!=0) |
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | /* Definitions to make sure I do the same thing in all functions */ |
10 | 10 | #define __SCx200_GPIO_BANK unsigned bank = index>>5 |
11 | 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 | 13 | #define __SCx200_GPIO_INDEX index &= 31 |
14 | 14 | |
15 | 15 | #define __SCx200_GPIO_OUT __asm__ __volatile__("outsl":"=mS" (shadow):"d" (ioaddr), "0" (shadow)) |
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 | __SCx200_GPIO_IOADDR; |
43 | 43 | __SCx200_GPIO_SHADOW; |
44 | 44 | __SCx200_GPIO_INDEX; |
45 | - set_bit(index, shadow); | |
45 | + set_bit(index, shadow); /* __set_bit()? */ | |
46 | 46 | __SCx200_GPIO_OUT; |
47 | 47 | } |
48 | 48 | |
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | __SCx200_GPIO_IOADDR; |
54 | 54 | __SCx200_GPIO_SHADOW; |
55 | 55 | __SCx200_GPIO_INDEX; |
56 | - clear_bit(index, shadow); | |
56 | + clear_bit(index, shadow); /* __clear_bit()? */ | |
57 | 57 | __SCx200_GPIO_OUT; |
58 | 58 | } |
59 | 59 |
include/linux/stallion.h