diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-10-11 04:22:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:14:25 -0400 |
commit | 76fd020937f2d09f76a4cd8dbae1f3bec640ff0b (patch) | |
tree | 7e8a001058a7b663e085e85add279642273c6c82 /drivers | |
parent | bf02c082bf7a464518d45b9c178b8aa83f74dd5d (diff) |
[PATCH] ISDN: several minor fixes
pcbit: kill 'may be used uninitialized' warning. although the code does
eventually fill the 32 bits it cares about, the variable truly is
accessed uninitialized in each macro. Easier to just clean it up now.
sc: fix a ton of obviously incorrect printk's (some with missing
arguments even)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/isdn/pcbit/layer2.c | 1 | ||||
-rw-r--r-- | drivers/isdn/sc/init.c | 23 | ||||
-rw-r--r-- | drivers/isdn/sc/packet.c | 14 | ||||
-rw-r--r-- | drivers/isdn/sc/shmem.c | 2 |
4 files changed, 21 insertions, 19 deletions
diff --git a/drivers/isdn/pcbit/layer2.c b/drivers/isdn/pcbit/layer2.c index 13e7d219d1c7..937fd2120381 100644 --- a/drivers/isdn/pcbit/layer2.c +++ b/drivers/isdn/pcbit/layer2.c | |||
@@ -311,6 +311,7 @@ pcbit_deliver(void *data) | |||
311 | dev->read_queue = frame->next; | 311 | dev->read_queue = frame->next; |
312 | spin_unlock_irqrestore(&dev->lock, flags); | 312 | spin_unlock_irqrestore(&dev->lock, flags); |
313 | 313 | ||
314 | msg = 0; | ||
314 | SET_MSG_CPU(msg, 0); | 315 | SET_MSG_CPU(msg, 0); |
315 | SET_MSG_PROC(msg, 0); | 316 | SET_MSG_PROC(msg, 0); |
316 | SET_MSG_CMD(msg, frame->skb->data[2]); | 317 | SET_MSG_CMD(msg, frame->skb->data[2]); |
diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c index 222ca7c08baa..06c9872e8c6a 100644 --- a/drivers/isdn/sc/init.c +++ b/drivers/isdn/sc/init.c | |||
@@ -98,13 +98,14 @@ static int __init sc_init(void) | |||
98 | * Confirm the I/O Address with a test | 98 | * Confirm the I/O Address with a test |
99 | */ | 99 | */ |
100 | if(io[b] == 0) { | 100 | if(io[b] == 0) { |
101 | pr_debug("I/O Address 0x%x is in use.\n"); | 101 | pr_debug("I/O Address invalid.\n"); |
102 | continue; | 102 | continue; |
103 | } | 103 | } |
104 | 104 | ||
105 | outb(0x18, io[b] + 0x400 * EXP_PAGE0); | 105 | outb(0x18, io[b] + 0x400 * EXP_PAGE0); |
106 | if(inb(io[b] + 0x400 * EXP_PAGE0) != 0x18) { | 106 | if(inb(io[b] + 0x400 * EXP_PAGE0) != 0x18) { |
107 | pr_debug("I/O Base 0x%x fails test\n"); | 107 | pr_debug("I/O Base 0x%x fails test\n", |
108 | io[b] + 0x400 * EXP_PAGE0); | ||
108 | continue; | 109 | continue; |
109 | } | 110 | } |
110 | } | 111 | } |
@@ -158,8 +159,8 @@ static int __init sc_init(void) | |||
158 | outb(0xFF, io[b] + RESET_OFFSET); | 159 | outb(0xFF, io[b] + RESET_OFFSET); |
159 | msleep_interruptible(10000); | 160 | msleep_interruptible(10000); |
160 | } | 161 | } |
161 | pr_debug("RAM Base for board %d is 0x%x, %s probe\n", b, ram[b], | 162 | pr_debug("RAM Base for board %d is 0x%lx, %s probe\n", b, |
162 | ram[b] == 0 ? "will" : "won't"); | 163 | ram[b], ram[b] == 0 ? "will" : "won't"); |
163 | 164 | ||
164 | if(ram[b]) { | 165 | if(ram[b]) { |
165 | /* | 166 | /* |
@@ -168,7 +169,7 @@ static int __init sc_init(void) | |||
168 | * board model | 169 | * board model |
169 | */ | 170 | */ |
170 | if(request_region(ram[b], SRAM_PAGESIZE, "sc test")) { | 171 | if(request_region(ram[b], SRAM_PAGESIZE, "sc test")) { |
171 | pr_debug("request_region for RAM base 0x%x succeeded\n", ram[b]); | 172 | pr_debug("request_region for RAM base 0x%lx succeeded\n", ram[b]); |
172 | model = identify_board(ram[b], io[b]); | 173 | model = identify_board(ram[b], io[b]); |
173 | release_region(ram[b], SRAM_PAGESIZE); | 174 | release_region(ram[b], SRAM_PAGESIZE); |
174 | } | 175 | } |
@@ -204,7 +205,7 @@ static int __init sc_init(void) | |||
204 | * Nope, there was no place in RAM for the | 205 | * Nope, there was no place in RAM for the |
205 | * board, or it couldn't be identified | 206 | * board, or it couldn't be identified |
206 | */ | 207 | */ |
207 | pr_debug("Failed to find an adapter at 0x%x\n", ram[b]); | 208 | pr_debug("Failed to find an adapter at 0x%lx\n", ram[b]); |
208 | continue; | 209 | continue; |
209 | } | 210 | } |
210 | 211 | ||
@@ -451,7 +452,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) | |||
451 | HWConfig_pl hwci; | 452 | HWConfig_pl hwci; |
452 | int x; | 453 | int x; |
453 | 454 | ||
454 | pr_debug("Attempting to identify adapter @ 0x%x io 0x%x\n", | 455 | pr_debug("Attempting to identify adapter @ 0x%lx io 0x%x\n", |
455 | rambase, iobase); | 456 | rambase, iobase); |
456 | 457 | ||
457 | /* | 458 | /* |
@@ -490,7 +491,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) | |||
490 | outb(PRI_BASEPG_VAL, pgport); | 491 | outb(PRI_BASEPG_VAL, pgport); |
491 | msleep_interruptible(1000); | 492 | msleep_interruptible(1000); |
492 | sig = readl(rambase + SIG_OFFSET); | 493 | sig = readl(rambase + SIG_OFFSET); |
493 | pr_debug("Looking for a signature, got 0x%x\n", sig); | 494 | pr_debug("Looking for a signature, got 0x%lx\n", sig); |
494 | if(sig == SIGNATURE) | 495 | if(sig == SIGNATURE) |
495 | return PRI_BOARD; | 496 | return PRI_BOARD; |
496 | 497 | ||
@@ -500,7 +501,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) | |||
500 | outb(BRI_BASEPG_VAL, pgport); | 501 | outb(BRI_BASEPG_VAL, pgport); |
501 | msleep_interruptible(1000); | 502 | msleep_interruptible(1000); |
502 | sig = readl(rambase + SIG_OFFSET); | 503 | sig = readl(rambase + SIG_OFFSET); |
503 | pr_debug("Looking for a signature, got 0x%x\n", sig); | 504 | pr_debug("Looking for a signature, got 0x%lx\n", sig); |
504 | if(sig == SIGNATURE) | 505 | if(sig == SIGNATURE) |
505 | return BRI_BOARD; | 506 | return BRI_BOARD; |
506 | 507 | ||
@@ -510,7 +511,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) | |||
510 | * Try to spot a card | 511 | * Try to spot a card |
511 | */ | 512 | */ |
512 | sig = readl(rambase + SIG_OFFSET); | 513 | sig = readl(rambase + SIG_OFFSET); |
513 | pr_debug("Looking for a signature, got 0x%x\n", sig); | 514 | pr_debug("Looking for a signature, got 0x%lx\n", sig); |
514 | if(sig != SIGNATURE) | 515 | if(sig != SIGNATURE) |
515 | return -1; | 516 | return -1; |
516 | 517 | ||
@@ -540,7 +541,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) | |||
540 | memcpy_fromio(&rcvmsg, &(dpm->rsp_queue[dpm->rsp_tail]), MSG_LEN); | 541 | memcpy_fromio(&rcvmsg, &(dpm->rsp_queue[dpm->rsp_tail]), MSG_LEN); |
541 | pr_debug("Got HWConfig response, status = 0x%x\n", rcvmsg.rsp_status); | 542 | pr_debug("Got HWConfig response, status = 0x%x\n", rcvmsg.rsp_status); |
542 | memcpy(&hwci, &(rcvmsg.msg_data.HWCresponse), sizeof(HWConfig_pl)); | 543 | memcpy(&hwci, &(rcvmsg.msg_data.HWCresponse), sizeof(HWConfig_pl)); |
543 | pr_debug("Hardware Config: Interface: %s, RAM Size: %d, Serial: %s\n" | 544 | pr_debug("Hardware Config: Interface: %s, RAM Size: %ld, Serial: %s\n" |
544 | " Part: %s, Rev: %s\n", | 545 | " Part: %s, Rev: %s\n", |
545 | hwci.st_u_sense ? "S/T" : "U", hwci.ram_size, | 546 | hwci.st_u_sense ? "S/T" : "U", hwci.ram_size, |
546 | hwci.serial_no, hwci.part_no, hwci.rev_no); | 547 | hwci.serial_no, hwci.part_no, hwci.rev_no); |
diff --git a/drivers/isdn/sc/packet.c b/drivers/isdn/sc/packet.c index f50defc38ae5..1e04676b016b 100644 --- a/drivers/isdn/sc/packet.c +++ b/drivers/isdn/sc/packet.c | |||
@@ -44,7 +44,7 @@ int sndpkt(int devId, int channel, struct sk_buff *data) | |||
44 | return -ENODEV; | 44 | return -ENODEV; |
45 | } | 45 | } |
46 | 46 | ||
47 | pr_debug("%s: sndpkt: frst = 0x%x nxt = %d f = %d n = %d\n", | 47 | pr_debug("%s: sndpkt: frst = 0x%lx nxt = %d f = %d n = %d\n", |
48 | sc_adapter[card]->devicename, | 48 | sc_adapter[card]->devicename, |
49 | sc_adapter[card]->channel[channel].first_sendbuf, | 49 | sc_adapter[card]->channel[channel].first_sendbuf, |
50 | sc_adapter[card]->channel[channel].next_sendbuf, | 50 | sc_adapter[card]->channel[channel].next_sendbuf, |
@@ -66,7 +66,7 @@ int sndpkt(int devId, int channel, struct sk_buff *data) | |||
66 | ReqLnkWrite.buff_offset = sc_adapter[card]->channel[channel].next_sendbuf * | 66 | ReqLnkWrite.buff_offset = sc_adapter[card]->channel[channel].next_sendbuf * |
67 | BUFFER_SIZE + sc_adapter[card]->channel[channel].first_sendbuf; | 67 | BUFFER_SIZE + sc_adapter[card]->channel[channel].first_sendbuf; |
68 | ReqLnkWrite.msg_len = data->len; /* sk_buff size */ | 68 | ReqLnkWrite.msg_len = data->len; /* sk_buff size */ |
69 | pr_debug("%s: writing %d bytes to buffer offset 0x%x\n", | 69 | pr_debug("%s: writing %d bytes to buffer offset 0x%lx\n", |
70 | sc_adapter[card]->devicename, | 70 | sc_adapter[card]->devicename, |
71 | ReqLnkWrite.msg_len, ReqLnkWrite.buff_offset); | 71 | ReqLnkWrite.msg_len, ReqLnkWrite.buff_offset); |
72 | memcpy_toshmem(card, (char *)ReqLnkWrite.buff_offset, data->data, ReqLnkWrite.msg_len); | 72 | memcpy_toshmem(card, (char *)ReqLnkWrite.buff_offset, data->data, ReqLnkWrite.msg_len); |
@@ -74,7 +74,7 @@ int sndpkt(int devId, int channel, struct sk_buff *data) | |||
74 | /* | 74 | /* |
75 | * sendmessage | 75 | * sendmessage |
76 | */ | 76 | */ |
77 | pr_debug("%s: sndpkt size=%d, buf_offset=0x%x buf_indx=%d\n", | 77 | pr_debug("%s: sndpkt size=%d, buf_offset=0x%lx buf_indx=%d\n", |
78 | sc_adapter[card]->devicename, | 78 | sc_adapter[card]->devicename, |
79 | ReqLnkWrite.msg_len, ReqLnkWrite.buff_offset, | 79 | ReqLnkWrite.msg_len, ReqLnkWrite.buff_offset, |
80 | sc_adapter[card]->channel[channel].next_sendbuf); | 80 | sc_adapter[card]->channel[channel].next_sendbuf); |
@@ -124,7 +124,7 @@ void rcvpkt(int card, RspMessage *rcvmsg) | |||
124 | return; | 124 | return; |
125 | } | 125 | } |
126 | skb_put(skb, rcvmsg->msg_data.response.msg_len); | 126 | skb_put(skb, rcvmsg->msg_data.response.msg_len); |
127 | pr_debug("%s: getting data from offset: 0x%x\n", | 127 | pr_debug("%s: getting data from offset: 0x%lx\n", |
128 | sc_adapter[card]->devicename, | 128 | sc_adapter[card]->devicename, |
129 | rcvmsg->msg_data.response.buff_offset); | 129 | rcvmsg->msg_data.response.buff_offset); |
130 | memcpy_fromshmem(card, | 130 | memcpy_fromshmem(card, |
@@ -143,7 +143,7 @@ void rcvpkt(int card, RspMessage *rcvmsg) | |||
143 | /* memset_shmem(card, rcvmsg->msg_data.response.buff_offset, 0, BUFFER_SIZE); */ | 143 | /* memset_shmem(card, rcvmsg->msg_data.response.buff_offset, 0, BUFFER_SIZE); */ |
144 | newll.buff_offset = rcvmsg->msg_data.response.buff_offset; | 144 | newll.buff_offset = rcvmsg->msg_data.response.buff_offset; |
145 | newll.msg_len = BUFFER_SIZE; | 145 | newll.msg_len = BUFFER_SIZE; |
146 | pr_debug("%s: recycled buffer at offset 0x%x size %d\n", | 146 | pr_debug("%s: recycled buffer at offset 0x%lx size %d\n", |
147 | sc_adapter[card]->devicename, | 147 | sc_adapter[card]->devicename, |
148 | newll.buff_offset, newll.msg_len); | 148 | newll.buff_offset, newll.msg_len); |
149 | sendmessage(card, CEPID, ceReqTypeLnk, ceReqClass1, ceReqLnkRead, | 149 | sendmessage(card, CEPID, ceReqTypeLnk, ceReqClass1, ceReqLnkRead, |
@@ -186,7 +186,7 @@ int setup_buffers(int card, int c) | |||
186 | sc_adapter[card]->channel[c-1].num_sendbufs = nBuffers / 2; | 186 | sc_adapter[card]->channel[c-1].num_sendbufs = nBuffers / 2; |
187 | sc_adapter[card]->channel[c-1].free_sendbufs = nBuffers / 2; | 187 | sc_adapter[card]->channel[c-1].free_sendbufs = nBuffers / 2; |
188 | sc_adapter[card]->channel[c-1].next_sendbuf = 0; | 188 | sc_adapter[card]->channel[c-1].next_sendbuf = 0; |
189 | pr_debug("%s: send buffer setup complete: first=0x%x n=%d f=%d, nxt=%d\n", | 189 | pr_debug("%s: send buffer setup complete: first=0x%lx n=%d f=%d, nxt=%d\n", |
190 | sc_adapter[card]->devicename, | 190 | sc_adapter[card]->devicename, |
191 | sc_adapter[card]->channel[c-1].first_sendbuf, | 191 | sc_adapter[card]->channel[c-1].first_sendbuf, |
192 | sc_adapter[card]->channel[c-1].num_sendbufs, | 192 | sc_adapter[card]->channel[c-1].num_sendbufs, |
@@ -203,7 +203,7 @@ int setup_buffers(int card, int c) | |||
203 | ((sc_adapter[card]->channel[c-1].first_sendbuf + | 203 | ((sc_adapter[card]->channel[c-1].first_sendbuf + |
204 | (nBuffers / 2) * buffer_size) + (buffer_size * i)); | 204 | (nBuffers / 2) * buffer_size) + (buffer_size * i)); |
205 | RcvBuffOffset.msg_len = buffer_size; | 205 | RcvBuffOffset.msg_len = buffer_size; |
206 | pr_debug("%s: adding RcvBuffer #%d offset=0x%x sz=%d bufsz:%d\n", | 206 | pr_debug("%s: adding RcvBuffer #%d offset=0x%lx sz=%d bufsz:%d\n", |
207 | sc_adapter[card]->devicename, | 207 | sc_adapter[card]->devicename, |
208 | i + 1, RcvBuffOffset.buff_offset, | 208 | i + 1, RcvBuffOffset.buff_offset, |
209 | RcvBuffOffset.msg_len,buffer_size); | 209 | RcvBuffOffset.msg_len,buffer_size); |
diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c index 24854826ca45..6f58862992db 100644 --- a/drivers/isdn/sc/shmem.c +++ b/drivers/isdn/sc/shmem.c | |||
@@ -61,7 +61,7 @@ void memcpy_toshmem(int card, void *dest, const void *src, size_t n) | |||
61 | spin_unlock_irqrestore(&sc_adapter[card]->lock, flags); | 61 | spin_unlock_irqrestore(&sc_adapter[card]->lock, flags); |
62 | pr_debug("%s: set page to %#x\n",sc_adapter[card]->devicename, | 62 | pr_debug("%s: set page to %#x\n",sc_adapter[card]->devicename, |
63 | ((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80); | 63 | ((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80); |
64 | pr_debug("%s: copying %d bytes from %#x to %#x\n", | 64 | pr_debug("%s: copying %d bytes from %#lx to %#lx\n", |
65 | sc_adapter[card]->devicename, n, | 65 | sc_adapter[card]->devicename, n, |
66 | (unsigned long) src, | 66 | (unsigned long) src, |
67 | sc_adapter[card]->rambase + ((unsigned long) dest %0x4000)); | 67 | sc_adapter[card]->rambase + ((unsigned long) dest %0x4000)); |