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