Commit 3796e4ee authored by Martin Dalecki's avatar Martin Dalecki Committed by Linus Torvalds

[PATCH] kill warnings 8/19

- Fix improper __FUNCTION__ usage in irda_device.
- Whitepsace cleanup there too.
parent 8192cb91
......@@ -106,15 +106,13 @@ int __init irda_device_init( void)
{
dongles = hashbin_new(HB_GLOBAL);
if (dongles == NULL) {
printk(KERN_WARNING
"IrDA: Can't allocate dongles hashbin!\n");
printk(KERN_WARNING "IrDA: Can't allocate dongles hashbin!\n");
return -ENOMEM;
}
tasks = hashbin_new(HB_GLOBAL);
if (tasks == NULL) {
printk(KERN_WARNING
"IrDA: Can't allocate tasks hashbin!\n");
printk(KERN_WARNING "IrDA: Can't allocate tasks hashbin!\n");
return -ENOMEM;
}
......@@ -210,8 +208,8 @@ int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts)
IRDA_DEBUG(2, __FUNCTION__ "()\n");
if (!dev->do_ioctl) {
ERROR(__FUNCTION__ "(), do_ioctl not impl. by "
"device driver\n");
ERROR("%s: do_ioctl not impl. by device driver\n",
__FUNCTION__);
return -1;
}
......@@ -231,8 +229,8 @@ int irda_device_change_speed(struct net_device *dev, __u32 speed)
IRDA_DEBUG(2, __FUNCTION__ "()\n");
if (!dev->do_ioctl) {
ERROR(__FUNCTION__ "(), do_ioctl not impl. by "
"device driver\n");
ERROR("%s: do_ioctl not impl. by device driver\n",
__FUNCTION__);
return -1;
}
......@@ -257,8 +255,8 @@ int irda_device_is_receiving(struct net_device *dev)
IRDA_DEBUG(2, __FUNCTION__ "()\n");
if (!dev->do_ioctl) {
ERROR(__FUNCTION__ "(), do_ioctl not impl. by "
"device driver\n");
ERROR("%s: do_ioctl not impl. by device driver\n",
__FUNCTION__);
return -1;
}
......@@ -314,14 +312,14 @@ int irda_task_kick(struct irda_task *task)
do {
timeout = task->function(task);
if (count++ > 100) {
ERROR(__FUNCTION__ "(), error in task handler!\n");
ERROR("%s: error in task handler!\n", __FUNCTION__);
irda_task_delete(task);
return TRUE;
}
} while ((timeout == 0) && (task->state != IRDA_TASK_DONE));
if (timeout < 0) {
ERROR(__FUNCTION__ "(), Error executing task!\n");
ERROR("%s: Error executing task!\n", __FUNCTION__);
irda_task_delete(task);
return TRUE;
}
......@@ -491,7 +489,7 @@ dongle_t *irda_device_dongle_init(struct net_device *dev, int type)
sprintf(modname, "irda-dongle-%d", type);
request_module(modname);
}
#endif /* CONFIG_KMOD */
#endif
if (!(reg = hashbin_find(dongles, type, NULL))) {
ERROR("IrDA: Unable to find requested dongle\n");
......@@ -514,9 +512,6 @@ dongle_t *irda_device_dongle_init(struct net_device *dev, int type)
/*
* Function irda_device_dongle_cleanup (dongle)
*
*
*
*/
int irda_device_dongle_cleanup(dongle_t *dongle)
{
......@@ -531,15 +526,12 @@ int irda_device_dongle_cleanup(dongle_t *dongle)
/*
* Function irda_device_register_dongle (dongle)
*
*
*
*/
int irda_device_register_dongle(struct dongle_reg *new)
{
/* Check if this dongle has been registred before */
if (hashbin_find(dongles, new->type, NULL)) {
MESSAGE(__FUNCTION__ "(), Dongle already registered\n");
MESSAGE("%s: Dongle already registered\n", __FUNCTION__);
return 0;
}
......@@ -561,7 +553,7 @@ void irda_device_unregister_dongle(struct dongle_reg *dongle)
node = hashbin_remove(dongles, dongle->type, NULL);
if (!node) {
ERROR(__FUNCTION__ "(), dongle not found!\n");
ERROR("%s: dongle not found!\n", __FUNCTION__);
return;
}
}
......@@ -581,8 +573,8 @@ int irda_device_set_mode(struct net_device* dev, int mode)
IRDA_DEBUG(0, __FUNCTION__ "()\n");
if (!dev->do_ioctl) {
ERROR(__FUNCTION__ "(), set_raw_mode not impl. by "
"device driver\n");
ERROR("%s: set_raw_mode not impl. by device driver\n",
__FUNCTION__);
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment