diff options
author | Andrew Morton <akpm@osdl.org> | 2006-10-03 04:16:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:04:20 -0400 |
commit | 20f43535694bb19e1bb45917b73b7e5cd5d74818 (patch) | |
tree | 34d694bce036e1f0d4bba17f2b8ecaac1954f9b9 | |
parent | 42d3fb5a8771b840e0bd6dbcd0c734883dd90b6f (diff) |
[PATCH] isdn-debug-build-fix
When pr_debug() is enabled:
drivers/isdn/sc/command.c: In function 'command':
drivers/isdn/sc/command.c:107: error: 'commands' undeclared (first use in this function)
drivers/isdn/sc/command.c:107: error: (Each undeclared identifier is reported only once
drivers/isdn/sc/command.c:107: error: for each function it appears in.)
drivers/isdn/sc/command.c:122: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'dial':
drivers/isdn/sc/command.c:199: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'answer':
drivers/isdn/sc/command.c:221: warning: format '%s' expects type 'char *', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'hangup':
drivers/isdn/sc/command.c:244: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'setl2':
drivers/isdn/sc/command.c:265: error: 'l2protos' undeclared (first use in this function)
drivers/isdn/sc/command.c: In function 'setl3':
drivers/isdn/sc/command.c:297: error: 'l3protos' undeclared (first use in this function)
drivers/isdn/sc/command.c:297: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'acceptb':
drivers/isdn/sc/command.c:315: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'clreaz':
drivers/isdn/sc/command.c:330: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'seteaz':
drivers/isdn/sc/command.c:345: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
Cc: Zach Brown <zach.brown@oracle.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/isdn/sc/command.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/isdn/sc/command.c b/drivers/isdn/sc/command.c index b4b24335f716..04b8a58f03b5 100644 --- a/drivers/isdn/sc/command.c +++ b/drivers/isdn/sc/command.c | |||
@@ -103,9 +103,6 @@ int command(isdn_ctrl *cmd) | |||
103 | return -ENODEV; | 103 | return -ENODEV; |
104 | } | 104 | } |
105 | 105 | ||
106 | pr_debug("%s: Received %s command from Link Layer\n", | ||
107 | sc_adapter[card]->devicename, commands[cmd->command]); | ||
108 | |||
109 | /* | 106 | /* |
110 | * Dispatch the command | 107 | * Dispatch the command |
111 | */ | 108 | */ |
@@ -118,7 +115,7 @@ int command(isdn_ctrl *cmd) | |||
118 | memcpy(&cmdptr, cmd->parm.num, sizeof(unsigned long)); | 115 | memcpy(&cmdptr, cmd->parm.num, sizeof(unsigned long)); |
119 | if (copy_from_user(&ioc, (scs_ioctl __user *)cmdptr, | 116 | if (copy_from_user(&ioc, (scs_ioctl __user *)cmdptr, |
120 | sizeof(scs_ioctl))) { | 117 | sizeof(scs_ioctl))) { |
121 | pr_debug("%s: Failed to verify user space 0x%x\n", | 118 | pr_debug("%s: Failed to verify user space 0x%lx\n", |
122 | sc_adapter[card]->devicename, cmdptr); | 119 | sc_adapter[card]->devicename, cmdptr); |
123 | return -EFAULT; | 120 | return -EFAULT; |
124 | } | 121 | } |
@@ -195,7 +192,7 @@ static int dial(int card, unsigned long channel, setup_parm setup) | |||
195 | strlen(Phone), | 192 | strlen(Phone), |
196 | (unsigned int *) Phone); | 193 | (unsigned int *) Phone); |
197 | 194 | ||
198 | pr_debug("%s: Dialing %s on channel %d\n", | 195 | pr_debug("%s: Dialing %s on channel %lu\n", |
199 | sc_adapter[card]->devicename, Phone, channel+1); | 196 | sc_adapter[card]->devicename, Phone, channel+1); |
200 | 197 | ||
201 | return status; | 198 | return status; |
@@ -217,7 +214,7 @@ static int answer(int card, unsigned long channel) | |||
217 | } | 214 | } |
218 | 215 | ||
219 | indicate_status(card, ISDN_STAT_BCONN,channel,NULL); | 216 | indicate_status(card, ISDN_STAT_BCONN,channel,NULL); |
220 | pr_debug("%s: Answered incoming call on channel %s\n", | 217 | pr_debug("%s: Answered incoming call on channel %lu\n", |
221 | sc_adapter[card]->devicename, channel+1); | 218 | sc_adapter[card]->devicename, channel+1); |
222 | return 0; | 219 | return 0; |
223 | } | 220 | } |
@@ -240,7 +237,7 @@ static int hangup(int card, unsigned long channel) | |||
240 | (unsigned char) channel+1, | 237 | (unsigned char) channel+1, |
241 | 0, | 238 | 0, |
242 | NULL); | 239 | NULL); |
243 | pr_debug("%s: Sent HANGUP message to channel %d\n", | 240 | pr_debug("%s: Sent HANGUP message to channel %lu\n", |
244 | sc_adapter[card]->devicename, channel+1); | 241 | sc_adapter[card]->devicename, channel+1); |
245 | return status; | 242 | return status; |
246 | } | 243 | } |
@@ -260,9 +257,6 @@ static int setl2(int card, unsigned long arg) | |||
260 | protocol = arg >> 8; | 257 | protocol = arg >> 8; |
261 | channel = arg & 0xff; | 258 | channel = arg & 0xff; |
262 | sc_adapter[card]->channel[channel].l2_proto = protocol; | 259 | sc_adapter[card]->channel[channel].l2_proto = protocol; |
263 | pr_debug("%s: Level 2 protocol for channel %d set to %s from %d\n", | ||
264 | sc_adapter[card]->devicename, channel+1, | ||
265 | l2protos[sc_adapter[card]->channel[channel].l2_proto],protocol); | ||
266 | 260 | ||
267 | /* | 261 | /* |
268 | * check that the adapter is also set to the correct protocol | 262 | * check that the adapter is also set to the correct protocol |
@@ -293,8 +287,6 @@ static int setl3(int card, unsigned long channel) | |||
293 | } | 287 | } |
294 | 288 | ||
295 | sc_adapter[card]->channel[channel].l3_proto = protocol; | 289 | sc_adapter[card]->channel[channel].l3_proto = protocol; |
296 | pr_debug("%s: Level 3 protocol for channel %d set to %s\n", | ||
297 | sc_adapter[card]->devicename, channel+1, l3protos[protocol]); | ||
298 | return 0; | 290 | return 0; |
299 | } | 291 | } |
300 | 292 | ||
@@ -311,7 +303,7 @@ static int acceptb(int card, unsigned long channel) | |||
311 | return -ENOBUFS; | 303 | return -ENOBUFS; |
312 | } | 304 | } |
313 | 305 | ||
314 | pr_debug("%s: B-Channel connection accepted on channel %d\n", | 306 | pr_debug("%s: B-Channel connection accepted on channel %lu\n", |
315 | sc_adapter[card]->devicename, channel+1); | 307 | sc_adapter[card]->devicename, channel+1); |
316 | indicate_status(card, ISDN_STAT_BCONN, channel, NULL); | 308 | indicate_status(card, ISDN_STAT_BCONN, channel, NULL); |
317 | return 0; | 309 | return 0; |
@@ -326,7 +318,7 @@ static int clreaz(int card, unsigned long arg) | |||
326 | 318 | ||
327 | strcpy(sc_adapter[card]->channel[arg].eazlist, ""); | 319 | strcpy(sc_adapter[card]->channel[arg].eazlist, ""); |
328 | sc_adapter[card]->channel[arg].eazclear = 1; | 320 | sc_adapter[card]->channel[arg].eazclear = 1; |
329 | pr_debug("%s: EAZ List cleared for channel %d\n", | 321 | pr_debug("%s: EAZ List cleared for channel %lu\n", |
330 | sc_adapter[card]->devicename, arg+1); | 322 | sc_adapter[card]->devicename, arg+1); |
331 | return 0; | 323 | return 0; |
332 | } | 324 | } |
@@ -340,7 +332,7 @@ static int seteaz(int card, unsigned long arg, char *num) | |||
340 | 332 | ||
341 | strcpy(sc_adapter[card]->channel[arg].eazlist, num); | 333 | strcpy(sc_adapter[card]->channel[arg].eazlist, num); |
342 | sc_adapter[card]->channel[arg].eazclear = 0; | 334 | sc_adapter[card]->channel[arg].eazclear = 0; |
343 | pr_debug("%s: EAZ list for channel %d set to: %s\n", | 335 | pr_debug("%s: EAZ list for channel %lu set to: %s\n", |
344 | sc_adapter[card]->devicename, arg+1, | 336 | sc_adapter[card]->devicename, arg+1, |
345 | sc_adapter[card]->channel[arg].eazlist); | 337 | sc_adapter[card]->channel[arg].eazlist); |
346 | return 0; | 338 | return 0; |