Skip to content

Commit 64b3361

Browse files
Al ViroLinus Torvalds
authored andcommitted
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>
1 parent 0cc0844 commit 64b3361

19 files changed

Lines changed: 25 additions & 25 deletions

File tree

arch/x86/kernel/scx200_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ MODULE_DESCRIPTION("NatSemi SCx200 Driver");
2424
MODULE_LICENSE("GPL");
2525

2626
unsigned scx200_gpio_base = 0;
27-
long scx200_gpio_shadow[2];
27+
unsigned long scx200_gpio_shadow[2];
2828

2929
unsigned scx200_cb_base = 0;
3030

drivers/atm/ambassador.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ typedef struct {
626626

627627
struct amb_dev {
628628
u8 irq;
629-
long flags;
629+
unsigned long flags;
630630
u32 iobase;
631631
u32 * membase;
632632

drivers/atm/horizon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ struct hrz_dev {
423423
wait_queue_head_t tx_queue;
424424

425425
u8 irq;
426-
long flags;
426+
unsigned long flags;
427427
u8 tx_last;
428428
u8 tx_idle;
429429

drivers/char/dsp56k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static int sizeof_bootstrap = 375;
136136

137137

138138
static struct dsp56k_device {
139-
long in_use;
139+
unsigned long in_use;
140140
long maxio, timeout;
141141
int tx_wsize, rx_wsize;
142142
} dsp56k;

drivers/char/rio/host.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ struct Host {
9999
struct UnixRup UnixRups[MAX_RUP + LINKS_PER_UNIT];
100100
int timeout_id; /* For calling 100 ms delays */
101101
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 */
103103
char ____end_marker____;
104104
};
105105
#define Control CardP->DpControl

drivers/char/riscom8.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct riscom_port {
7171
struct tty_struct * tty;
7272
int count;
7373
int blocked_open;
74-
long event; /* long req'd for set_bit --RR */
74+
unsigned long event; /* long req'd for set_bit --RR */
7575
int timeout;
7676
int close_delay;
7777
unsigned char * xmit_buf;

drivers/char/sx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct sx_port {
2727
int c_dcd;
2828
struct sx_board *board;
2929
int line;
30-
long locks;
30+
unsigned long locks;
3131
};
3232

3333
struct sx_board {
@@ -45,7 +45,7 @@ struct sx_board {
4545
int poll;
4646
int ta_type;
4747
struct timer_list timer;
48-
long locks;
48+
unsigned long locks;
4949
};
5050

5151
struct vpd_prom {

drivers/fc4/fcp_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ typedef struct _fc_channel {
9191
fcp_cmd *scsi_cmd_pool;
9292
char *scsi_rsp_pool;
9393
dma_addr_t dma_scsi_cmd, dma_scsi_rsp;
94-
long *scsi_bitmap;
94+
unsigned long *scsi_bitmap;
9595
long scsi_bitmap_end;
9696
int scsi_free;
9797
int (*encode_addr)(struct scsi_cmnd *, u16 *, struct _fc_channel *, fcp_cmnd *);

drivers/isdn/hisax/hisax.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ struct Layer1 {
202202
void *hardware;
203203
struct BCState *bcs;
204204
struct PStack **stlistp;
205-
long Flags;
205+
unsigned long Flags;
206206
struct FsmInst l1m;
207207
struct FsmTimer timer;
208208
void (*l1l2) (struct PStack *, int, void *);

drivers/isdn/hisax/hisax_if.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct hisax_d_if {
5656
struct IsdnCardState *cs;
5757
struct hisax_b_if *b_if[2];
5858
struct sk_buff_head erq;
59-
long ph_state;
59+
unsigned long ph_state;
6060
};
6161

6262
int hisax_register(struct hisax_d_if *hisax_if, struct hisax_b_if *b_if[],

0 commit comments

Comments
 (0)