[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>
diff --git a/drivers/isdn/sc/command.c b/drivers/isdn/sc/command.c
index b4b2433..04b8a58 100644
--- a/drivers/isdn/sc/command.c
+++ b/drivers/isdn/sc/command.c
@@ -103,9 +103,6 @@
return -ENODEV;
}
- pr_debug("%s: Received %s command from Link Layer\n",
- sc_adapter[card]->devicename, commands[cmd->command]);
-
/*
* Dispatch the command
*/
@@ -118,7 +115,7 @@
memcpy(&cmdptr, cmd->parm.num, sizeof(unsigned long));
if (copy_from_user(&ioc, (scs_ioctl __user *)cmdptr,
sizeof(scs_ioctl))) {
- pr_debug("%s: Failed to verify user space 0x%x\n",
+ pr_debug("%s: Failed to verify user space 0x%lx\n",
sc_adapter[card]->devicename, cmdptr);
return -EFAULT;
}
@@ -195,7 +192,7 @@
strlen(Phone),
(unsigned int *) Phone);
- pr_debug("%s: Dialing %s on channel %d\n",
+ pr_debug("%s: Dialing %s on channel %lu\n",
sc_adapter[card]->devicename, Phone, channel+1);
return status;
@@ -217,7 +214,7 @@
}
indicate_status(card, ISDN_STAT_BCONN,channel,NULL);
- pr_debug("%s: Answered incoming call on channel %s\n",
+ pr_debug("%s: Answered incoming call on channel %lu\n",
sc_adapter[card]->devicename, channel+1);
return 0;
}
@@ -240,7 +237,7 @@
(unsigned char) channel+1,
0,
NULL);
- pr_debug("%s: Sent HANGUP message to channel %d\n",
+ pr_debug("%s: Sent HANGUP message to channel %lu\n",
sc_adapter[card]->devicename, channel+1);
return status;
}
@@ -260,9 +257,6 @@
protocol = arg >> 8;
channel = arg & 0xff;
sc_adapter[card]->channel[channel].l2_proto = protocol;
- pr_debug("%s: Level 2 protocol for channel %d set to %s from %d\n",
- sc_adapter[card]->devicename, channel+1,
- l2protos[sc_adapter[card]->channel[channel].l2_proto],protocol);
/*
* check that the adapter is also set to the correct protocol
@@ -293,8 +287,6 @@
}
sc_adapter[card]->channel[channel].l3_proto = protocol;
- pr_debug("%s: Level 3 protocol for channel %d set to %s\n",
- sc_adapter[card]->devicename, channel+1, l3protos[protocol]);
return 0;
}
@@ -311,7 +303,7 @@
return -ENOBUFS;
}
- pr_debug("%s: B-Channel connection accepted on channel %d\n",
+ pr_debug("%s: B-Channel connection accepted on channel %lu\n",
sc_adapter[card]->devicename, channel+1);
indicate_status(card, ISDN_STAT_BCONN, channel, NULL);
return 0;
@@ -326,7 +318,7 @@
strcpy(sc_adapter[card]->channel[arg].eazlist, "");
sc_adapter[card]->channel[arg].eazclear = 1;
- pr_debug("%s: EAZ List cleared for channel %d\n",
+ pr_debug("%s: EAZ List cleared for channel %lu\n",
sc_adapter[card]->devicename, arg+1);
return 0;
}
@@ -340,7 +332,7 @@
strcpy(sc_adapter[card]->channel[arg].eazlist, num);
sc_adapter[card]->channel[arg].eazclear = 0;
- pr_debug("%s: EAZ list for channel %d set to: %s\n",
+ pr_debug("%s: EAZ list for channel %lu set to: %s\n",
sc_adapter[card]->devicename, arg+1,
sc_adapter[card]->channel[arg].eazlist);
return 0;